Skip to content

Commit faa88e4

Browse files
committed
Run seagl-setup-room as seagloperator, not root
Hopefully this solves ALL sorts of permissioning/D-Bus/etc. issues.
1 parent 7a87556 commit faa88e4

2 files changed

Lines changed: 12 additions & 11 deletions

File tree

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,34 +16,35 @@ if ! [ $(id -u) == 0 ]; then
1616
fi
1717

1818
mkdir -p /var/lib/seagl
19+
chown -R seagloperator:seagloperator /var/lib/seagl
1920

2021
seagl-refresh-config
2122

22-
hostnamectl location "$(sed -E 's/([[:digit:]])/Room \1/' < /var/lib/seagl/room-id)"
23+
sudo hostnamectl location "$(sed -E 's/([[:digit:]])/Room \1/' < /var/lib/seagl/room-id)"
2324

2425
if zenity --question --text='Should this laptop be provisioned for streaming? Choose no if it will only be used for presentations.'; then
2526
echo streaming > /var/lib/seagl/laptop-type
2627
else
2728
echo presentations > /var/lib/seagl/laptop-type
2829
fi
2930

30-
hostnamectl hostname seagl-$(tr '[:upper:] ' '[:lower:]-' < /var/lib/seagl/room-id)-$(cat /var/lib/seagl/laptop-type)
31+
sudo hostnamectl hostname seagl-$(tr '[:upper:] ' '[:lower:]-' < /var/lib/seagl/room-id)-$(cat /var/lib/seagl/laptop-type)
3132

3233
if [ $(cat /var/lib/seagl/laptop-type) == streaming ]; then
3334
# TODO add SeaGL-specific scripts into here
34-
sudo -u $SUDO_USER gsettings set org.gnome.shell favorite-apps "['org.mozilla.firefox.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Terminal.desktop', 'org.gnome.Software.desktop', 'com.nextcloud.desktopclient.nextcloud.desktop', 'com.obsproject.Studio.desktop']"
35-
sudo -u $SUDO_USER seagl-setup-app obs
36-
sudo -u $SUDO_USER seagl-setup-app firefox
37-
sudo -u $SUDO_USER seagl-setup-app rclone
38-
sudo -u $SUDO_USER seagl-setup-app birdhoused
39-
sudo -u $SUDO_USER seagl-setup-app zrok
35+
gsettings set org.gnome.shell favorite-apps "['org.mozilla.firefox.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Terminal.desktop', 'org.gnome.Software.desktop', 'com.nextcloud.desktopclient.nextcloud.desktop', 'com.obsproject.Studio.desktop']"
36+
seagl-setup-app obs
37+
seagl-setup-app firefox
38+
seagl-setup-app rclone
39+
seagl-setup-app birdhoused
40+
seagl-setup-app zrok
4041
else
41-
sudo -u $SUDO_USER seagl-setup-app nextcloud
42+
seagl-setup-app nextcloud
4243
fi
4344

4445
# For some reason, Toolbx wants to create a Fedora 38 container??
4546
# TODO confirm this is an upstream bug, then report
46-
yes | sudo -u $SUDO_USER toolbox create --assumeyes --release f42
47+
yes | toolbox create --assumeyes --release f42
4748

4849
touch /var/lib/seagl/room-setup-complete
4950

desktops/room-setup.desktop

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ Version=1.0
55
Name=Setup SeaGL Room
66
# Used as a tooltip
77
Comment=Normally, this should be run automatically
8-
Exec=sudo /usr/sbin/seagl-setup-room
8+
Exec=/usr/sbin/seagl-setup-room
99
Terminal=true
1010
Categories=Utilities;ConsoleOnly;

0 commit comments

Comments
 (0)