Hello.
I am currently trying to figure out an easy way for the user to set the
default window manager from the debian menu system. I have tried to
find existing solutions, but haven't found one so far.
The first part was easy (if I got it right, that is), that's just a small
patch to /etc/X11/Xsession. What this patch does, is to make Xsession
look for a file called .window-managers in the users directory, and use
that instead of /etc/X11/window-managers (if allow-user-xsession is set).
Now for the second part: I need to find out which window-manager is
running right now, and add that, with path and all, to the top of the
file "~/.window-managers". Is there an easy way of finding out which
window-manager is running?
Patch:
########################################################
*** /etc/X11/Xsession.OLD Sat May 8 14:38:50 1999
--- /etc/X11/Xsession Sat May 8 14:41:05 1999
***************
*** 102,107 ****
--- 102,114 ----
else
realstartup="sh $startup"
fi
+ elif [ -e ~/.window-managers ] && grep -qs ^allow-user-xsession $optionfile; then
+ for i in `sed 's/#.*//' ~/.window-managers`; do
+ if [ -x $i ]; then
+ realstartup=$i
+ break
+ fi
+ done
elif [ -e /etc/X11/window-managers ]; then
for i in `sed 's/#.*//' /etc/X11/window-managers`; do
if [ -x $i ]; then
########################################################
--
SSM - Stig Sandbeck Mathisen
Trust the Computer, the Computer is your Friend
Attachment:
pgpjt4KdkrxZo.pgp
Description: PGP signature