.xinitrc for XFce patch suggestion

Ric fhj52ads at yahoo.com
Thu Jun 19 19:27:27 CEST 2003


Hi all:

When the current .xinitrc for XFce4 is run as login:root
there is a ... long message printed into  .xsession-errors 
that is Jamie Zawlinski's personal opinion on how everyone
should run Linux.  I won't replay it here...
I endured the Zawlinski message about logging into the
system as root for quite a long time (whenever I logged
into the system as root).  Besides being irritating ( and
.none. of JZ's business when or if I log into my own system
as root) it takes up too much space in
/root/.xsession-errors.  When I look at ~/.xsession-errors
I have problems and do not need the space to be *wasted*
with trivial messages.
A couple of years ago, I had enuf and (easily)created a
patch to .xinitrc for XFce.  I have never had any problem
with it.

The script that replaces the current XSS script, without
comments:

if [ -x /usr/X11R6/bin/xscreensaver ] 
then
   if [ $UID = 0 ] 
   then	
	if [ '/sbin/pidof xscreensaver' > 0 ]
	then	
	   echo "XSS is already running."
   	else
	      xscreensaver &		
  	fi
   else	
	xscreensaver-command -exit	
	xscreensaver -no-splash -lock-mode &	
   fi
fi
##EndXSS


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 ]
			then	##xss is already running, which ALWAYS seems to be
true
					##true in Mandrakesoft v9.0
			## write an 'info' message-will be in ~/.xsession-errors
			echo "XSS is already running."
			## nothing is appropriate 2B here -'cept maybe? return 0
or break -?
   		else				
			## root's logged in but xss is not running
			## start it (with splash & no lock as UID=nobody)
			## note:locking only works when xscreensaver is launched
by a
			## normal,non-privileged user(e.g., not "root"; root pid
is always=0.)
	   	xscreensaver &		
  			fi	# it was already running or was just started
   	else	## root is NOT logged-in
		## can start xss but kill it b/4 start
		xscreensaver-command -exit	
		##start it as $USER 
		xscreensaver -no-splash -lock-mode &	
   fi
fi
##EndXSS


It works here - been working since MDK 7.2 days...


Comments?  

Ric

=====
****

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com



More information about the Xfce4-dev mailing list