🐛 fix: Change default user to ubuntu

This commit is contained in:
Wanjohi
2024-04-16 02:13:12 +03:00
parent 66f7ba200f
commit c2c3590b0c
3 changed files with 6 additions and 8 deletions

View File

@@ -2,11 +2,11 @@
trap "echo TRAPed signal" HUP INT QUIT TERM
# Create and modify permissions of XDG_RUNTIME_DIR
sudo -u user mkdir -pm700 /tmp/runtime-netris
sudo chown user:user /tmp/runtime-netris
sudo -u user chmod 700 /tmp/runtime-netris
sudo -u user mkdir -pm700 /tmp/runtime-ubuntu
sudo chown user:user /tmp/runtime-ubuntu
sudo -u user chmod 700 /tmp/runtime-ubuntu
# Make user directory owned by the user in case it is not
sudo chown netris:netris /home/netris || sudo chown netris:netris /home/user/* || { echo "Failed to change user directory permissions. There may be permission issues."; }
sudo chown ubuntu:ubuntu /home/ubuntu || sudo chown ubuntu:ubuntu /home/ubuntu/* || { echo "Failed to change user directory permissions. There may be permission issues."; }
# Remove directories to make sure the desktop environment starts
sudo rm -rf /tmp/.X* ~/.cache
# Change time zone from environment variable