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

New features which should be implemented in Porteus; suggestions are welcome. All questions or problems with testing releases (alpha, beta, or rc) should go in their relevant thread here, rather than the Bug Reports section.
Post Reply
Falcony
Full of knowledge
Full of knowledge
Posts: 235
Joined: 01 Jan 2011, 12:44
Location: Russia

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

Post#1 by Falcony » 12 Dec 2013, 10:50

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

viewtopic.php?f=125&t=2909&p=20131#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...
Last edited by Falcony on 13 Dec 2013, 04:19, edited 1 time in total.

User avatar
fanthom
Site Admin
Site Admin
Posts: 4623
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

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

Post#2 by fanthom » 12 Dec 2013, 12:24

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.
Please add [Solved] to your thread title if the solution was found.

Falcony
Full of knowledge
Full of knowledge
Posts: 235
Joined: 01 Jan 2011, 12:44
Location: Russia

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

Post#3 by Falcony » 13 Dec 2013, 04:19

I see, thnks fantom

Post Reply