Re: X11 with XDariwin
Re: X11 with XDariwin
- Subject: Re: X11 with XDariwin
- From: Toby Peterson <email@hidden>
- Date: Fri, 31 Jan 2003 03:14:43 -0500
'ps xo command' gives a list of running commands
'grep XDarwin.app' filters that output and shows all lines containing
'XDarwin.app'
'grep -v grep' eliminates any lines containing 'grep'
'wc -l' displays the number of lines in the result
Don't know how clear this makes it, but... read the man files! :D
'fi' simply ends the if-then-else construct. It's 'if' spelled
backwards... hehe.
Toby
Hey, Thanks a lot, that's a pretty good idea. Just for the sake of
learning though, I understand the if-else statement, but what is the
first line doing and what is the "fi" and the end?
i have a similar problem in that sometimes i want to use Xdarwin
(with blackbox or afterstep), and sometimes X11 (with quartz-wm), so
i have put this at the bottom of my ~/.xinitrc to start the correct
window manager
----
xdar="`ps xo command | grep XDarwin.app | grep -v grep | wc -l`"
if [ $xdar -eq 1 ]; then
exec blackbox
else
exec quartz-wm
fi
---
(i'm sure there are better ways of telling whether XDarwin is
running, but...)
_______________________________________________
x11-users mailing list | email@hidden
Help/Unsubscribe: http://www.lists.apple.com/mailman/listinfo/x11-users
Do not post admin requests to the list. They will be ignored.