You are not logged in.
Pages: 1
Hello all,
I freshly installed Arch Linux with KDE plasma 6 desktop environment and I was setting up a script to work on login. It keeps giving me error saying it failed. I put the .sh file in ~/.config/autostart but that did not work either. I would like the script to work before I login if possible if not then after login is also fine. I have also tried doing chmod +x to make it executable but that did not help either.
Can someone help me to setup autostart script on login. Thank you!!
Last edited by rayu (2024-07-22 05:37:08)
Offline
~/.config/autostart/ is part of the XDG autostart specification, which relies on .desktop files: https://specifications.freedesktop.org/ … atest.html
You should probably share your script here if you need further assistance.
Jin, Jîyan, Azadî
Offline
Its just a basic rclone mounting script:
rclone --vfs-cache-mode writes mount onedrive: ~/OneDrive & notify-send "Onedrive Connected" "Microsoft Onedrive successfully mounted"
How do I make this run on login or on laptop startup?
Offline
You could use the XDG autostart system for that, just call the script in the Exec line.
I have some .desktop files you could use for inspiration here (they're for Debian so just ignore the dpgk-reconfigure commands and consider them as examples only).
Another possibility would be a systemd service but that would be a bit more involved.
Jin, Jîyan, Azadî
Offline
Is there a documentation page for XDG autostart system? I am new on linux and don't know much about this. Thank you!
Offline
I linked to it in my first post in this thread.
Jin, Jîyan, Azadî
Offline
Thank you so much! It finally worked. I just put the .desktop file in /etc/xdg/autostart folder. It did disappear after a reboot but the script is still working. Should I be concerned over that?
Offline
It's probably better to use ~/.config/autostart/. The script appears to be for your own user so running it system-wide doesn't seem appropriate.
What do you mean by "it did disappear after a reboot"?
Jin, Jîyan, Azadî
Offline
Like the .desktop file is not in /etc/xdg/autostart/ folder anymore. But onedrive is still mounted. I don't understand whats going on.
Offline
Pages: 1