.xinitrc for XFce patch suggestion

Ric fhj52ads at yahoo.com
Fri Jun 20 06:20:38 CEST 2003

Hello Benedikt:

Thank you for your insight.  I was unaware that  pidof  was
not  in most *nix.  

For XFce4, how about just a simple:

# Launch xscreensaver (if available)
if [ -x /usr/X11R6/bin/xscreensaver ]
   then	                             ## XSS exists
     if [ $UID -gt 0 ] 
   	then	                     ## root is not logged in
        xscreensaver -no-splash &

I did a little testing here and that resolves the basic
problems since XSS will not be asked to start when $UID<=0.
  Do you think it might be better to use a test  $UID != 0 
Of course, the above only works as is for sh compatible
shells = bash.  I do not know what the current shell is for
other *nix.  I thought sh and bash were generally the
standard for all the *nix but I had not given much thought
to it before. 

--- Benedikt Meurer <Benedikt.Meurer at unix-ag.uni-siegen.de>
> On Thu, 19, Jun 2003, Ric wrote:
> > Hi all:
> Hello Ric,
> Just a note: I don't see any reason to login to a desktop
> environment
> using the root account. There are thousands of better
> ways of getting
> things done. One possible way: Just install sudo, or use
> the sudo that shipped with your system (e.g. with
> > This is it with comments.  Only the section for loading
> > xscreensaver(XSS) is included here.
> > 
> > # Launch xscreensaver, if available
> > # xscreensaver -no-splash -lock-mode &
> > ##use a test for existence first + do not start w/
> locking
> > if $USER=root
> > ## this eliminates a lot of *stuff*, e.g., that ...
> message
> > from JZ
> > 
> > if [ -x /usr/X11R6/bin/xscreensaver ] 
> > then
> >    if [ $UID = 0 ] 
> >    	then	##root's logged in
> > 			##test if xss is already running
> > 			if [ '/sbin/pidof xscreensaver' > 0 ]
> This has two important problems:
> 	1) pidof is not available on most unix systems!

see above

> 	2) xscreensaver might be running on a different host, or
> maybe
> 	   several screensavers are running on this host, but
> none of
> 	   them connected to the current display. You should
> always keep
> 	   in mind, that X is a distributed system; altough you
> might  use only one host and only one X display, others
> (like me) have several hosts using various X displays.

As for the distributed X, I do not have experience there,
yet -have not had the need to do it.   I guess you are
saying that someone could be root login on one machine that
serves X & XSS to other systems and because they are root
on the X server, when the other system does startxfce4,
they will not get a xscreensaver running (or vice-versa)...
That is a bit confusing to me as I do not see why sh would
assume the server's login identity for the remote system
for the .xinitrc file but again, like I said, I have 0
experience serving X to other systems.

I am trying...

Have A Great Day!


Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

More information about the Xfce4-dev mailing list