Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: Set session startup order ?

  1. #11
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Set session startup order ?

    I've done a bit of testing and can expand on what I added to my previous post.

    In System, Preferences, Sessions (Startup Applications in Jaunty), add your desired apps. This will create a file in ~/.config/autostart called *.desktop. Open this file with a text editor. It will look something like this:
    Code:
    
    [Desktop Entry]
    Type=Application
    Name=gedit
    Exec=gedit
    Icon=system-run
    Comment=
    Edit the "Exec" line to add the desired delay.
    Notes:
    1. gedit and gnome-terminal, the two apps I played with, did not require full path names, but it may not be a bad idea anyway.
    2. The delay I set usually timed out about delay+20 from the time I hit ENTER on logon.
    3. The blank first line was in all the original files.
    Here is how I changed it and what worked for the 2 apps I tried:
    Code:
    
    [Desktop Entry]
    Type=Application
    Name=gedit
    Exec=bash -c "sleep 20; /usr/bin/gedit"
    Icon=system-run
    Comment=
    The apps opened in the order I set the delay. Tweaking of the delay times may be necessary to put them in the correct order, allowing for processing time of the app's opening.

    Please post your results here. I've seen this question posed before but not answered. If you can get it to work properly I would be glad to make a quick guide for the tutorials section. If you have problems I'd like to hear them as well.

    If anyone knows of a gui app that can set the start up order of the Sessions/Startup Applications list please post - then a guide wouldn't be necessary.
    Last edited by drs305; April 2nd, 2009 at 11:06 PM.
    Back to Xorg...

    Retired.

  2. #12
    Join Date
    Feb 2007
    Beans
    65

    Re: Set session startup order ?

    Code:
    Exec=sh -c "sleep 30; exec /usr/lib/evolution/2.26/evolution-alarm-notify"
    What is the role of the "exec" command here? I see that in your example with "gedit" the exec command is missing. I googled around and find that there is a difference whether we use

    Code:
    Exec=bash -c "sleep 20; /usr/bin/gedit"
    or

    Code:
    Exec=bash -c "sleep 20; exec /usr/bin/gedit"
    Example, open terminal and try:

    Code:
    gedit
    Then try:

    Code:
    exec gedit
    You see how in the second example the terminal closes when you close gedit.

    So which one should I use to modify *.desktop files in /home/name/.config/autostart?


    ADDED:
    I think I understand what's happening: if I don't use the exec command in the Exec= line, my conky shows 5 more processes (sh ones) at startup (usually I have 236, after tweaking 5 *.desktop files I got 241). So I added the exec command and now I have 236 again and they start the way I want them! Superb!
    Last edited by plamen_todoroff; April 3rd, 2009 at 02:51 PM.

  3. #13
    Join Date
    Apr 2007
    Beans
    467
    Distro
    Ubuntu Gnome 14.04 Trusty Tahr

    Re: Set session startup order ?

    @plamen_todoroff

    Although I cannot imagine why you would want to be so particular (the word an@l springs to mind; sorry, I don't know you so that is inappropriate but still...) about the order in which tray icons show up I would like to thank you for hogging my thread since it resulted in a working solution!

    @drs305

    You dude!

    When I paste the command
    Code:
    bash -c "sleep 20; exec /usr/bin/qutecom -b"
    straight at the Command line under Edit Session Startup Programs list (or whatever in English version), my QuteCom client starts delayed and works again! No need to edit the .desktop config file manually -- nor setting up some sh script. No fuss, this simply WORKS !!

    Thanks!

  4. #14
    Join Date
    Feb 2007
    Beans
    65

    Re: Set session startup order ?

    It passed through my mind that I should post a new thread, really, but your thread contained lots of useful information that I wanted to use to describe my "problem". I think that your initial problem and my issue are so connected that, in the interest of a free and open society, merging both was the only way to achieve some kind of a result that could be helpful to the community.

    By the way, adding

    Code:
    bash -c "sleep 20; exec /usr/bin/qutecom -b"
    in the command entry field under Edit Startup Program Sessions dialog, is doing exactly that - editing the corresponding *.desktop file in /home/login/.config/autostart. Just two different approaches with same result.



    PS: It's not the question why I need to sort my notification area icons, but could it be done, that is relevant here.
    Last edited by plamen_todoroff; June 21st, 2009 at 08:05 AM.

  5. #15
    Join Date
    Apr 2007
    Beans
    467
    Distro
    Ubuntu Gnome 14.04 Trusty Tahr

    Re: Set session startup order ?

    Quote Originally Posted by plamen_todoroff View Post
    It passed through my mind that I should post a new thread, really, but your thread contained lots of useful information that I wanted to use to describe my "problem". I think that your initial problem and my issue are so connected that, in the purpose of a free and open society, merging both was the only way to achieve some kind of a result that could be helpful to the community.
    No need to explain. I was not kidding when thanking you for joining.

    By the way, adding

    Code:
    bash -c "sleep 20; exec /usr/bin/qutecom -b"
    in the command entry field under Edit Startup Program Sessions dialog, is doing exactly that - editing the corresponding *.desktop file in /home/login/.config/autostart. Just two different approaches with same result.
    I know that. It just seems much less geeky to do it this way. Both the problem and the beauty of Linux OS'ses is (still) the geekiness of its possibilities. I mean, despite *huge* improvements in usability, some things still need manual tinkering. Not too difficult for users like I am, *with* the help of good tutorials and community support, but still... That is why I prefer to use Linux while I still would not recommend is to my mother (for instance), since she cannot be expected to browse forums like these and find some tutorial to fix some obscure thing like this. (sorry, off-topic)

    PS: It's not the question why I need to sort my notification area icons, but could it be done, that is relevant here.
    Agreed. And I have to admit, you have an exiting Desktop going on Is that Cairo Dock at the bottom or AWN ?

  6. #16
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Set session startup order ?

    RavanH,

    Please permit me to add one more thing to your thread.

    It occurred to me that many users would probably have nautilus in their sessions. To place the sleep command with nautilus, the simple command sequence of just bash -c "/usr/bin/nautilus" did not work as many of the other commands will.

    EDITED with further explanations:
    If you specify a complete path, you can run the command:
    Code:
    bash -c "sleep XX; nautilus /path.you.want.opened"
    Example: bash -c "sleep 15; nautilus /home"

    If you do not specify a path, the browser may not open. Nautilus is not merely a file browser - it is a file manager which accomplishes many tasks. Including a path in the command line ensures the file browser is opened.

    And as was discovered, placing that in a sessions command will automatically create the proper format in a new .desktop file in ~/.config/autostart

    I used this in the .desktop file starting it with "Exec=" but it should work as plamen_todoroff mentioned as well.


    Best wishes for your orderly lives
    Last edited by drs305; April 5th, 2009 at 03:17 PM. Reason: Removed " --no desktop ... researching this option.
    Back to Xorg...

    Retired.

  7. #17
    Join Date
    Apr 2007
    Beans
    467
    Distro
    Ubuntu Gnome 14.04 Trusty Tahr

    Re: Set session startup order ?

    Quote Originally Posted by drs305 View Post
    ...Please permit me to add one more thing to your thread...
    By all means!

    By the way, are you planning on putting this discovery of yours in a quick guide?

  8. #18
    Join Date
    Feb 2007
    Beans
    65

    Re: Set session startup order ?

    It's AWN. I've never tried cairo-dock, seems to complicated

  9. #19
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Set session startup order ?

    Quote Originally Posted by RavanH View Post
    By all means!

    By the way, are you planning on putting this discovery of yours in a quick guide?
    Yes I will unless it is already posted or you or plamen_todoroff would like to do it.
    Back to Xorg...

    Retired.

  10. #20
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Set session startup order ?

    RavanH and plamen_todoroff,

    I made a guide and it's posted on the Tutorials forum.
    HOWTO: SET SESSIONS STARTUP ORDER

    1300 words to describe one simple command line input. I've got to learn to be more concise!
    Back to Xorg...

    Retired.

Page 2 of 2 FirstFirst 12

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
  •