Sample Header Ad - 728x90

Ubuntu 22.04: I cannot start my browser automatically once logged in

1 vote
1 answer
151 views
Basically I want to login in my system and let the system to open for me my Web browser (Thorium). Since I' using Ubuntu 22.04 and I want to start the browser as *user* (and not as *root*), I followed this instruction carefully (using the *--user* option and putting my *.service* script in the *systemd/user* folder). So I have now this configuration: ubuntu@B1:/etc/systemd/user$ cat thorium.service [Unit] Description=Thorium Web Browser [Service] #User=myuser #Group=mypass ExecStart=/opt/scripts/thorium_start.sh [Install] WantedBy=default.target where the AppImage of Thorium is started from this script: ubuntu@B1:/etc/systemd/user$ cat /opt/scripts/thorium_start.sh #!/bin/bash filename="/opt/thorium/Thorium.AppImage" logfile="/tmp/log.txt" echo "Starting Thorium" > ${logfile} echo date >> ${logfile} sleep 30 # /usr/lib/systemd/user/pipewire-media-session.service drwxr-xr-x 2 root root 4096 Jul 21 2023 sockets.target.wants -rwxr-xr-x 1 root root 152 Jul 11 23:15 thorium.service thus the .service file has been correctly configured to start at boot and has execution rights. But the problem is that after login no broswer starts. Doing from terminal a simple: $./thorium_start.sh starts the browser as expected, so I do not think that the problem is the script. Any help? My system is: DISTRIB_ID=Ubuntu DISTRIB_RELEASE=22.04 DISTRIB_CODENAME=jammy DISTRIB_DESCRIPTION="Ubuntu 22.04.4 LTS" PRETTY_NAME="Ubuntu 22.04.4 LTS" NAME="Ubuntu" VERSION_ID="22.04" VERSION="22.04.4 LTS (Jammy Jellyfish)" VERSION_CODENAME=jammy ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/ " SUPPORT_URL="https://help.ubuntu.com/ " BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/ " PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy " UBUNTU_CODENAME=jammy
Asked by Dave (133 rep)
Jul 24, 2024, 09:32 PM
Last activity: Jul 25, 2024, 07:07 PM