Results 1 to 3 of 3

Thread: Lubuntu: How to get startup script to run after LXDE/Openbox Desktop loaded /running

  1. #1
    Join Date
    Nov 2007
    Beans
    6
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Lubuntu: How to get startup script to run after LXDE/Openbox Desktop loaded /running

    I am running
    - Lubuntu latest version 16.04.3 LTS with 32-bit kernel 4.4.0-92-generic (i686)
    - The desktop environment is LXDE / Openbox.

    I am struggling to find a way to run a start-up script after the Desktop environment has loaded.

    This may be a version dependent problem as I have tried a number of solutions after a reasonably broad look across the internet using Google.

    I have tried putting a text file named autostart, that contains only
    @/path_to/start_up.sh
    in a number of different directories with no success.

    I do not wish to use
    'Menu > Preferences > Default applications for LxSession'
    as this does not reliably run my start-up.sh, nor does it always autostart my default start-up apps.

    Can anyone provide a tried and tested solution for autostart that will run a script called start-up.sh after the LXDE desktop is loaded.

    (Ideas tested include placing autostart in
    /home/user/.config/autostart
    or
    /home/user/.config/openbox
    or
    /etc/xdg/autostart
    or
    /etc/xdg/lxsession/Lubuntu
    etc
    Also tried modifying /etc/rc.local which did not work either)
    Last edited by keyz; August 15th, 2017 at 09:51 PM.

  2. #2
    Join Date
    Mar 2017
    Location
    Gubertino
    Beans
    681
    Distro
    Xubuntu 18.04 Bionic Beaver

    Re: Lubuntu: How to get startup script to run after LXDE/Openbox Desktop loaded /runn

    Check you're in the Lubuntu session.
    Code:
    echo $DESKTOP_SESSION
    The file to use in the default Lubuntu session is ~/.config/lxsession/Lubuntu/autostart
    and the entry doesn't require the "@" prefix, just the full path to the script.
    eg
    Code:
    /home/username/scripts/start-up.sh
    Make sure script is executable
    Code:
    chmod +x /path/to/start-up.sh
    Last edited by guber2; August 17th, 2017 at 03:57 AM.

  3. #3
    Join Date
    Sep 2006
    Beans
    1,324
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Lubuntu: How to get startup script to run after LXDE/Openbox Desktop loaded /runn

    Hello,

    just to mention that the procedure proposed by guber2 does not work if the command requires root privileges. This was tested under lubuntu 18.04.
    In that case sudo visudo is proposed.

    Regards!

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •