Page 1 of 1

Durty patch for selecting WM at boot several WMs [Solved]

Posted: 12 Dec 2013, 10:50
by Falcony
Hello All!

Nice to see Porteus project goes well and became stronger.

Many thanks all users and contributors - Fantom, Ahau, Hamza & Brokenman specially

Here small durty patch whick allow select WM at boot time
Currently some bugs here, for example

http://forum.porteus.org/viewtopic.php? ... 131#p20131

But anyway, except this bug there are some problem to boot Porteus if you have several WM modules activated.

Here is simple scripts which runs at stratup. It check whether /proc/cmdline contains words: "kde", "lxde", "mate" or "xfce".

If such word exists then script make default WM as specified at boot time.

Code: Select all

#!/bin/sh
# Script of http://fidoslax.googlecode.com/
# Choosing default WM during boot time at rc.d or rc.local


if [ ! -d /etc/X11/xinit ]; then
  exit
fi

if [ "`cd /etc/X11/xinit ; echo *.*`" = '*.*' ]; then
  exit
fi

WM=`egrep -r -o " kde " /proc/cmdline | cut -d= -f2 | sed "s| ||g"`

if [ "kde" = "$WM" ];then

if [ -r /etc/X11/xinit/xinitrc.kde ]; then
 unlink /etc/X11/xinit/xinitrc
 ln -s /etc/X11/xinit/xinitrc.kde /etc/X11/xinit/xinitrc
fi

fi

WM=`egrep -r -o " mate " /proc/cmdline | cut -d= -f2 | sed "s| ||g"`


if [ "mate" = "$WM" ];then

if [ -r /etc/X11/xinit/xinitrc.mate-session ]; then
 unlink /etc/X11/xinit/xinitrc
 ln -s /etc/X11/xinit/xinitrc.mate-session /etc/X11/xinit/xinitrc
fi

fi

WM=`egrep -r -o " lxde " /proc/cmdline | cut -d= -f2 | sed "s| ||g"`

if [ "lxde" = "$WM" ];then

if [ -r /etc/X11/xinit/ ]; then
 unlink /etc/X11/xinit/xinitrc
 ln -s /etc/X11/xinit/xinitrc.lxde /etc/X11/xinit/xinitrc
fi

fi

WM=`egrep -r -o " xfce " /proc/cmdline | cut -d= -f2 | sed "s| ||g"`

if [ "xfce" = "$WM" ];then

if [ -r /etc/X11/xinit/xinitrc.xfce ]; then
 unlink /etc/X11/xinit/xinitrc
 ln -s /etc/X11/xinit/xinitrc.xfce /etc/X11/xinit/xinitrc
fi

fi

May be in Porteus there is another possability to select WM from several activated modules...

But I wasn't able to found.

If such possibilities dosn't not exist currently please modify this trick and include this script to new version of Porteus...

Re: Durty patch for selecting WM at boot time from several W

Posted: 12 Dec 2013, 12:24
by fanthom
hi Falcony,

We have dropped possibility of running multiple DEs as per poll organized on our forum which shown that 75% of users use only one DE. Multiple DE brings few issues like messy desktop menu where applications with the same functionality (audacious, qmmp) are doubled.
if user really want to be able to boot multiple DE then can put xzms in /optional and use 'load=kde|xfce|lxde|mate|razor' cheatcode.
this way only one DE will be activated at time.

Re: Durty patch for selecting WM at boot several WMs [Solved

Posted: 13 Dec 2013, 04:19
by Falcony
I see, thnks fantom