By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,853 Members | 974 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,853 IT Pros & Developers. It's quick & easy.

Detect current virtual desktop

P: n/a
Hello Pythonists,

I'd like to write for myself a tiny program that counts time spent on each
virtual desktop (in GNOME). In order to do that, I need my program to
detect the current virtual desktop. I've googled for it for about one hour
and couldn't find any solution. The closest thing I found is set of
tutorials: http://www.pygtk.org/articles.html Unfortunately, none of them
answers my questions:

How to detect current virtual desktop in GNOME? How to detect a virtual
desktop change?

--
http://automatthias.wordpress.com
Aug 21 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Maciej Bliziński wrote:
How to detect current virtual desktop in GNOME? How to detect a virtual
desktop change?
Take a look at http://wallpapoz.sourceforge.net/
Harald
Aug 21 '06 #2

P: n/a
On Mon, 21 Aug 2006 12:52:59 +0200, Harald Karner wrote:
Maciej Bliziński wrote:
>How to detect current virtual desktop in GNOME? How to detect a virtual
desktop change?
Take a look at http://wallpapoz.sourceforge.net/
Harald, many thanks.

By the way, I have found the line of code I was interested in. It is
stunningly simple, just calls the xprop command:

os.popen('xprop -root _NET_CURRENT_DESKTOP').read()

--
http://automatthias.wordpress.com

Aug 21 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.