You are not logged in.

#1 2008-05-06 11:24:53

brickwedde.eu
Member
Registered: 2007-05-01
Posts: 9

zenity takes 100% CPU Time

When I run as root or normal User

zenity --notification --text="test"

The zenity process takes 100% Cpu time

System:

Arch 32bit gnome 2.22

Last edited by brickwedde.eu (2008-05-06 11:26:00)

Offline

#2 2008-05-07 00:40:43

tigrmesh
IRC Op
From: Florida, US
Registered: 2007-12-11
Posts: 794

Re: zenity takes 100% CPU Time

Hmm.  I don't get 100% cpu time when i run that.  I also am running gnome 2.22 on 32-bit.

Offline

#3 2008-05-07 21:58:59

dav7
Member
From: Australia
Registered: 2008-02-08
Posts: 674

Re: zenity takes 100% CPU Time

I have this same issue!!11

Don't ask me why though. It only happens when I use --notification...

Other icons (ie alert types) seem to work fine here.

-dav7

Last edited by dav7 (2008-05-07 21:59:18)


Windows was made for looking at success from a distance through a wall of oversimplicity. Linux removes the wall, so you can just walk up to success and make it your own.
--
Reinventing the wheel is fun. You get to redefine pi.

Offline

#4 2008-05-08 02:19:17

dav7
Member
From: Australia
Registered: 2008-02-08
Posts: 674

Re: zenity takes 100% CPU Time

I GOT IT... I think.

zenity --notification actually calls libnotify! I was trying out a script and suddenly realized something, because by chance dbus decided to take a break. Take a look at these two code fragments.

$ zenity --info --text "hello"
$ _
$ zenity --notification --text "hello"
libnotify-Message: Unable to get session bus: Failed to connect to socket /tmp/dbus-jmMdFXbznS: Connection refused
<hang>
<100% CPU usage>

I've figured out why: it's basic socket programming gone wrong. The notification part of zenity calls libnotify, tries to connect to libnotify's socket, and fails, using 100% CPU waiting for the connection to... end a stream that never started.

A possible solution is to just use notify-send.

-dav7

Last edited by dav7 (2008-05-09 00:27:30)


Windows was made for looking at success from a distance through a wall of oversimplicity. Linux removes the wall, so you can just walk up to success and make it your own.
--
Reinventing the wheel is fun. You get to redefine pi.

Offline

#5 2008-05-17 20:45:06

brickwedde.eu
Member
Registered: 2007-05-01
Posts: 9

Re: zenity takes 100% CPU Time

notify-send works, but requires notification-daemon neutral

Offline

Board footer

Powered by FluxBB