Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Running a command when gnome starts
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
viper2pt0
Tux's lil' helper
Tux's lil' helper


Joined: 06 Mar 2004
Posts: 98

PostPosted: Tue Mar 15, 2005 5:46 pm    Post subject: Running a command when gnome starts Reply with quote

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
View user's profile Send private message
n3mo
l33t
l33t


Joined: 28 Mar 2004
Posts: 657
Location: In a Cruel World

PostPosted: Tue Mar 15, 2005 7:38 pm    Post subject: Reply with quote

Something like

/etc/init.d/hplip start &
exec gnome-session

added to your .xinirc ?
_________________
Google, really.
Back to top
View user's profile Send private message
cybermonkey
Apprentice
Apprentice


Joined: 11 Aug 2003
Posts: 194

PostPosted: Tue Mar 15, 2005 8:41 pm    Post subject: Reply with quote

or go Application--->desktop prefs----->advanced----->sessions------>startup items
and type the command there
Back to top
View user's profile Send private message
plasmagunman
l33t
l33t


Joined: 07 Jun 2002
Posts: 604
Location: berlin

PostPosted: Wed Mar 16, 2005 9:40 am    Post subject: Reply with quote

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
View user's profile Send private message
viper2pt0
Tux's lil' helper
Tux's lil' helper


Joined: 06 Mar 2004
Posts: 98

PostPosted: Wed Mar 16, 2005 7:59 pm    Post subject: Reply with quote

so is there any other way for me to execute this command with root priviledges?
Back to top
View user's profile Send private message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 6051
Location: Removed by Neddy

PostPosted: Wed Mar 16, 2005 8:24 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum