Run as root?

Asked by Azazello

Hi.
If i trying run this application as root, i am getting error:

** Message: pygobject_register_sinkfunc is deprecated (GstObject)
Traceback (most recent call last):
  File "/usr/bin/gm-notify", line 237, in <module>
    cm = CheckMail()
  File "/usr/bin/gm-notify", line 72, in __init__
    keys = keyring.Keyring("GMail", "mail.google.com", "http")
  File "/usr/lib/python2.6/dist-packages/gm_notify_keyring.py", line 9, in __init__
    self._keyring = gnomekeyring.get_default_keyring_sync()
gnomekeyring.IOError

Options:
sudo -u %username% gm-notify
su -l -H %username% -c "gm-notify"
were not the result.....

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu gm-notify Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Why are you running it as root!! It's MASSIVELY unsecured and COMPLETELY unnecessary

Revision history for this message
Ravi (asvravi) said :
#2

Are you on 10.04, with auto-login enabled?
If so, this may help
https://bugs.launchpad.net/ubuntu/+source/gnome-keyring/+bug/569667/comments/14

Revision history for this message
Azazello (azazello29) said :
#3

I have a script, which is run with the rights of root. In it, I need to run gm-notify. I tried to run this as a user, but could not do it.

Ravi, I am performed this instruction, but it did not help.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

gm-notify is an indicator item to show new emails in an google webmail account. Why does this need elevated access? How are you implementing gm-notify into a script?

Revision history for this message
Azazello (azazello29) said :
#5

gm-notify - is very good application, but it does not work under proxy. I am created simple script, which execute if plug\unplug LAN cable.

WORK=192.168.
HOME=10.10.
IP=`ifconfig eth0 | colrm 1 10 | awk -F "[: ]" '$1 ~ /^inet$/{print $3}' | cut -c1-6`
if [ $IP == $WORK ]
then
killall gm-notify
proxychains gm-notify
fi
if [ $IP == $HOME ]
then
killall gm-notify
proxychains gm-notify
fi

etc....

But i can run this script only as root....

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#6

https://bugs.launchpad.net/gm-notify/+bug/371878
It's a known bug for sure :)

You shoud use:

su user -c gm-notify

replace user with your username. E.g.

su andy -c gm-notify

and the command will execute as andy, much more secure

Revision history for this message
Azazello (azazello29) said :
#7

Unfortunaly, run through su or sudo does not work too...

root@tester-laptop:/home/tester# su tester -c gm-notify
** Message: pygobject_register_sinkfunc is deprecated (GstObject)

Session terminated, killing shell... ...killed.

Revision history for this message
ajmal_82 (ajmal-82) said :
#8

try this "sudo -s" then put password then try the script running if everything fails and you desperately want to run the script elevating your privileges then become administrator of the system.bye

Can you help with this problem?

Provide an answer of your own, or ask Azazello for more information if necessary.

To post a message you must log in.