You are not logged in.

#1 2018-02-27 14:30:39

Lockheed
Member
Registered: 2010-03-16
Posts: 1,512

[KDE Plasma] Can't make autostart script work

I can't seem to make a script start at KDE Plasma desktop login.

I tried adding it to System Settings/Autostart
I tried symlinking it into /home/juha/.config/plasma-workspace/env/

And nothing happens. Every time I login I have to go into script folder and doubleclick it so that it runs.

Offline

#2 2018-02-27 14:42:04

Xabre
Member
From: Serbia
Registered: 2009-03-19
Posts: 749

Re: [KDE Plasma] Can't make autostart script work

Bit hard to tell without the script itself, but let's check the basics: did you make the script executable (+x)?

Last edited by Xabre (2018-02-27 14:42:21)

Offline

#3 2018-02-27 14:47:13

Lockheed
Member
Registered: 2010-03-16
Posts: 1,512

Re: [KDE Plasma] Can't make autostart script work

Xabre wrote:

Bit hard to tell without the script itself, but let's check the basics: did you make the script executable (+x)?

Yes. As I mentioned, clicking it runs it. And it also autostarts just fine in Openbox.

Offline

#4 2018-02-27 16:41:32

MichaelTunnell
Member
Registered: 2014-07-28
Posts: 14
Website

Re: [KDE Plasma] Can't make autostart script work

please provide a screenshot of your system settings output but . . .

0. the script doesn't need permission to execute
1. Add Script button at the bottom
2. leave symlink checked
3. make sure it says Enabled
4. Startup as Run On value

Offline

#5 2018-02-27 21:19:51

Lockheed
Member
Registered: 2010-03-16
Posts: 1,512

Re: [KDE Plasma] Can't make autostart script work

MichaelTunnell wrote:

please provide a screenshot of your system settings output but . . .

0. the script doesn't need permission to execute
1. Add Script button at the bottom
2. leave symlink checked
3. make sure it says Enabled
4. Startup as Run On value

Yeah, that's exactly what I have:
https://i.imgur.com/7KRFr6X.png

Offline

#6 2018-02-27 23:48:14

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,409

Re: [KDE Plasma] Can't make autostart script work

Any reason you can't post your script here?

Last edited by V1del (2018-02-27 23:48:59)

Offline

#7 2018-02-28 00:01:20

Lockheed
Member
Registered: 2010-03-16
Posts: 1,512

Re: [KDE Plasma] Can't make autostart script work

/usr/bin/xscreensaver -no-splash &
xss-lock -- xscreensaver-command -lock &
xbindkeys &
xfce4-panel &
sh -c "sleep 3 && conky -c /home/juha/.conky/conkyrc_kde.lua" &
sh -c "sleep 5 && tilda" &
export PATH="$PATH:/home/juha/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/kf5/bin" &
setxkbmap pl &
upower -e &
sh -c "sleep 200 && thunderbird-gtk" &
sh -c "sleep 250 && SpiderOakONE --headless" &
#xgamma -rgamma 1 -ggamma 1 -bgamma 1 &
sh -c "sleep 10 && albert" &

Offline

#8 2018-02-28 12:12:55

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,409

Re: [KDE Plasma] Can't make autostart script work

I'd add an explicit shebang at the start. A few of those will also conflict with KDE daemons like the screen locker and upower unless you specifically disabled them for KDE. Why you'd want to start a xfce4-panel while on plasma is also a mistery but there's nothing inherently wrong with that, not entirely sure why you have so many sleeps.

You might also want  to check if something is written into the journal with e.g.

journalctl -b _PID=$pidofplasmashell

Offline

#9 2018-02-28 12:47:58

Xabre
Member
From: Serbia
Registered: 2009-03-19
Posts: 749

Re: [KDE Plasma] Can't make autostart script work

I think that your script starts too early, so to say. It's started, but entire plasma session is not up yet, and Kwin (which starts bit later during the startup process) overtakes screensaver and hotkeys, and rest of it might have similar issue with other respective KDE programs/services. Plsmashell itself does not handle those things that your script tries to.
Could also be completely wrong too.

Offline

#10 2018-03-17 11:27:26

Lockheed
Member
Registered: 2010-03-16
Posts: 1,512

Re: [KDE Plasma] Can't make autostart script work

Xabre wrote:

I think that your script starts too early, so to say. It's started, but entire plasma session is not up yet, and Kwin (which starts bit later during the startup process) overtakes screensaver and hotkeys, and rest of it might have similar issue with other respective KDE programs/services. Plsmashell itself does not handle those things that your script tries to.
Could also be completely wrong too.

I tried a new script

sh -c "sleep 8 && /home/juha/.scripts/startup_kde"

which starts the main script with delay. But it still does not work.

Offline

Board footer

Powered by FluxBB