User account menu

Home
The Hyperlogos
Read Everything

Main navigation

  • Home
  • My Resumé
  • blog
  • Howtos
  • Pages
  • Contact
  • Search

KDE login scripts must have a shebang - fun with KDE 6 and wireplumber

  • Add
  • Subject tells the short story. Longer story, I wanted to start pipewire, pipewire-pulse, and wireplumber at KDE login. In troubleshooting I found that KDE is overwrought here. Instead of just starting the scripts named here with run-parts or similar, it creates .desktop files for them in .config/autostart. I didn't put a shebang (e.g. #!/bin/bash) at the top of the script. As it turns out, this breaks this whole facility because the .desktop files will just try to run the script as an executable and fail with an execve format error. If you run a shell script fragment from the shell, it works fine. KDE should be using the shell to launch the Exec line from a .desktop file and isn't. Oh look, someone failed to understand Unix again.

    Anyhoo this makes my script:

    #!/bin/bash
    pipewire &
    sleep 1
    pipewire-pulse &
    sleep 1
    wireplumber &

    And just in case you're wondering, the contents of $HOME/.config/autostart/wireplumber.sh.desktop:

    [Desktop Entry]
    Exec=/home/drink/bin/wireplumber.sh
    Icon=application-x-shellscript
    Name=wireplumber.sh
    Type=Application
    X-KDE-AutostartScript=true
    kde
    • Log in or register to post comments

    KDE login scripts must have a shebang - fun with KDE 6 and wireplumber

    Powered by Drupal

    Copyright © 2026 Martin Espinoza - All rights reserved