diff --git a/main/postmarketos-ui-hildon/60-lightdm-autologin.conf b/main/postmarketos-ui-hildon/60-lightdm-autologin.conf new file mode 100644 index 000000000..f77d8f386 --- /dev/null +++ b/main/postmarketos-ui-hildon/60-lightdm-autologin.conf @@ -0,0 +1,5 @@ +# This file gets removed with postmarketos-ui-hildon, even if modified! +[Seat:*] +autologin-user=username +autologin-user-timeout=0 +autologin-session=hildon diff --git a/main/postmarketos-ui-hildon/APKBUILD b/main/postmarketos-ui-hildon/APKBUILD index 8b2171d84..73253ad69 100644 --- a/main/postmarketos-ui-hildon/APKBUILD +++ b/main/postmarketos-ui-hildon/APKBUILD @@ -1,22 +1,13 @@ pkgname=postmarketos-ui-hildon pkgver=1 -pkgrel=5 +pkgrel=6 pkgdesc="(X11) Lightweight GTK+2 UI (optimized for single-touch touchscreens)" url="https://postmarketos.org" arch="x86_64 armhf aarch64" license="GPL3+" -depends=" - dbus-x11 - gtk+2.0-maemo - hildon-desktop - hildon-theme-alpha - mesa - xorg-server -" -makedepends="" -install="$pkgname.post-install" -subpackages="" -source="start_hildon.sh xinitrc_hildon.sh $install" +depends="dbus-x11 gtk+2.0-maemo hildon-desktop hildon-theme-alpha mesa xorg-server lightdm" +install="$pkgname.post-install $pkgname.pre-deinstall $pkgname.post-deinstall" +source="60-lightdm-autologin.conf hildon.desktop xinitrc_hildon.sh" options="!check" package() { @@ -24,12 +15,15 @@ package() { mkdir -p "$pkgdir"/usr/share/themes ln -s /usr/share/themes/alpha "$pkgdir"/usr/share/themes/default - # Autostart via autologin on TTY0 (until we have a display manager #656) - install -D -m644 "$srcdir"/start_hildon.sh \ - "$pkgdir"/etc/profile.d/start_hildon.sh - install -D -m644 "$srcdir"/xinitrc_hildon.sh \ + install -Dm644 "$srcdir"/hildon.desktop \ + "$pkgdir"/usr/share/xsessions/hildon.desktop + + install -Dm755 "$srcdir"/xinitrc_hildon.sh \ "$pkgdir"/etc/postmarketos-ui/xinitrc_hildon.sh + + install -Dm644 "$srcdir"/60-lightdm-autologin.conf \ + "$pkgdir"/usr/share/lightdm/lightdm.conf.d/60-autologin.conf } -sha512sums="614c36acb7932f86db4e189411404fac2d56bec7c4ebc0f4de336e7d46e1bde786a0f1b42be916ac43b47d3e7e7b32f4b5991212b0d452195e61ceba55d358f8 start_hildon.sh -5ef5710bee7bde99e1f240eb8873239c452b55c6dc943930e181d091835824094cf56bf29ae1b34d792ba0ce27f76e30ea69f3c125dda3bf286eaaaba8c8e6ae xinitrc_hildon.sh -733b9374e60bf6972d26da717dda039ab21b4052fe1a80881941971b9e1e99e315d184b48e9a064c36b1de5cbe3cfcf7b4819925b0a8948d447951ae8e580078 postmarketos-ui-hildon.post-install" +sha512sums="7abdefbffd24c5c7cd1400045895ee2c2cad933398bf37c749594efb698767efdac95aced9c1e7ea26f2333a2e9c877a0698ab5d086d7fbbd2972f261f6beb87 60-lightdm-autologin.conf +c191ccc783d6d1acfdfb6c93214458323d784533257fa90cc5daeff605983b97fe016c5d3a62cb2e09645bd2016648529f7f699a38b2c3383aa9cc0b6ce9a4ac hildon.desktop +5ef5710bee7bde99e1f240eb8873239c452b55c6dc943930e181d091835824094cf56bf29ae1b34d792ba0ce27f76e30ea69f3c125dda3bf286eaaaba8c8e6ae xinitrc_hildon.sh" diff --git a/main/postmarketos-ui-hildon/hildon.desktop b/main/postmarketos-ui-hildon/hildon.desktop new file mode 100644 index 000000000..438b9d19a --- /dev/null +++ b/main/postmarketos-ui-hildon/hildon.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=Hildon +Name[en]=Hildon +Comment=This session logs you into Hildon +Comment[en]=This session logs you into Hildon +Exec=/etc/postmarketos-ui/xinitrc_hildon.sh +TryExec=/etc/postmarketos-ui/xinitrc_hildon.sh +Icon= +Type=Application +DesktopNames=Hildon +Keywords=launch;Hildon;desktop;session; diff --git a/main/postmarketos-ui-hildon/postmarketos-ui-hildon.post-deinstall b/main/postmarketos-ui-hildon/postmarketos-ui-hildon.post-deinstall new file mode 100644 index 000000000..48d6f9835 --- /dev/null +++ b/main/postmarketos-ui-hildon/postmarketos-ui-hildon.post-deinstall @@ -0,0 +1,3 @@ +#!/bin/sh + +rm /usr/share/lightdm/lightdm.conf.d/60-autologin.conf diff --git a/main/postmarketos-ui-hildon/postmarketos-ui-hildon.post-install b/main/postmarketos-ui-hildon/postmarketos-ui-hildon.post-install index 0311203cc..a7791b1e4 100644 --- a/main/postmarketos-ui-hildon/postmarketos-ui-hildon.post-install +++ b/main/postmarketos-ui-hildon/postmarketos-ui-hildon.post-install @@ -1,12 +1,5 @@ #!/bin/sh -# Autologin on tty1, let busybox autoconfigure 2-6 -autologin="$(getent passwd 10000 | 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 - +sed -i "s/username/$(getent passwd 10000 | cut -d: -f1)/g" /usr/share/lightdm/lightdm.conf.d/60-autologin.conf +rc-update add lightdm default diff --git a/main/postmarketos-ui-hildon/postmarketos-ui-hildon.pre-deinstall b/main/postmarketos-ui-hildon/postmarketos-ui-hildon.pre-deinstall new file mode 100644 index 000000000..c815bf5fd --- /dev/null +++ b/main/postmarketos-ui-hildon/postmarketos-ui-hildon.pre-deinstall @@ -0,0 +1,3 @@ +#!/bin/sh + +rc-update del lightdm diff --git a/main/postmarketos-ui-hildon/start_hildon.sh b/main/postmarketos-ui-hildon/start_hildon.sh deleted file mode 100644 index df5c0fbe0..000000000 --- a/main/postmarketos-ui-hildon/start_hildon.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# Hildon 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)" = "10000" ] && [ "$(tty)" = "/dev/tty1" ]; then - # Start X11 with Hildon - startx /etc/postmarketos-ui/xinitrc_hildon.sh 2>&1 | logger -t "$(whoami):x11" - - - # In case of failure, restart after 1s - sleep 1 - exit -fi diff --git a/main/postmarketos-ui-i3wm/60-lightdm-autologin.conf b/main/postmarketos-ui-i3wm/60-lightdm-autologin.conf new file mode 100644 index 000000000..731f2003e --- /dev/null +++ b/main/postmarketos-ui-i3wm/60-lightdm-autologin.conf @@ -0,0 +1,5 @@ +# This file gets removed with postmarketos-ui-i3wm, even if modified! +[Seat:*] +autologin-user=username +autologin-user-timeout=0 +autologin-session=xfce diff --git a/main/postmarketos-ui-i3wm/APKBUILD b/main/postmarketos-ui-i3wm/APKBUILD index 50c35ad1a..df20722af 100644 --- a/main/postmarketos-ui-i3wm/APKBUILD +++ b/main/postmarketos-ui-i3wm/APKBUILD @@ -1,23 +1,22 @@ pkgname=postmarketos-ui-i3wm pkgver=0.1 -pkgrel=1 +pkgrel=3 pkgdesc="(X11) Tiling WM (keyboard required)" url="https://i3wm.org" arch="noarch" -license="GPL3" -depends="xorg-server mesa-egl i3wm i3status dmenu xset lxdm xfce4-terminal" -makedepends="" -subpackages="" -install="$pkgname.post-install" -source=" - $install - lock.sh -" +license="GPL-3.0" +depends="xorg-server mesa-egl i3wm i3status dmenu xset xfce4-terminal lightdm" +install="$pkgname.post-install $pkgname.pre-deinstall $pkgname.post-deinstall" +source="lock.sh 60-lightdm-autologin.conf" options="!check" package() { install -D -m755 "$srcdir"/lock.sh \ "$pkgdir"/usr/bin/lock.sh + + + install -Dm644 "$srcdir"/60-lightdm-autologin.conf \ + "$pkgdir"/usr/share/lightdm/lightdm.conf.d/60-autologin.conf } -sha512sums="f1556fa83ddecf453333d784004c28d6bd9b7cf4c5ee2c0d31d51e67f5e1fa9949a6dd4377793eeb72e619add0689208fdd497924ebefa778c349a26e57ad30a postmarketos-ui-i3wm.post-install -2165141499a830beb33ee42e410ba39104f3e70cd61507f0607115d421846104659fa7e9d4193b3394f7384fc33c2233269bb61c99d5d8a2368aa83500e54b35 lock.sh" +sha512sums="2165141499a830beb33ee42e410ba39104f3e70cd61507f0607115d421846104659fa7e9d4193b3394f7384fc33c2233269bb61c99d5d8a2368aa83500e54b35 lock.sh +573cce40172c24ad2512c175a44b9fcae5f19dda32e9a8b3c41dc5b80f2063041245372ccfa9df386a2356198bfc4d602f0ac9e1780a163a017fa4467ce925db 60-lightdm-autologin.conf" diff --git a/main/postmarketos-ui-i3wm/postmarketos-ui-i3wm.post-deinstall b/main/postmarketos-ui-i3wm/postmarketos-ui-i3wm.post-deinstall new file mode 100644 index 000000000..48d6f9835 --- /dev/null +++ b/main/postmarketos-ui-i3wm/postmarketos-ui-i3wm.post-deinstall @@ -0,0 +1,3 @@ +#!/bin/sh + +rm /usr/share/lightdm/lightdm.conf.d/60-autologin.conf diff --git a/main/postmarketos-ui-i3wm/postmarketos-ui-i3wm.post-install b/main/postmarketos-ui-i3wm/postmarketos-ui-i3wm.post-install index 0963ea069..1231c47c7 100644 --- a/main/postmarketos-ui-i3wm/postmarketos-ui-i3wm.post-install +++ b/main/postmarketos-ui-i3wm/postmarketos-ui-i3wm.post-install @@ -1,4 +1,4 @@ #!/bin/sh # Enable the login manager on boot -rc-update add lxdm default +rc-update add lightdm default diff --git a/main/postmarketos-ui-i3wm/postmarketos-ui-i3wm.pre-deinstall b/main/postmarketos-ui-i3wm/postmarketos-ui-i3wm.pre-deinstall new file mode 100644 index 000000000..c815bf5fd --- /dev/null +++ b/main/postmarketos-ui-i3wm/postmarketos-ui-i3wm.pre-deinstall @@ -0,0 +1,3 @@ +#!/bin/sh + +rc-update del lightdm diff --git a/main/postmarketos-ui-matchbox/60-lightdm-autologin.conf b/main/postmarketos-ui-matchbox/60-lightdm-autologin.conf new file mode 100644 index 000000000..52cf58853 --- /dev/null +++ b/main/postmarketos-ui-matchbox/60-lightdm-autologin.conf @@ -0,0 +1,5 @@ +# This file gets removed with postmarketos-ui-matchbox, even if modified! +[Seat:*] +autologin-user=username +autologin-user-timeout=0 +autologin-session=matchbox diff --git a/main/postmarketos-ui-matchbox/APKBUILD b/main/postmarketos-ui-matchbox/APKBUILD index 0267e7c01..5564ee9f4 100644 --- a/main/postmarketos-ui-matchbox/APKBUILD +++ b/main/postmarketos-ui-matchbox/APKBUILD @@ -5,15 +5,18 @@ pkgdesc="(X11) Very basic user interface for handhelds" url="https://matchbox-project.org" arch="noarch" license="GPL-2.0-only" -depends="matchbox-common matchbox-panel matchbox-desktop matchbox-keyboard matchbox-window-manager xterm xorg-server dbus-x11 mesa-egl gtk+2.0" -install="$pkgname.post-install" -source="start_matchbox.sh" +depends="matchbox-common matchbox-panel matchbox-desktop matchbox-keyboard matchbox-window-manager xterm xorg-server dbus-x11 mesa-egl gtk+2.0 lightdm" +install="$pkgname.post-install $pkgname.pre-deinstall $pkgname.post-deinstall" +source="matchbox.desktop 60-lightdm-autologin.conf" options="!check" package() { - # Autostart via autologin on TTY0 (until we have a display manager #656) - install -D -m644 "$srcdir"/start_matchbox.sh \ - "$pkgdir"/etc/profile.d/start_matchbox.sh + install -Dm644 "$srcdir"/matchbox.desktop \ + "$pkgdir"/usr/share/xsessions/matchbox.desktop + + install -Dm644 "$srcdir"/60-lightdm-autologin.conf \ + "$pkgdir"/usr/share/lightdm/lightdm.conf.d/60-autologin.conf } -sha512sums="c974333da4a4a829969df87edd737e8e1fca78ad9f9b38df10c9031317c4b06dcdf7666b31d39ca2e3ef1a8ac7b4bacdfda2d3e0fed57523489065cd7e5c9bb9 start_matchbox.sh" +sha512sums="1ceae6d4939cdddf14602471f52cf409e4094a81718ef5d7ea83adf5bf3d7ca8d13e15b8a98f99dee54bb8703038ea31abd74ad1fbe8d2c752d5f1a56310f508 matchbox.desktop +366a75dc36b123f184e4a9296784b22fe1b64de278c508e19536c150b44536b653ae819ca449d53f430fb88f9d853e10a2b64dc7aeb39d93ee763b67a13d7e1d 60-lightdm-autologin.conf" diff --git a/main/postmarketos-ui-matchbox/matchbox.desktop b/main/postmarketos-ui-matchbox/matchbox.desktop new file mode 100644 index 000000000..9dd99ae7d --- /dev/null +++ b/main/postmarketos-ui-matchbox/matchbox.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=Matchbox +Name[en]=Matchbox +Comment=This session logs you into Matchbox +Comment[en]=This session logs you into Matchbox +Exec=matchbox-session +TryExec=matchbox-session +Icon= +Type=Application +DesktopNames=Matchbox +Keywords=launch;Matchbox;desktop;session; diff --git a/main/postmarketos-ui-matchbox/postmarketos-ui-matchbox.post-deinstall b/main/postmarketos-ui-matchbox/postmarketos-ui-matchbox.post-deinstall new file mode 100644 index 000000000..48d6f9835 --- /dev/null +++ b/main/postmarketos-ui-matchbox/postmarketos-ui-matchbox.post-deinstall @@ -0,0 +1,3 @@ +#!/bin/sh + +rm /usr/share/lightdm/lightdm.conf.d/60-autologin.conf diff --git a/main/postmarketos-ui-matchbox/postmarketos-ui-matchbox.post-install b/main/postmarketos-ui-matchbox/postmarketos-ui-matchbox.post-install index 0311203cc..a7791b1e4 100644 --- a/main/postmarketos-ui-matchbox/postmarketos-ui-matchbox.post-install +++ b/main/postmarketos-ui-matchbox/postmarketos-ui-matchbox.post-install @@ -1,12 +1,5 @@ #!/bin/sh -# Autologin on tty1, let busybox autoconfigure 2-6 -autologin="$(getent passwd 10000 | 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 - +sed -i "s/username/$(getent passwd 10000 | cut -d: -f1)/g" /usr/share/lightdm/lightdm.conf.d/60-autologin.conf +rc-update add lightdm default diff --git a/main/postmarketos-ui-matchbox/postmarketos-ui-matchbox.pre-deinstall b/main/postmarketos-ui-matchbox/postmarketos-ui-matchbox.pre-deinstall new file mode 100644 index 000000000..c815bf5fd --- /dev/null +++ b/main/postmarketos-ui-matchbox/postmarketos-ui-matchbox.pre-deinstall @@ -0,0 +1,3 @@ +#!/bin/sh + +rc-update del lightdm diff --git a/main/postmarketos-ui-matchbox/start_matchbox.sh b/main/postmarketos-ui-matchbox/start_matchbox.sh deleted file mode 100644 index 8c1a7f2fe..000000000 --- a/main/postmarketos-ui-matchbox/start_matchbox.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/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)" = "10000" ] && [ "$(tty)" = "/dev/tty1" ]; then - # Start X11 with Mate - startx /usr/bin/matchbox-session 2>&1 | logger -t "$(whoami):x11" - - - # In case of failure, restart after 1s - sleep 1 - exit -fi diff --git a/main/postmarketos-ui-mate/60-lightdm-autologin.conf b/main/postmarketos-ui-mate/60-lightdm-autologin.conf new file mode 100644 index 000000000..c2d16d741 --- /dev/null +++ b/main/postmarketos-ui-mate/60-lightdm-autologin.conf @@ -0,0 +1,5 @@ +# This file gets removed with postmarketos-ui-mate, even if modified! +[Seat:*] +autologin-user=username +autologin-user-timeout=0 +autologin-session=mate diff --git a/main/postmarketos-ui-mate/APKBUILD b/main/postmarketos-ui-mate/APKBUILD index a0e45fcc0..fb6b8b8cd 100644 --- a/main/postmarketos-ui-mate/APKBUILD +++ b/main/postmarketos-ui-mate/APKBUILD @@ -1,24 +1,23 @@ pkgname=postmarketos-ui-mate pkgver=1 -pkgrel=4 +pkgrel=5 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 mesa-egl postmarketos-artwork-wallpapers gtk+2.0" -makedepends="" -install="$pkgname.post-install" +depends="mate-desktop-environment xorg-server dbus-x11 mesa-egl postmarketos-artwork-wallpapers gtk+2.0 lightdm" +install="$pkgname.post-install $pkgname.pre-deinstall $pkgname.post-deinstall" subpackages="" -source="start_mate.sh 000-system-background.gschema.override" +source="000-system-background.gschema.override 60-lightdm-autologin.conf" 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 install -Dm644 "$srcdir"/000-system-background.gschema.override \ "$pkgdir"/usr/share/glib-2.0/schemas/000-system-background.gschema.override + + install -Dm644 "$srcdir"/60-lightdm-autologin.conf \ + "$pkgdir"/usr/share/lightdm/lightdm.conf.d/60-autologin.conf } -sha512sums="bc4d0fda2c95d375433b7a6ba327e747e0b58fb69dda12dbdd44fe99ebd961a78793e4fa17bc719d681aa2afdd7ab0c823ae874c3b7c5a6a254301cb9e6cb289 start_mate.sh -b4eded3d1aba2086d53507d434da6f2d5aae24fa49c7a8619abb1d81f87898d7a6d813be777a285ce988d78db236bea7507e7868c39fe020e5d23c230dd36242 000-system-background.gschema.override" +sha512sums="b4eded3d1aba2086d53507d434da6f2d5aae24fa49c7a8619abb1d81f87898d7a6d813be777a285ce988d78db236bea7507e7868c39fe020e5d23c230dd36242 000-system-background.gschema.override +225c4d1bccad4bdacad34958322015147077158b395b8db095b7afd47e18638044780b381124c3b82bf639af66ea565e1763c54ab9599ec13177c289e0d2a000 60-lightdm-autologin.conf" diff --git a/main/postmarketos-ui-mate/postmarketos-ui-mate.post-deinstall b/main/postmarketos-ui-mate/postmarketos-ui-mate.post-deinstall new file mode 100644 index 000000000..48d6f9835 --- /dev/null +++ b/main/postmarketos-ui-mate/postmarketos-ui-mate.post-deinstall @@ -0,0 +1,3 @@ +#!/bin/sh + +rm /usr/share/lightdm/lightdm.conf.d/60-autologin.conf diff --git a/main/postmarketos-ui-mate/postmarketos-ui-mate.post-install b/main/postmarketos-ui-mate/postmarketos-ui-mate.post-install index c2845a309..a7791b1e4 100644 --- a/main/postmarketos-ui-mate/postmarketos-ui-mate.post-install +++ b/main/postmarketos-ui-mate/postmarketos-ui-mate.post-install @@ -1,13 +1,5 @@ #!/bin/sh -# Autologin on tty1, let busybox autoconfigure 2-6 -autologin="$(getent passwd 10000 | 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 +sed -i "s/username/$(getent passwd 10000 | cut -d: -f1)/g" /usr/share/lightdm/lightdm.conf.d/60-autologin.conf -# Recompile the schema to apply overwritten settings -glib-compile-schemas /usr/share/glib-2.0/schemas/ +rc-update add lightdm default diff --git a/main/postmarketos-ui-mate/postmarketos-ui-mate.pre-deinstall b/main/postmarketos-ui-mate/postmarketos-ui-mate.pre-deinstall new file mode 100644 index 000000000..c815bf5fd --- /dev/null +++ b/main/postmarketos-ui-mate/postmarketos-ui-mate.pre-deinstall @@ -0,0 +1,3 @@ +#!/bin/sh + +rc-update del lightdm diff --git a/main/postmarketos-ui-mate/start_mate.sh b/main/postmarketos-ui-mate/start_mate.sh deleted file mode 100644 index 473a7e40d..000000000 --- a/main/postmarketos-ui-mate/start_mate.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/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)" = "10000" ] && [ "$(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 diff --git a/main/postmarketos-ui-xfce4/60-lightdm-autologin.conf b/main/postmarketos-ui-xfce4/60-lightdm-autologin.conf new file mode 100644 index 000000000..05f9b2936 --- /dev/null +++ b/main/postmarketos-ui-xfce4/60-lightdm-autologin.conf @@ -0,0 +1,5 @@ +# This file gets removed with postmarketos-ui-xfce4, even if modified! +[Seat:*] +autologin-user=username +autologin-user-timeout=0 +autologin-session=xfce diff --git a/main/postmarketos-ui-xfce4/APKBUILD b/main/postmarketos-ui-xfce4/APKBUILD index 57c09d56f..9217b0724 100644 --- a/main/postmarketos-ui-xfce4/APKBUILD +++ b/main/postmarketos-ui-xfce4/APKBUILD @@ -1,26 +1,26 @@ pkgname=postmarketos-ui-xfce4 pkgver=0.2 -pkgrel=4 +pkgrel=5 pkgdesc="(X11) Lightweight GTK+2 desktop (stylus recommended)" url="https://gitlab.com/postmarketOS/xfce4-phone" arch="noarch" -license="GPL3" +license="GPL-3.0+" depends="xfce4 xorg-server mesa-egl postmarketos-artwork-wallpapers faenza-icon-theme xfce4-battery-plugin network-manager-applet - xfce4-mixer gnome-keyring consolekit2 lxpolkit gtk+2.0" -makedepends="" -install="$pkgname.post-install" -subpackages="" -source="start_xfce4.sh ${pkgname}-${pkgver}.tar.gz::https://gitlab.com/postmarketOS/xfce4-phone/-/archive/${pkgver}/xfce4-phone-${pkgver}.tar.gz" + xfce4-mixer gnome-keyring consolekit2 lxpolkit gtk+2.0 lightdm" +install="$pkgname.post-install $pkgname.pre-deinstall $pkgname.post-deinstall" +source="$pkgname-$pkgver.tar.gz::https://gitlab.com/postmarketOS/xfce4-phone/-/archive/${pkgver}/xfce4-phone-${pkgver}.tar.gz + 60-lightdm-autologin.conf" options="!check" builddir="$srcdir/xfce4-phone-$pkgver" package() { - install -D -m644 "$srcdir"/start_xfce4.sh \ - "$pkgdir"/etc/profile.d/start_xfce4.sh install -d -m755 "$pkgdir"/etc/skel cp -a "$builddir"/config "$pkgdir"/etc/skel/.config + + install -Dm644 "$srcdir"/60-lightdm-autologin.conf \ + "$pkgdir"/usr/share/lightdm/lightdm.conf.d/60-autologin.conf } -sha512sums="14bc00ba8b4970f044753d648c3f4ac0a289c98c8586ab9eb79236eef93e771a3306694daa6e957d9c9e396e52bccfdfa3e88ea9e53e3c78b32470bc3b1ea5ff start_xfce4.sh -4321a2a24b45f0d33b586ef098cfb236d87f557e7e2fecb180774d1cb1bc9fa1edfe6ce8a1faa646adcb026b4ef1b03b477eae0c46f4c46c8488baabb9c382e3 postmarketos-ui-xfce4-0.2.tar.gz" +sha512sums="4321a2a24b45f0d33b586ef098cfb236d87f557e7e2fecb180774d1cb1bc9fa1edfe6ce8a1faa646adcb026b4ef1b03b477eae0c46f4c46c8488baabb9c382e3 postmarketos-ui-xfce4-0.2.tar.gz +3841294daffdd3e0da5a7ba155ba8c21e9e5a2f2ba5b3b5ffa3ea6a16486625d3655d03f8c18740fcddfbca673c42a5289ec3b22720cfbbdd56fde8fdc3bf9b0 60-lightdm-autologin.conf" diff --git a/main/postmarketos-ui-xfce4/postmarketos-ui-xfce4.post-deinstall b/main/postmarketos-ui-xfce4/postmarketos-ui-xfce4.post-deinstall new file mode 100644 index 000000000..48d6f9835 --- /dev/null +++ b/main/postmarketos-ui-xfce4/postmarketos-ui-xfce4.post-deinstall @@ -0,0 +1,3 @@ +#!/bin/sh + +rm /usr/share/lightdm/lightdm.conf.d/60-autologin.conf diff --git a/main/postmarketos-ui-xfce4/postmarketos-ui-xfce4.post-install b/main/postmarketos-ui-xfce4/postmarketos-ui-xfce4.post-install index 999ddb4cd..a7791b1e4 100644 --- a/main/postmarketos-ui-xfce4/postmarketos-ui-xfce4.post-install +++ b/main/postmarketos-ui-xfce4/postmarketos-ui-xfce4.post-install @@ -1,11 +1,5 @@ #!/bin/sh -# Autologin on tty1, let busybox autoconfigure 2-6 -autologin="$(getent passwd 10000 | 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 +sed -i "s/username/$(getent passwd 10000 | cut -d: -f1)/g" /usr/share/lightdm/lightdm.conf.d/60-autologin.conf +rc-update add lightdm default diff --git a/main/postmarketos-ui-xfce4/postmarketos-ui-xfce4.pre-deinstall b/main/postmarketos-ui-xfce4/postmarketos-ui-xfce4.pre-deinstall new file mode 100644 index 000000000..c815bf5fd --- /dev/null +++ b/main/postmarketos-ui-xfce4/postmarketos-ui-xfce4.pre-deinstall @@ -0,0 +1,3 @@ +#!/bin/sh + +rc-update del lightdm diff --git a/main/postmarketos-ui-xfce4/start_xfce4.sh b/main/postmarketos-ui-xfce4/start_xfce4.sh deleted file mode 100644 index 5148704c3..000000000 --- a/main/postmarketos-ui-xfce4/start_xfce4.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# XFCE4 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)" = "10000" ] && [ "$(tty)" = "/dev/tty1" ]; then - # Start X11 with XFCE4 - ck-launch-session dbus-launch --exit-with-session startxfce4 2>&1 | logger -t "$(whoami):x11" - - - # In case of failure, restart after 1s - sleep 1 - exit -fi