You are not logged in.

#1 2011-09-27 08:51:44

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

WICD scripts

I am trying to use two different scripts when WICD connects through eth0 and wlan0. This is one of them:

#!/bin/bash
cp /home/juha/.conkyrceth /home/juha/.conkyrc && killall -SIGUSR1 conky

The method of adding a script to /eth/wicd/scripts/ folder was too complicated, but I found a variable "afterscript" in wireless-settings.conf and wired-settings.conf.

I tried changing it to

afterscript = /home/jj/bin/wicd-conky.sh

as well as

afterscript = sh /home/jj/bin/wicd-conky.sh

but they just don't run upon connection. How can I make this work?

Offline

#2 2011-09-27 09:05:12

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: WICD scripts

According to the documentation, those scripts need to be in a directory that only root can write to:

conf file wrote:

afterscript = <None|arbitrary_script>
    This defines a script to run after Wicd brings up the connection. The script should be a Bourne-compatible script and should be executable.
    IMPORTANT - scripts should ONLY be writable by root and located in a directory that is only writable by root.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2011-09-27 09:24:14

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

Re: WICD scripts

Yeah, I read that. If you refer to "only in location available to root, then I don't see a reason why would it prevent running it.
You also do not state which of the two methods of configuring the .conf files is correct.

Offline

#4 2011-09-28 17:57:48

McDoenerKing
Member
From: Germany
Registered: 2010-06-21
Posts: 59

Re: WICD scripts

@Lockheed
Wicd checks the script folder for the user rights, so that no one could have secretly changed your scripts. It would be a huge security issue, if it wouldn't check before executing.

Offline

#5 2011-09-28 20:12:12

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

Re: WICD scripts

Ok., but how do I call the script it in the conf file? Which way is the correct one?

Last edited by Lockheed (2011-09-28 20:12:29)

Offline

Board footer

Powered by FluxBB