Re: Info about active window

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I get the title of the application in use with the following script:
export XAUTHORITY=/home/$USUARIO/.Xauthority
export DISPLAY=:0
IDwindow=$(/usr/bin/xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)"| cut -d ' ' -f 5) /usr/bin/xwininfo -id ${IDwindow} | awk 'BEGIN {FS="\""}/xwininfo: Window id/{print $2}'

But I need to know not only the title of the active application but the application name and url or path to the file or site that is being used.

For example if the user is using Mozilla Firefox which he is accessing url?
If the user is editing a file with openoffice which the path to the file it is open?

How i can get this information?

Thanks,
Naira

Shaun McCance escreveu:
On Thu, 2009-08-13 at 16:39 -0300, Naira Kaieski wrote:
Hi,

I want monitoring the users that login em a workstation with Ubuntu 9.04.
I want monitor this with SNMP and a external script. This monitoring will be remote.

I want to monitor only those applications that are being used, especially the active application.

By gnome terminal i can get this information with:
WINDOWID=$(/usr/bin/xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)"| cut -d ' ' -f 5) /usr/bin/xwininfo -id $WINDOWID | awk 'BEGIN {FS="\""}/xwininfo: Window id/{print $2}' | sed 's/-[^-]*$//g'

But i want do a remote monitoring and the above commands don work, i have a message:
/usr/bin/xprop:  unable to open display ''
/usr/bin/xwininfo:  unable to open display ''

Use the -display option for xprop and xwininfo?

--
Shaun


_______________________________________________
gnome-list mailing list
gnome-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gnome-list

[Index of Archives]     [Fedora Desktop]     [Trinity Users]     [KDE]     [Gimp]     [Yosemite News]

  Powered by Linux