Skip to main content
added 559 characters in body
Source Link
user301446
  • 636
  • 3
  • 6

The only programs that deny to run in background (or do not work then) are programs that need terminals.
Your problem is that nm-tray is not run at all because You did not start parcellite in the background.
So just add the ampersand to the end of that two lines (and others if You start other long-running/persistent programs that do not detach themselves, but I think currently there are none in Your above list) and add a disown at end of script to not let the script hang around there waiting for the programs to finish.


Try with this block instead of Your above example:

Autostart()
{
    # why, o my?
    sleep 1

    # set keyboard bindings
    xkbcomp -w 0 /home/beco/.config/xkbmap_kde $DISPLAY

    # toggle touchpad
    /home/beco/bin/touchpad off 

    # set wallpaper
    feh --bg-scale /home/beco/Pictures/wallpaper/Stonehenge-Desktop-Wallpaper-i3help.png

    # clipboard
    parcellite &

    # network manager
    nm-tray &

    # detach the started background programs
    disown
    # why, o my?
    #sleep 1

}

The only programs that deny to run in background (or do not work then) are programs that need terminals.
Your problem is that nm-tray is not run at all because You did not start parcellite in the background.
So just add the ampersand to the end of that two lines (and others if You start other long-running/persistent programs that do not detach themselves, but I think currently there are none in Your above list) and add a disown at end of script to not let the script hang around there waiting for the programs to finish.

The only programs that deny to run in background (or do not work then) are programs that need terminals.
Your problem is that nm-tray is not run at all because You did not start parcellite in the background.
So just add the ampersand to the end of that two lines (and others if You start other long-running/persistent programs that do not detach themselves, but I think currently there are none in Your above list) and add a disown at end of script to not let the script hang around there waiting for the programs to finish.


Try with this block instead of Your above example:

Autostart()
{
    # why, o my?
    sleep 1

    # set keyboard bindings
    xkbcomp -w 0 /home/beco/.config/xkbmap_kde $DISPLAY

    # toggle touchpad
    /home/beco/bin/touchpad off 

    # set wallpaper
    feh --bg-scale /home/beco/Pictures/wallpaper/Stonehenge-Desktop-Wallpaper-i3help.png

    # clipboard
    parcellite &

    # network manager
    nm-tray &

    # detach the started background programs
    disown
    # why, o my?
    #sleep 1

}
Source Link
user301446
  • 636
  • 3
  • 6

The only programs that deny to run in background (or do not work then) are programs that need terminals.
Your problem is that nm-tray is not run at all because You did not start parcellite in the background.
So just add the ampersand to the end of that two lines (and others if You start other long-running/persistent programs that do not detach themselves, but I think currently there are none in Your above list) and add a disown at end of script to not let the script hang around there waiting for the programs to finish.