Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: How to Autostart apps in Lubuntu

  1. #1
    Join Date
    Nov 2008
    Location
    Sussex, England
    Beans
    871
    Distro
    Lubuntu

    Smile How to Autostart apps in Lubuntu

    Isn't Lubuntu FAB! And it's very easy to customise...once you know how.

    It took me a while to discover how to auto-start applications, so I thought I'd share this with you.

    To autostart an application for all users
    Edit the autostart file as root by typing in a terminal:-
    Code:
    sudo leafpad /etc/xdg/lxsession/Lubuntu/autostart
    Then add a line like this at the end of the file:-
    Code:
    @skype %U
    To autostart an application for a specific user
    Create an autostart directory in the users .config directory, if one does not already exist (i.e. /home/{user name}/.config/autostart/)

    Then from a terminal type:-
    Code:
    ln -s /usr/share/applications/skype.desktop ~/.config/autostart/

  2. #2
    Join Date
    Jun 2009
    Beans
    262
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to Autostart apps in Lubuntu

    Autorun a local user script located in ~/bin
    Code:
    nano ~/.bashrc
    Uncomment section to activate script in .bashrc which adds ~/bin to local users $PATH
    Logout/in,verify from terminal that script in ~/bin executes as regular user.
    Code:
    nano ~/.config/lxsession/Lubuntu/autostart
    Add @your.script.name to autostart file

  3. #3
    Join Date
    Nov 2008
    Location
    Sussex, England
    Beans
    871
    Distro
    Lubuntu

    Smile Re: How to Autostart apps in Lubuntu

    Quote Originally Posted by cavalier911 View Post
    Autorun a local user script located in ~/bin
    ...Uncomment section to activate script in .bashrc which adds ~/bin to local users $PATH...
    Hi Cavalier911, can you explain this bit more, as I could not see the section you mention.

    I'm auto-starting a script to start x11vnc server by putting it into a directory already included in $PATH (i.e. /usr/bin), and then adding to the autostart file:-
    Code:
    @startvnc.sh

  4. #4
    Join Date
    Jun 2009
    Beans
    262
    Distro
    Ubuntu 12.04 Precise Pangolin

    Lightbulb Re: How to Autostart apps in Lubuntu

    Forgot I copied from ~/.profile where it doesn't work.

    Code:
    # set PATH so it includes user's private bin if it exists
    if [ -d "$HOME/bin" ] ; then
        PATH="$HOME/bin:$PATH"
    fi
    On a per user add to ~/.bashrc
    On a global basis for all users add to /etc/bash.bashrc

    This was solution autorun script to use smbnetfs to browse/automount samba shares,it must be mounted by local user in a directory owned by the user.

  5. #5
    Join Date
    Jul 2009
    Location
    Caracas, Venezuela
    Beans
    29
    Distro
    Lubuntu 13.04 Raring Ringtail

    Re: How to Autostart apps in Lubuntu

    Quote Originally Posted by SteveDee View Post
    Isn't Lubuntu FAB! And it's very easy to customise...once you know how.

    It took me a while to discover how to auto-start applications, so I thought I'd share this with you.

    To autostart an application for all users
    Edit the autostart file as root by typing in a terminal:-
    Code:
    sudo leafpad /etc/xdg/lxsession/Lubuntu/autostart
    Then add a line like this at the end of the file:-
    Code:
    @skype %U
    To autostart an application for a specific user
    Create an autostart directory in the users .config directory, if one does not already exist (i.e. /home/{user name}/.config/autostart/)

    Then from a terminal type:-
    Code:
    ln -s /usr/share/applications/skype.desktop ~/.config/autostart/
    I'm trying to force Dropbox to autostart, only for my session, and according to LXDE wiki, one is supposedly add an autostart file on:

    /.config/lxsession/<profile>/autostart file
    Which in Lubuntu case would be:

    /.config/lxsession/lubuntu/autostart file
    So I placed an autostart file there, that reads:

    @home/user/.dropbox-dist/dropboxd
    But nothing happens. I have to start Dropbox manually...
    Last edited by jgratero; June 7th, 2011 at 08:29 PM. Reason: Format

  6. #6
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!

    Re: How to Autostart apps in Lubuntu

    Quote Originally Posted by jgratero View Post
    I'm trying to force Dropbox to autostart, only for my session, and according to LXDE wiki, one is supposedly add an autostart file on:



    Which in Lubuntu case would be:



    So I placed an autostart file there, that reads:
    Code:
    @home/user/.dropbox-dist/dropboxd
    But nothing happens. I have to start Dropbox manually...
    You need to make a script and point to that in the autostart file, but without the @ at the start in that file.

    As far as I can see the @ is required only in the /etc/xdg/lxsession/Lubuntu/autostart, not in the one in ~/.config

    You could also simply add the dropbox executable (or shell script if that is what it is) to /usr/bin or even to ~/bin if you have such a folder in your /home, and then make sure ~/bin is in your $PATH by adding appropriate lines to .bashrc, all as shown in cavalier911's posts.
    DISTRO: Xubuntu 16.04-64bit --- Code-tags --- Boot-Repair --- Grub2 wiki & Grub2 Basics --- RootSudo --- Wireless-Info --- SolvedThreads

  7. #7
    Join Date
    Jul 2009
    Location
    Caracas, Venezuela
    Beans
    29
    Distro
    Lubuntu 13.04 Raring Ringtail

    Re: How to Autostart apps in Lubuntu

    Quote Originally Posted by ajgreeny View Post
    You need to make a script and point to that in the autostart file, but without the @ at the start in that file.

    As far as I can see the @ is required only in the /etc/xdg/lxsession/Lubuntu/autostart, not in the one in ~/.config

    You could also simply add the dropbox executable (or shell script if that is what it is) to /usr/bin or even to ~/bin if you have such a folder in your /home, and then make sure ~/bin is in your $PATH by adding appropriate lines to .bashrc, all as shown in cavalier911's posts.
    The fix from cavalier911 is to be inserted at the end of .bashrc?

  8. #8
    Join Date
    Apr 2009
    Beans
    50
    Distro
    Kubuntu 17.04 Zesty Zapus

    Re: How to Autostart apps in Lubuntu

    In order to get Dropbox to autostart at logon, I did this:
    made a new file in my autostart folder here:
    /home/GUS/.config/autostart
    (you should change GUS to whatever your own username is)
    Call the file "Dropbox.desktop"
    Open it in your text editor and paste these lines, again changing GUS to your username in the line that starts with "Exec":

    Code:
    [Desktop Entry]
    Encoding=UTF-8
    Name=Dropbox
    Comment=RunDropbox
    Icon=/usr/share/icons/elementary/panel/22/dropboxstatus-logo.svg
    Exec=bash /home/GUS/.dropbox-dist/dropboxd
    Terminal=false
    Type=Application
    Save it. Logout. Login. Be happy.

    By the way, in order to get dropbox installed, I followed the instructions here: http://www.omgubuntu.co.uk/2010/04/h...ox-in-lubuntu/
    Last edited by poikiloid; August 1st, 2011 at 08:25 PM.

  9. #9
    Join Date
    Jul 2006
    Location
    Here
    Beans
    10,543

    Re: How to Autostart apps in Lubuntu

    Don't forget about lxshortcut, makes it easier to create custom commands.
    Example: lxshortcut -o ~/.config/autostart/name.desktop
    Or say you want a desktop icon
    Lxshortcut -o ~/Desktop/name.desktop

  10. #10
    Join Date
    Jul 2009
    Location
    Caracas, Venezuela
    Beans
    29
    Distro
    Lubuntu 13.04 Raring Ringtail

    Re: How to Autostart apps in Lubuntu

    Quote Originally Posted by poikiloid View Post
    In order to get Dropbox to autostart at logon, I did this:
    made a new file in my autostart folder here:
    /home/GUS/.config/autostart
    (you should change GUS to whatever your own username is)
    Call the file "Dropbox.desktop"
    Open it in your text editor and paste these lines, again changing GUS to your username in the line that starts with "Exec":

    Code:
    [Desktop Entry]
    Encoding=UTF-8
    Name=Dropbox
    Comment=RunDropbox
    Icon=/usr/share/icons/elementary/panel/22/dropboxstatus-logo.svg
    Exec=bash /home/GUS/.dropbox-dist/dropboxd
    Terminal=false
    Type=Application
    Save it. Logout. Login. Be happy.

    By the way, in order to get dropbox installed, I followed the instructions here: http://www.omgubuntu.co.uk/2010/04/h...ox-in-lubuntu/
    It worked flawlessly... Many thanks poikiloid!

Page 1 of 2 12 LastLast

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
  •