Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

notify-send not working for me in ubuntu 11.04 #10

Closed
InTheFiveByFive opened this Issue · 6 comments

4 participants

@InTheFiveByFive

Not quite sure of the cause of the issue. I can get notify-send to post a message if I manually run it from a terminal window, so the infrastructure is propertly set up. However whenever node-dev needs to send a notification, I see the notification output in the stdout of the terminal window but I don't see a notify-send message.

Repro Steps:

Install ubuntu 11.04
Install node.s v 0.5.0-pre, npm, and node-dev.
Install libnotify-dev (not sure if this step was necessary, many libnotify components were already installed)
Start a node program using command:
sudo node-dev WebServer.js

Results:

See log message in console like "[INFO] Started"

Expected:

See libnotify popup notification too, did not.

Environment check:
sudo notify-send "title" body"
results in a notification popup appearing as expected.

@freewil

I was having the same issue although I didn't look into it at all. Maybe the some of the argument flags got changed or something? I'm going to take a look tonight.

@hasenj

Doesn't seem to like the --image on the start of a line

$ ./notify.sh "title" "body"
./notify.sh: 15: --image: not found
@freewil

Looks like since upgrading Ubuntu there is a symlink now called growlnotify to notify-send although there is no --image option, only an -i, which was causing the error. Your patch fixes it :)

@hasenj

There's no 'growlnotify' symlink in Ubuntu. The problem is with the way which was used, for some reason:

$ if [ -x `which nonsenseicalcommand` ]; then echo 'yes'; fi
yes

Can't say I understand why it does that though.

@InTheFiveByFive

Thank you for this change. Now when I run node-dev using my own permissions, I get a nice notification as expected under ubuntu 11.04.

However if I run node-dev as an Upstart service under www-data permissions (see: http://kevin.vanzonneveld.net/techblog/article/run_nodejs_as_a_service_on_ubuntu_karmic/), I get an error:

GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

I can repro this same error using 'sudo -u wwwdata notify-send ...' from a terminal window independently of node-dev. I did a little investigation of notify-send's architecture and didn't see any discussions on 'cross-user-context' security, so it may be that this is simply out of scope of the design.

I'll try experimenting with 'sudo -u myself notify-send' from within notify.sh to see if this fugly hack may resolve the cross-permissions issue.

@fgnass
Owner

Closed by 8cd36ba

@fgnass fgnass closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.