You are not logged in.

#1 2011-11-15 09:19:21

OutOfPhase
Member
From: The Netherlands
Registered: 2007-03-13
Posts: 33

[RESOLVED] Script at KDE startup

I'm trying to run a script at KDE startup, I tried the following:

user.desktop file in:
$HOME/.config/autostart

or a all.sh file in:
$HOME/.kde4/Autostart

The former has my preference. I checked that these scripts and paths are present and enabled in KDE System Settings -> Startup and Shutdown but these files do not seem to be triggered by KDE. What could be the problem? If I double-click on the desktop file in a file explorer, then the script does get launched, so it does not seem the be a corrupt desktop file.


My desktop file:

[Desktop Entry]
Exec=sh -c "${HOME}/%/start/all.sh"
Hidden=false
Name=User Startup
Type=Application

Last edited by OutOfPhase (2011-11-20 21:34:25)

Offline

#2 2011-11-15 20:34:22

karper
Member
Registered: 2008-08-10
Posts: 52

Re: [RESOLVED] Script at KDE startup

You could try using the autostart kcm in systemsettings. By default, you should find that plasma-desktop (or netbook) and perhaps krunner are pre-enabled for autostarting. If you want to dig deeper, these files are being placed in .kde4/share/autostart/, not in the directories you've been trying. Try the GUI for easy set up. Or place your .desktop files in that directory and edit accordingly (using the already working .desktop files as a guide) to have it work.

Last edited by karper (2011-11-15 20:36:08)

Offline

#3 2011-11-15 23:11:37

OutOfPhase
Member
From: The Netherlands
Registered: 2007-03-13
Posts: 33

Re: [RESOLVED] Script at KDE startup

Actually, the default autostart path in systemsettings is $HOME/.kde4/Autostart/ (check for yourself in KDE System Settings -> Account Details -> Paths) and in in my case the plasma-desktop.desktop and plasma-netbook.desktop files are in the $HOME/.config/autostart folder. Even so, I tried $HOME/.kde4/share/autostart/ already and that didn't work either.

Offline

#4 2011-11-15 23:13:25

\〠/
Member
Registered: 2011-02-26
Posts: 29

Re: [RESOLVED] Script at KDE startup

OutOfPhase wrote:

$HOME/.kde4/Autostart

Is the script executable bit already on?

Offline

#5 2011-11-15 23:18:24

OutOfPhase
Member
From: The Netherlands
Registered: 2007-03-13
Posts: 33

Re: [RESOLVED] Script at KDE startup

\〠/ wrote:
OutOfPhase wrote:

$HOME/.kde4/Autostart

Is the script executable bit already on?


Yes, it is.

Offline

#6 2011-11-16 08:36:40

ilpianista
Fellow developer
Registered: 2007-10-06
Posts: 568
Website

Re: [RESOLVED] Script at KDE startup

Just symlink the script in `kde4-config --localprefix`/Autostart, works here.

Offline

#7 2011-11-20 21:33:25

OutOfPhase
Member
From: The Netherlands
Registered: 2007-03-13
Posts: 33

Re: [RESOLVED] Script at KDE startup

Ok, $HOME/.config/autostart never worked for me, but $HOME/.kde4/Autostart does if I put an actual shell script in there instead of a symlink which I did, which is odd as the KDE System Settings -> Startup and Shutdown also lists symlinks in $HOME/.kde4/Autostart.

Last edited by OutOfPhase (2011-11-20 21:33:41)

Offline

Board footer

Powered by FluxBB