Registered Member
|
Adding a script to the Autostart module doesn't seem to work.
If I close and reopen the module, my script isn't shown. Also, if the script did run it would need to wait for my WLAN to connect. Any help would be appreciated |
Global Moderator
|
Is the script executable? For the WLAN problem you could use sleep to wait a certain period until it is connected.
BTW, this has nothing to do with suspend or hibernate, does it?
Debian testing
|
Registered Member
|
No, the script is what I enter manualy each day in Terminal.
I checked in .kde/Autostart and there seems to be an appropriate file containing:- [Desktop Entry] Icon=unknown Name=get_iplayer%20--type=radio Type=Link URL[$e]=get_iplayer%20--type=radio Hope this helps |
Global Moderator
|
Hm, not sure about this.
For the script to work from autostart it has to be in your PATH and be executable. My ~/.kde4/Autostart is empty so I don't know what those entries look like. Google should be helpful on that front.
Debian testing
|
Registered Member
|
I had a similar problem and found only full paths worked. Shortcuts like '~' didn't. Same applied to options like adding a path to a config file to a command.
|
Registered Member
|
You should use Exec= instead of URL=. Your .desktop should look like this: [Desktop Entry] Name=get_iplayer Type=Application Exec=$HOME/bin/get_iplayer --type=radio X-KDE-StartupNotify=false X-KDE-autostart-phase=2 Since you want it to start your script when there is a connection you can use Plasma NM's notification system instace of autostart. Just go to "Manage Connections" -> "Other" -> "Configure Notifications". Select "Network Connection Succeeded", check "Run command", select your script and click in "Apply". You can uncheck all other events (for example "Show a message in a popup" is the default event) if you do not need them. That works for user connections (the default in Plasma NM). For system connections you will have to copy your script to /etc/NetworkManager/dispatcher.d/ and edit it to be run only on connection starts. dispatcher.d also works for user connections, but as you can see there is no GUI to configure it.
Software engineer at Petrobrás http://www.petrobras.com.br/en/about-us/
KDE's Network Management maintainer |
Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]