1
In KDE's Konsole, I can do the following from the terminal:
dcop kwin KWinInterface currentDesktop
And it will tell me which desktop my terminal is connected to
How can I determine what desktop number the current gnome terminal in a gnome session is connected to?
are you particularly looking for a commandline interface? – quack quixote – 2010-04-29T18:24:35.387
Preferably. Otherwise I can compile some code and have that return a number on the command line. The problem with compiling code is external dependencies. We have an old Linux environment and people always post code that depends on new APIs. – Ross Rogers – 2010-04-30T22:56:59.183