LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Faster gnome session startup by delayed programs start (https://www.linuxquestions.org/questions/programming-9/faster-gnome-session-startup-by-delayed-programs-start-739528/)

catkin 07-12-2009 06:47 AM

Faster gnome session startup by delayed programs start
 
Hello :)

[Was posted in the Desktop forum but no replies after 6 days]

For faster Gnome session startup, I'm trying to start non-essential applications after allowing interaction with the Desktop.

Some success by System→Preferences→Sessions→"Startup Programs" and deselecting them all except for GnomeStartupProgramsDelayed.sh:
Code:

#! /bin/bash
# Quick and dirty proof of concept to start programs at Gnome session startup with a delay
sleep 60; /usr/bin/wallpaper-tray &
sleep 10; /usr/bin/gkrellm &

Issues arising from this are:
  1. After Gnome session startup displays an empty desktop, there is what seems like an excessive delay before it draws the background and populates it with icons. How can I find out what is happening during this time? I've enabled debug in /etc/gdm/gdm.conf but AFAIK this only logs up to "DEBUG: Running /etc/gdm/Xsession default for c on :0" so stops at just the point I want!
  2. When gkrellm starts it grabs focus. Possible to stop this? I guess that's a GKrellM issue, not gdm.
  3. In System→Preferences→Sessions→"Current Session", listed programs include GnomeStartupProgramsDelayed.sh but ps does not list it so it has exited. WallpaperTray is also listed but when it is made to exit it disappears from the list. How to tell gdm to drop a program from the list when it exits or before?
The most relevant information found so far is at:
I'm stumped for now :scratch: and suspect many people would use the technique if it could be made tidy and robust, so all suggestions welcomed.

Best

Charles

kate9954 05-18-2010 07:57 AM

Delaying Startup Applications
 
I really wish I could help you. For me, the only thing lacking in making Gnome the perfect desktop environment is a way to delay applications starting up.

I want, for example, for qBittorrent to download to an encrypted drive. Having it start automatically is handy, but it would be nice to give me time to mount the drive before it starts. And so on.

I was a Windows tech for twenty years, but I'm a complete Linux newbie. C'mon, guys, is there anyone who can help this guy out?

Many thanks,

Kate

catkin 06-21-2010 07:19 AM

Thanks Kate :)

That post was getting lonely! I never did get any further; I switched to Xfce instead of Gnome. An XfceDelayedAutostart.sh script is working simply, as hoped.

One suggestion: what happens if you move everything off the desktop? Does Gnome start any faster?

One solution for what you want to do would be to write a shell script to do it, run from the autostart feature. The most common way for shell scripts to participate in the desktop GUI is with zenity but the little-known yad is a lot easier to use and more powerful.

If the encrypted drive is external it might be possible to automate everything -- so when it is plugged in you are prompted to authenticate and, when that is successful, qBittorrent is started.


All times are GMT -5. The time now is 04:49 PM.