У нас есть четыре библиотеки:
libcairomm-1.0.so.1 libgiomm-2.4.so.1 libglibmm-2.4.so.1 libsigc-2.0.so.0Попробуйте переустановить их пакеты с помощью следующей команды:
sudo apt-get install --reinstall libcairomm-1.0-1v5 libglibmm-2.4-1v5 \
libsigc++-2.0-0v5
Затем проверьте их связь:
ldd /usr/lib/x86_64-linux-gnu/libcairomm-1.0.so.1 | grep not
ldd /usr/lib/x86_64-linux-gnu/libgiomm-2.4.so.1 | grep not
ldd /usr/lib/x86_64-linux-gnu/libglibmm-2.4.so.1 | grep not
ldd /usr/lib/x86_64-linux-gnu/libsigc-2.0.so.0 | grep not
Хорошо, так что получается, что переключение окон очень просто.
#!/usr/bin/env python # This code will focus the window with integer id 67108870 # Tips: you can get that with xwininfo -int # wnck is used for window management import wnck # time is needed because wnck requires it import time # Get information about windows, workspaces, etc from the X server wnck.screen_get_default() # Get a reference to the window we want to focus # by providing an integer xid the_win = wnck.window_get(67108870) # activate the window, providing an int timestamp the_win.activate(int(time.time())Я улучшу этот ответ, когда узнаю.