本文介绍了在KDE中,我该如何自动分辨出哪个“桌面" Konsole终端在吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有多个桌面",可以在KDE Linux环境中在不同的任务之间切换.如何自动确定Konsole(kde控制台)窗口显示在哪个桌面上?

I have multiple "desktops" that I switch between for different tasks in my KDE Linux environment. How can I automagically determine which desktop my Konsole ( kde console) window is being displayed in?

我在公司环境中使用KDE 3.4

I'm using KDE 3.4 in a corporate environment

这与编程有关.我需要以编程方式(又称自动)确定用户所在的桌面,然后通过python脚本与该桌面中的X Windows进行交互.

This is programming related. I need to programatically (a.k.a. automagically ) determine which desktop a user is on and then interact with X windows in that desktop from a python script.

我应该绕开所有与编程无关的Microsoft IDE问题吗? Win32编程"问题怎么样?我也应该尝试关闭它们吗?

Should I go around and nuke all Microsoft IDE questions as not programming related? How about Win32 "programming" questions? Should I try to close those too?

推荐答案

使用dcop(kde桌面通讯协议),您可以轻松地使当前桌面执行

With dcop, the kde Desktop COmmunication Protocol, you could easily get current desktop executing

  dcop kwin KWinInterface currentDesktop

命令.如果您正在使用新的kde 4.x dcop,则不再使用dcop,并且可以将命令转换为DBUS调用.使用python API发送/获取dbous消息应该非常简单.

command. If you are working with new kde 4.x dcop is no more used, and you can translate the command to a DBUS call. It should be quite simple to send/get dbous messages with python apis.

对不起,我英语不好,埃米利奥(Emilio)

Sorry for my bad english,Emilio

这篇关于在KDE中,我该如何自动分辨出哪个“桌面" Konsole终端在吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-01 15:35