Skip to content

Commit 9813ea1

Browse files
committed
Make gui module use /opt/custompios/scripts #218 guysoft/FullPageOS#525
1 parent 0f89a3d commit 9813ea1

File tree

9 files changed

+24
-6
lines changed

9 files changed

+24
-6
lines changed

src/modules/gui/end_chroot_script

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ install_cleanup_trap
99

1010
#set up gui service
1111
sed -i 's/#user-session=.*/user-session=guisession/g' /etc/lightdm/lightdm.conf
12-
sed -i 's/#autologin-user=.*/autologin-user=pi/g' /etc/lightdm/lightdm.conf
12+
# This is now down as a systemd service to handle username conf on boot
13+
sed -i 's/#autologin-user=.*/autologin-user=UID_1000_PLACEHOLDER/g' /etc/lightdm/lightdm.conf
14+
systemctl enable update_lightdm_conf.service
1315

1416
# set the gui to run the main script of the GUI session
15-
sed -i "s@GUI_SESSION_PLACEHOLDEFR@${GUI_STARTUP_SCRIPT}@g" /home/pi/scripts/start_gui
17+
sed -i "s@GUI_SESSION_PLACEHOLDEFR@${GUI_STARTUP_SCRIPT}@g" /opt/custompios/scripts/start_gui
1618

1719
rm -r /usr/sbin/policy-rc.d || true

src/modules/gui/filesystem/home/pi/scripts/enable_gpu renamed to src/modules/gui/filesystem/opt/scripts/enable_gpu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
if [ ! -f /etc/gpu_enabled ]; then
3-
sudo sed 's@matchbox-window-manager \&@compton -b -d :0 --backend glx --unredir-if-possible --glx-swap-method buffer-age --glx-no-stencil --paint-on-overlay --vsync opengl \nmatchbox-window-manager \&@g' -i /home/pi/scripts/start_gui
3+
sudo sed 's@matchbox-window-manager \&@compton -b -d :0 --backend glx --unredir-if-possible --glx-swap-method buffer-age --glx-no-stencil --paint-on-overlay --vsync opengl \nmatchbox-window-manager \&@g' -i /opt/custompios/scripts/scripts/start_gui
44
sudo sed -i /boot/firmware/cmdline.txt -e "s/ quiet//"
55
sudo sed -i /boot/firmware/cmdline.txt -e "s/ splash//"
66
sudo sed -i /boot/firmware/cmdline.txt -e "s/ plymouth.ignore-serial-consoles//"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
if [ ! -f /etc/updated_lightdm_conf ]; then
3+
sed -i 's/UID_1000_PLACEHOLDER/'$(id -nu 1000)'/g' /etc/lightdm/lightdm.conf
4+
touch /etc/updated_lightdm_conf
5+
# sudo shutdown -r now
6+
fi
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[Unit]
22
Description=on first boot set up GPU acceleration
33
[Service]
4-
ExecStart=/home/pi/scripts/enable_gpu
4+
ExecStart=/opt/custompios/scripts/enable_gpu
55
ExecStop=
66
[Install]
77
WantedBy=multi-user.target
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[Unit]
2+
Description=on first boot set up the user name auto login in lightdm.service
3+
[Service]
4+
ExecStart=/opt/custompios/scripts/update_lightdm_conf
5+
Type=oneshot
6+
RemainAfterExit=yes
7+
[Install]
8+
WantedBy=lightdm.service
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[Desktop Entry]
22
Version=1.0
33
Name=GUISession
4-
Exec=/home/pi/scripts/start_gui
4+
Exec=/opt/custompios/scripts/start_gui
55
Comment=Startup of the minimal CustomPiOS GUI
66
Type=Application

src/modules/gui/start_chroot_script

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ set -e
88

99
source /common.sh
1010

11-
unpack /filesystem/home/pi /home/pi pi
11+
unpack /filesystem/opt /opt/custompios pi
1212
unpack /filesystem/root_init /
1313

14+
ln -s /opt/custompios/scripts /home/pi/scripts
15+
1416
echo exit 101 > /usr/sbin/policy-rc.d
1517
chmod +x /usr/sbin/policy-rc.d
1618

0 commit comments

Comments
 (0)