[opensuse] Autostarting console app on opensuse/sles
What's the best way to autostart something on opensuse/sles? I know about /etc/init.d/boot.local, but that happens too early. I've also tried the workaround for mimic'ing redhat's rc.local, but for some reason it hasn't been that stable for me. (http://lists.opensuse.org/opensuse/2005-07/msg00937.html) Is there no better way to do this on opensuse/sles? Thanks, James -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
James Pifer wrote:
What's the best way to autostart something on opensuse/sles? I know about /etc/init.d/boot.local, but that happens too early.
Just create your own init-script and add at the appropriate place. /Per -- Per Jessen, Zürich (20.5°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
* James Pifer
What's the best way to autostart something on opensuse/sles? I know about /etc/init.d/boot.local, but that happens too early.
there is also possible, /etc/init.d/boot.after, but you must create the file. -- Patrick Shanahan Plainfield, Indiana, USA HOG # US1244711 http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535 @ http://counter.li.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 04 June 2009 16:02:55 Patrick Shanahan wrote:
* James Pifer
[06-04-09 08:50]: What's the best way to autostart something on opensuse/sles? I know about /etc/init.d/boot.local, but that happens too early.
there is also possible, /etc/init.d/boot.after, but you must create the file.
I think you mean /etc/init.d/after.local, which (if present) gets run after all runlevel scripts have been run There is also /etc/init.d/before.local, which gets run before the runlevel scripts (but after the boot.* scripts) And there is the method Per mentioned, which I think is generally preferred Anders -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thu, 2009-06-04 at 16:07 +0200, Anders Johansson wrote:
On Thursday 04 June 2009 16:02:55 Patrick Shanahan wrote:
* James Pifer
[06-04-09 08:50]: What's the best way to autostart something on opensuse/sles? I know about /etc/init.d/boot.local, but that happens too early.
there is also possible, /etc/init.d/boot.after, but you must create the file.
I think you mean /etc/init.d/after.local, which (if present) gets run after all runlevel scripts have been run
There is also /etc/init.d/before.local, which gets run before the runlevel scripts (but after the boot.* scripts)
And there is the method Per mentioned, which I think is generally preferred
That sounds promising. Just create the file and add your commands? I'll try that! Thanks, James -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 04 June 2009 11:33:27 am James Pifer wrote: ...
That sounds promising. Just create the file and add your commands? ...
Check the skeleton script in /etc/init.d . -- Regards, Rajko http://news.opensuse.org/category/people-of-opensuse/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thu, 2009-06-04 at 12:23 -0500, Rajko M. wrote:
On Thursday 04 June 2009 11:33:27 am James Pifer wrote: ...
That sounds promising. Just create the file and add your commands? ...
Check the skeleton script in /etc/init.d .
I did look at the skeleton script, but there are some things that really don't need an init script, or at least I don't need it. Just need to run them once if the server is restarted. I created after.local and added a few commands. A couple of them worked. I'm trying to kick off a vncserver, but that one doesn't work. ie: /usr/X11R6/bin/vncserver :49 -alwaysshared -geometry 1024x768 I've tried with both full path to vnc and not full. I know vncserver can be setup with an init script, but any idea why it doesn't run this way? Thanks, James -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
James Pifer wrote:
On Thu, 2009-06-04 at 12:23 -0500, Rajko M. wrote:
On Thursday 04 June 2009 11:33:27 am James Pifer wrote: ...
That sounds promising. Just create the file and add your commands? ...
Check the skeleton script in /etc/init.d .
I did look at the skeleton script, but there are some things that really don't need an init script, or at least I don't need it. Just need to run them once if the server is restarted.
Like starting mysql/apache/sshd you mean?
I created after.local and added a few commands. A couple of them worked. I'm trying to kick off a vncserver, but that one doesn't work. ie: /usr/X11R6/bin/vncserver :49 -alwaysshared -geometry 1024x768
I would definitely put that in its own script. Just out of choice.
I've tried with both full path to vnc and not full. I know vncserver can be setup with an init script, but any idea why it doesn't run this way?
My crystal ball is a little foggy - why don't you check your logs. /Per -- Per Jessen, Zürich (20.7°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
I've tried with both full path to vnc and not full. I know vncserver can be setup with an init script, but any idea why it doesn't run this way?
My crystal ball is a little foggy - why don't you check your logs.
grep'ed all the files in /var/log for vnc and found no issues. A few things in messages but that pertained to sles' vncserver settings. Maybe your crystal ball can tell me where i might find another log to look at.... James -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
James Pifer wrote:
I've tried with both full path to vnc and not full. I know vncserver can be setup with an init script, but any idea why it doesn't run this way?
My crystal ball is a little foggy - why don't you check your logs.
grep'ed all the files in /var/log for vnc and found no issues. A few things in messages but that pertained to sles' vncserver settings. Maybe your crystal ball can tell me where i might find another log to look at....
For something that went wrong during init, look at var/log/boot.msg /Per -- Per Jessen, Zürich (21.1°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
For something that went wrong during init, look at var/log/boot.msg
Thanks, that helped. I had to add PATH, USER, and HOME to after.local. Now it starts, but it's loading the wrong window manager. Instead of gnome-session it's starting fvwm. What's interesting is that when the vncserver starts, it says: Starting applications specified in /root/.vnc/xstartup Log file is /root/.vnc/server01:49.log xstartup: #!/bin/sh # Uncomment the following two lines for normal desktop: unset SESSION_MANAGER exec /etc/X11/xinit/xinitrc xrdb $HOME/.Xresources gnome-session& If I start vncserver after the system is totally booted and logged in as root, then it correctly starts gnome-session. So I assume something is still missing in the environment variables. Thanks, James -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (5)
-
Anders Johansson
-
James Pifer
-
Patrick Shanahan
-
Per Jessen
-
Rajko M.