Add initial packaging of MATE Desktop Environment (#1012)

Notably it has a loading delay (~30s) issue with marco (MATE window manager).
This commit is contained in:
drebrez 2018-01-03 19:43:13 +01:00 committed by Oliver Smith
parent 55be99a7fd
commit 3a4951898f
3 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,21 @@
pkgname=postmarketos-ui-mate
pkgver=1
pkgrel=0
pkgdesc="(X11) MATE Desktop Environment, fork of GNOME2 (stylus recommended)"
url="http://mate-desktop.org/"
arch="noarch"
license="GPL3+"
depends="mate-desktop-environment xorg-server dbus-x11"
makedepends=""
install="$pkgname.post-install"
subpackages=""
source="start_mate.sh"
options="!check"
package() {
# Autostart via autologin on TTY0 (until we have a display manager #656)
install -D -m644 "$srcdir"/start_mate.sh \
"$pkgdir"/etc/profile.d/start_mate.sh
}
sha512sums="a5a48821538b18069bad6528d488ed2dd5ae7d4f4fa095215c30d5399a41e645300f0c70bef1178be085e5fe8510fb4dda5446585663fd57193e938558b803de start_mate.sh"

View File

@ -0,0 +1,12 @@
#!/bin/sh
# Autologin on tty1, let busybox autoconfigure 2-6
autologin="$(getent passwd 1000 | cut -d ":" -f 1)"
for i in 1 2 3 4 5 6; do
old="^tty$i::respawn:/sbin/getty 38400 tty$i"
new="# tty$i::respawn:/sbin/getty 38400 tty$i"
[ "$i" = "1" ] && new="tty1::respawn:/bin/login -f $autologin"
sed -i -e "s.$old.$new.g" /etc/inittab
done

View File

@ -0,0 +1,15 @@
#!/bin/sh
# Mate autostart on tty1 (Autologin on tty1 is enabled in
# /etc/inittab by postmarketos-base post-install.hook).
# This is a temporary solution, we'll need something like a
# display manager in the long run (#656).
if [ "$(id -u)" = "1000" ] && [ "$(tty)" = "/dev/tty1" ]; then
# Start X11 with Mate
startx /usr/bin/mate-session 2>&1 | logger -t "$(whoami):x11"
# In case of failure, restart after 1s
sleep 1
exit
fi