View previous topic :: View next topic |
Author |
Message |
viper2pt0 Tux's lil' helper
Joined: 06 Mar 2004 Posts: 98
|
Posted: Tue Mar 15, 2005 5:46 pm Post subject: Running a command when gnome starts |
|
|
Hey, In order for my printer to work correctly...I have to wait till after gnome has started, open a terminal, su to root, and run:
Code: | # /etc/init.d/hplip start |
The reason I dont just do and rc-update and add this to default is because when I do that I run into a bunch of startup warning messages about hplip and to run depscan.sh (which didnt work when i ran it)....but when I start hplip from gnome it works flawlessly.
My question is, how can I automate /etc/init.d/hplip start everytime I log into gnome?...I tried using the startup tab in the session preferance, but It doesnt work (im assuming since I need to su before I can run the command). Is there any other way to accomplish this?
Thanks in advance |
|
Back to top |
|
|
n3mo l33t
Joined: 28 Mar 2004 Posts: 657 Location: In a Cruel World
|
Posted: Tue Mar 15, 2005 7:38 pm Post subject: |
|
|
Something like
/etc/init.d/hplip start &
exec gnome-session
added to your .xinirc ? _________________ Google, really. |
|
Back to top |
|
|
cybermonkey Apprentice
Joined: 11 Aug 2003 Posts: 194
|
Posted: Tue Mar 15, 2005 8:41 pm Post subject: |
|
|
or go Application--->desktop prefs----->advanced----->sessions------>startup items
and type the command there |
|
Back to top |
|
|
plasmagunman l33t
Joined: 07 Jun 2002 Posts: 604 Location: berlin
|
Posted: Wed Mar 16, 2005 9:40 am Post subject: |
|
|
n3mo wrote: | /etc/init.d/hplip start &
exec gnome-session
added to your .xinirc ? |
.xinitrc isn't executed with root privileges, so "/etc/init.d/hplip start" wouldn't work. _________________ please, feel free to correct my english. - por favor, corrige mi español. |
|
Back to top |
|
|
viper2pt0 Tux's lil' helper
Joined: 06 Mar 2004 Posts: 98
|
Posted: Wed Mar 16, 2005 7:59 pm Post subject: |
|
|
so is there any other way for me to execute this command with root priviledges? |
|
Back to top |
|
|
Naib Watchman
Joined: 21 May 2004 Posts: 6051 Location: Removed by Neddy
|
Posted: Wed Mar 16, 2005 8:24 pm Post subject: |
|
|
is it dependant on GNOME starting of X started?
IF it needs X to have started you could edit that init script and make it start after "xdm" _________________
Quote: | Removed by Chiitoo |
|
|
Back to top |
|
|
|