Re: [Sawfish] Suggestions for Gnome Replacement |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/sawfish Archives
]
On Fri, Aug 05, 2011 at 03:17:15PM -0400, John Lumby wrote:
> ... here's how:
>
> edit /etc/X11/xinit/Xclients and add some script like :
>
> if [ "$DESKTOP" = SAWFISH ]; then {
> ### may need to export PATH="??????";
> PREFERRED=`which sawfish`;
> };
> elif [ "$DESKTOP" = "GNOME" ]; then ...
Just a small techical note. 'which' is usually an alias (type
'which which' to see for yourself) so its use above is not entirely
safe and/or correct even if usually you are not bumping into
surprises. With bash you can use instead
PREFERRED=`type -p sawfish`
or more readable
PREFERRED=$(type -p sawfish)
You can also use an explicit /usr/bin/which (unfortunately fixing
that path).
Also there should be a clause which handles empty $PREFERRED if
sawfish is not found with 'type -p sawfish' (and which is a tad
easier to handle than "/usr/bin/which: no sawfish in ..." on
stderr). So to be on a safe side I would have there something
of that kind
.....
if [ "$DESKTOP" = "SAWFISH" ]; then
PREFERRED=$(type -p sawfish)
[ "$PREFERRED" ] || DESKTOP="GNOME"
fi
if [ "$DESKTOP" = "GNOME" ]; then
.....
Michal
---
--
Sawfish ML