Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I would like to programmatically be able to communicate with the Window Manager in Gnome 3, using D-Bus. The tasks I would like to accomplish are:

  • listening for new windows
  • get window flags (e.g. skip pager flag)
  • get X window IDs
  • maximise, minimise windows
  • raise, lower windows
  • hide windows The aim is to create an task-bar-like application.

I know of tools such as xdotools or wmctrl, but those are very thorough tools: there are no listeners to find out if new windows have been instantiated / mapped, the latte works with window title strings.

I also tried using python-xlib, but lack of documentation or too technical documentation have made it very difficult to achieve anything.

It seems D-Bus would be appropriate for such actions. Can I use D-Bus to do this, is there a way to do this using Python? Could you provide examples?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

You would need a D-Bus-to-X11 interface in order to do this. There is no such thing.

share|improve this answer
    
Ok, so how do you listen to newly mapped windows, as with a new pop-up for instance? And what API would you use? Is a xdotool good enough to build a shell or do you need to use python-xlib perse? –  Benjamin Dec 23 '11 at 8:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.