KDE: Autostart trouble

Hi,

(1) IBus.

~/.config/autostart ᐅ ls -l
-rwxr-xr-x 1 user user  44 Nov 10 10:03 ibus.sh
-rwx------ 1 user user 423 Nov 10 16:20 ibus.sh.desktop
-rw-r--r-- 1 user user 190 Jun  8 17:48 org.moson.matray.desktop

ibus.sh created manually, ibus.sh.desktop while registering ibus.sh in Startup and Shutdown > Autostart, under Login Scripts, Executable checked.

It won’t autostart, although

~/.config/autostart ᐅ ./ibus.sh

runs as expected.

(2) i3

~/.config/plasma-workspace/env ᐅ ls -l
-rwxr-xr-x 1 user user 26 Nov 10 19:51 set_window_manager.sh

set_window_manager.sh appeared in Startup and Shutdown > Autostart, under Pre-startup Scripts on its own. i3 won’t [auto]start either.

NB The scripts and the whole approach had been tested on other Manjaro KDE installations, years ago. Either something subtle has changed, or I failed to mention something important in my step-by-step description made those years ago :slight_smile:

Hi @Llama,

I don’t know if I’m correct in this, but I don’t think it’s recommended to keep the .sh file in that directory. As @freggel.doe once suggested, I keep mine in /usr/local/bin.

Also, please provide the output of:

cat ~/.config/autostart/ibus.sh.desktop

Regarding i3, I can’t help you there…

~/.config/autostart ᐅ cat ibus.sh.desktop 
[Desktop Entry]
Comment[en_US]=
Comment=
Exec=/home/user/.config/autostart/ibus.sh
GenericName[en_US]=
GenericName=
Icon=dialog-scripts
MimeType=
Name[en_US]=ibus.sh
Name=ibus.sh
Path=/home/user/.config/autostart
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-AutostartScript=true
X-KDE-RunOnDiscreteGpu=false
X-KDE-SubstituteUID=false
X-KDE-Username=

I’m presuming this :point_down:

and

…is actually your users home directory, the same as can be obtained with:

echo $HOME

…and not just

/home/user

It’s autogenerated, and looks pretty innocuous anyway.

How is it autogenerated? Because that wasn’t my question.

Looks can be deceiving, as you should know. And that, in fact, looks like a pretty generic path, so it might not even exist, which would explain it not executing. Hence my asking…

Autogenerated while adding the script manually to Startup and Shutdown > Autostart, under Login Scripts. The path exists.

Then I don’t know. Everything is the same a mine. I’ve just checked. All I can recommend is removing any and all aliases ad/or relative paths. For example,. if you have something ike this:

Exec=~/documents/startup/script.sh

Instead use this:

Exec=/home/user/documents/startup/script.sh

And don’t use any aliases.

Further than that, I can’t help. Sorry.

:sob:

Could it be permissions or user groups?

I’m guessing it’s possible. Maybe. :man_shrugging:

Let’s see the output of:

cat /etc/passwd

Please also provide the output of:

ls /home

as well as

echo $HOME

…and

cat ~/.config/autostart/org.moson.matray.desktop

Note:

I really don’t know what the problem could be, so I’m taking guesses here. Thus, this might be pointless after all.

ᐅ cat /etc/passwd
root:x:0:0::/root:/bin/bash
nobody:x:65534:65534:Nobody:/:/usr/bin/nologin
dbus:x:81:81:System Message Bus:/:/usr/bin/nologin
bin:x:1:1::/:/usr/bin/nologin
daemon:x:2:2::/:/usr/bin/nologin
mail:x:8:12::/var/spool/mail:/usr/bin/nologin
ftp:x:14:11::/srv/ftp:/usr/bin/nologin
http:x:33:33::/srv/http:/usr/bin/nologin
systemd-coredump:x:981:981:systemd Core Dumper:/:/usr/bin/nologin
systemd-network:x:980:980:systemd Network Management:/:/usr/bin/nologin
systemd-oom:x:979:979:systemd Userspace OOM Killer:/:/usr/bin/nologin
systemd-journal-remote:x:978:978:systemd Journal Remote:/:/usr/bin/nologin
systemd-resolve:x:977:977:systemd Resolver:/:/usr/bin/nologin
systemd-timesync:x:976:976:systemd Time Synchronization:/:/usr/bin/nologin
tss:x:975:975:tss user for tpm2:/:/usr/bin/nologin
uuidd:x:68:68::/:/usr/bin/nologin
dhcpcd:x:974:974:dhcpcd privilege separation:/:/usr/bin/nologin
dnsmasq:x:973:973:dnsmasq daemon:/:/usr/bin/nologin
rpc:x:32:32:Rpcbind Daemon:/var/lib/rpcbind:/usr/bin/nologin
avahi:x:971:971:Avahi mDNS/DNS-SD daemon:/:/usr/bin/nologin
cups:x:209:209:cups helper user:/:/usr/bin/nologin
flatpak:x:970:970:Flatpak system helper:/:/usr/bin/nologin
geoclue:x:969:969:Geoinformation service:/var/lib/geoclue:/usr/bin/nologin
git:x:968:968:git daemon user:/:/usr/bin/git-shell
nm-openconnect:x:967:967:NetworkManager OpenConnect:/:/usr/bin/nologin
nm-openvpn:x:966:966:NetworkManager OpenVPN:/:/usr/bin/nologin
ntp:x:87:87:Network Time Protocol:/var/lib/ntp:/bin/false
openvpn:x:965:965:OpenVPN:/:/usr/bin/nologin
polkitd:x:102:102:PolicyKit daemon:/:/usr/bin/nologin
rtkit:x:133:133:RealtimeKit:/proc:/usr/bin/nologin
saned:x:964:964:SANE daemon user:/:/usr/bin/nologin
sddm:x:963:963:Simple Desktop Display Manager:/var/lib/sddm:/usr/bin/nologin
usbmux:x:140:140:usbmux user:/:/usr/bin/nologin
alexey:x:1000:1000:Alexey:/home/alexey:/usr/bin/zsh
rpcuser:x:34:34:RPC Service User:/var/lib/nfs:/usr/bin/nologin


ᐅ ls -al /home
total 12
drwxr-xr-x  3 root   root   4096 Jun  8 17:41 .
drwxr-xr-x 17 root   root   4096 Nov  9 14:22 ..
drwx------ 30 alexey alexey 4096 Nov 12 13:20 alexey


ᐅ echo $HOME
/home/alexey


ᐅ cat ~/.config/autostart/org.moson.matray.desktop
[Desktop Entry]
Terminal=false
Name=matray
Type=Application
Categories=Network;News;TrayIcon;
Exec=/usr/bin/matray --delay
Icon=matray
Comment=A Manjaro Linux announcements notification app


ᐅ groups
sys network power lp wheel alexey

:bangbang: :bangbang: AHA :bangbang: :bangbang:

Exactly as I mentioned.

This shows that neither:

…nor:

Is correct, which would explain why it’s not working. So edit the file:

nano ~/.config/autostart/ibus.sh.desktop

And correct those paths to:

Exec=/home/alexey/.config/autostart/ibus.sh

…and

Path=/home/alexey/.config/autostart

…respectively.

Followed by saving the file, Ctrl+O, YEnter.

And exiting nano Ctrl+X.

Or use any other editor you’re comfortable with.

Followed by a reboot and seeing if it works.

Hope it does.

I’m sorry. user is just alexey, edited by hand in the post :blush:

Well, you shouldn’t have edited anything, anywhere. Because, as is obvious here, all things are connected and making a mistake, either by a lack of knowledge or because something is forgotten is very easy!

Anyway, then repost the requested info without editing out anything by hand.

Nothing suspicious otherwise? I’m having News available icon in my tray right now, by the way. That’s org.moson.matray.desktop working, I take it.

Correct. That’s why I know the autostart itself works, nothing wrong with that and why I continue to suspect a path issue somewhere.