LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 05-15-2008, 04:18 AM   #1
DaFrEQ
Member
 
Registered: Mar 2002
Location: Earth... for now
Distribution: SuSE9.2 AMD64; LFS; GentooAMD64; Ubuntu10.04; RHEL 5.5; Solaris10(SPARC)
Posts: 418

Rep: Reputation: 30
SuSE 9.2: User Startup Scripts


Hey all,

Long time no post.
I've got a SuSE 9.2 linux box, and I've got it set to auto-login a specified user straight into the KDE desktop.

However, when the machine is powered on/rebooted, I need the following commands to be executed. When they are executed doesn't really matter, I just need them to have been initialized by the time the user is logged into the desktop.

Here are the commands needed:
Code:
xset s off
xset -dpms
xhost +IPaddress
xhost
That's it. The first two, kinda obvious. Want to ensure that the screen-saver & screen-blanking (power-saving mode) are disabled.
Then need to add the IPaddress to the allowed xhost, then start the xhost.

This is because another remote system sends video to this machine via this whole setup.
I was running on a Knoppix Live-CD, however that install lacked alot of utilities needed for normal day-to-day geekstuff. So I installed SuSE 9.2. Yes I could've put the new OpenSuSE but I didn't have a copy handy, and 9.2 runs just fine on this machine anyway. I usually use Gentoo, however I'm at sea via satellite connection, so installing Gentoo is not really a feasible option. It's been quite awhile since I've use good 'ol SuSE, but I remember it being quite stable and hassle free.

I've tried adding the above commands to the /etc/boot.local but it doesn't seem to work.
I've added them to the .bashrc file, however if the user doesn't open a terminal window (which they most likely won't), then the commands will never get executed. And like I stated before, I need the commands running by the time the system boots into the desktop because the remote machine will already be sending the video information... sitting waiting for this machine to be ready to receive.

Any info is greatly appreciated.
Tnx
L8rz
 
Old 05-15-2008, 10:34 PM   #2
rlhartmann
Member
 
Registered: Mar 2008
Posts: 73

Rep: Reputation: 16
I don't run SUSE, so I can't be sure of they're exact configuration, but
I hope this helps.

The commands mentioned are X commands, they need to go in the ~/.xinitrc script or a similar
script if your using kde or something. Or possibly the global one
in /etc/X11/xinit/xinitrc or something similar to that.

You may also want to look at importing the keys using xauth instead of xhost.
 
Old 05-15-2008, 11:32 PM   #3
DaFrEQ
Member
 
Registered: Mar 2002
Location: Earth... for now
Distribution: SuSE9.2 AMD64; LFS; GentooAMD64; Ubuntu10.04; RHEL 5.5; Solaris10(SPARC)
Posts: 418

Original Poster
Rep: Reputation: 30
Thanks for the reply.

I tried putting the commands in the xinitrc as mentioned, but that doesn't seem to work either.
 
Old 05-16-2008, 10:20 PM   #4
rlhartmann
Member
 
Registered: Mar 2008
Posts: 73

Rep: Reputation: 16
Are you running KDE? There is a directory in .kde called Autostart,
if you were to put a shell script in there that ran the
konsole command with a -e option, maybe this would do what you need.

Put your commands in a shell script, then create a shell script
in Autostart that starts runs the command

konsole -e xinit.sh

make sure your scripts have execute permissions.

Last edited by rlhartmann; 05-16-2008 at 11:20 PM.
 
Old 05-20-2008, 06:23 PM   #5
DaFrEQ
Member
 
Registered: Mar 2002
Location: Earth... for now
Distribution: SuSE9.2 AMD64; LFS; GentooAMD64; Ubuntu10.04; RHEL 5.5; Solaris10(SPARC)
Posts: 418

Original Poster
Rep: Reputation: 30
Well,
That one didn't seem to work either. Weird. I know I've done it before, but it was many years back.

For now, I'm just leaving a term window open on the second desktop space, so when KDE restarts (or if the system is rebooted) the term window is automatically opened upon KDE starting. Then the commands in the .bashrc file get executed automatically.

This isn't totally reliable because some users may end up closing the terminal and not realize why it was there in the first place.
But for now, it's all I've got.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SUSE 10 Startup scripts sgowen Programming 3 11-14-2007 09:07 AM
Mandriva startup scripts (need to add something to startup before X starts) thunderweasel Mandriva 3 01-01-2006 12:55 AM
Perl Scripts at startup? Suse 9.3 Drfarfrompuken Linux - Newbie 8 08-05-2005 08:12 AM
Startup scripts MadnessASAP Linux - Software 2 12-15-2004 07:09 PM
User Specific Startup scripts carbonnb Linux - Newbie 2 07-02-2003 06:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 11:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration