Re: mate desktop on arch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Daniel,

You do not tell which distribution you use.

In Slint the script session-chooser (attached) is used for that.

To use it, just type:
session-chooser mate
or
session-chooser i3
This can be done from a console as from a graphical terminal.

It could be adapted to other distributions.

If someone wants to contribute to such adaptation, issues and PR can be filed
against
https://github.com/DidierSpaier/slint-scripts/tree/master

Cheers,
Didier

On 17/06/2025 03:37, Daniel Crone wrote:
> On an old machine with I experiment with, I have the i3 desktop.
> Now I have downloaded the mate desktop and lightdm.
> I still want to begin at the console all the time.
> i3 runs with nodm.
> How mightt I switch to mate?
> And if I like, how might use i3 again?
> 
> To unsubscribe from this group and stop receiving emails from it, send an email to blinux-list+unsubscribe@xxxxxxxxxx.
> 

To unsubscribe from this group and stop receiving emails from it, send an email to blinux-list+unsubscribe@xxxxxxxxxx.
#!/bin/sh
# shellcheck disable=SC1091
# This script sets the X session started with the startx command or
# with a display manager, unless the session be set from the display
# manager's greeter.
# the accountsservice package in Slint.
# Written from scratch and dedicates to the public domain as stated in
# https://unlicense.org/
# Didier Spaier didieratslintdotfr  25 November 2017

# Currently usable with lightdm or using startx but not using sddm.
# Last revision: 29 March 2025
export TEXTDOMAIN=slint-scripts
. gettext.sh
if [ "$(id -u)" -eq 0 ]; then
	gettext "Running a graphical session as root is not allowed."; echo
	exit
fi
available=$(mktemp)
(cd /usr/share/xsessions || exit 1
for filename in *; do
	name=$(printf '%s' "${filename%.*}")
	echo "$name"
done|sort >"$available"
)
currentsession() {
	if [ ! -f "$HOME/.dmrc" ]; then
		gettext "Your default session is not set."; echo
	else
		gettext "Your session is currently set to"
		name=$(sed -n "s@.*=@@;2p" "$HOME/.dmrc")
		echo " ${name}."
	fi
}
usage() {
	gettext "Usage: session-chooser <desktop session>"; echo
	gettext "Available desktop sessions:"; echo
	cat "$available"
	currentsession
	rm "$available"
}
 
[ $# -ne 1 ] && usage && exit
session=$(echo "$1"|tr '[:upper:]' '[:lower:]')
if ! grep -q "^${session}$" "$available"; then
	eval_gettext "The session \$session is not available"
	echo
	usage
	exit
fi
# This is for lightdm: set the default session for the user.
# We need that the script user_session authored by Alexandros Frantzis
# be installed. It is shipped in the lightdm package in Slint.
username=$(id -un)
if [ -x /usr/bin/user_xsession.py ]; then
	user_xsession.py --user-name "$username" set "$session"
fi
# This is for startx
cp /etc/X11/xinit/xinitrc."$session" "$HOME/.xinitrc"
# We need to run setxkbmap just after having started X, so that $DISPLAY
# be set. But in some cases that is easier to do live than when building
# the window manager or desktop. 
(cd "$HOME" || exit 1
sed "/DESKTOP_SESSION/i \
/usr/bin/setxkbmap" .xinitrc > bof
mv bof .xinitrc
)
eval_gettext  "Your default session has been set to"
echo " ${session}."

[Index of Archives]     [Linux Speakup]     [Fedora]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]