You are not logged in.
Hey,
i recieve the above message every time i try tu run this script:
#!/bin/bash
# Should be placed in the /etc/wicd/scripts subfolder for connect.
ESSID=`iwconfig wlan0 |grep "ESSID"|sed -e 's/.*ESSID:"\(.*\)"/\1/'`
STRING='myESSIDwidget.text=" Connected to:<span color=\"green\"> '$ESSID'</span> | "'
echo -e $STRING | su martin awesome-client
The first line graps the connected ESSID using regular expressions.
The second is creating a string that will be executed in awesome later.
The last line pipelines the string into awesome-client using my personal user (if root does it, i get some weird d-bus error)
Can anyone help with this ? :-)
//Martin
Offline
"su" is expecting you to input the password for the user "martin" and it's telling you that you need it to be a tty (otherwise you could not enter the password )
Have a look at sudo
My blog: blog.marcdeop.com
Jabber ID: damnshock@jabber.org
Offline
Well that explains a lot...
Is there a way to supply it beforehand? Or have the command run from that user?
The problem lies in that if any other user than martin runs it, awesome-client will give some d-bus error about
the session being unable to connect.
Offline
Well that explains a lot...
Is there a way to supply it beforehand? Or have the command run from that user?The problem lies in that if any other user than martin runs it, awesome-client will give some d-bus error about
the session being unable to connect.
As Damnshock already said: Have a look at sudo. You can configure the rights on a per-user basis, so that e.g. 'martin' would be able to execute the 'awesome-client' without having to enter a password.
A cause for the error when trying to run as a different user might be dbus. Do you have the dbus in your rc.conf DAEMONS Array and following line in your .xinitrc?
exec ck-launch-session [your environment here]
The wicd wiki entry also has a section on this problem: clickme
Last edited by n0stradamus (2011-12-12 16:42:11)
Offline