博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
kde gnome_KDE Apps如何在GNOME下运行?
阅读量:2507 次
发布时间:2019-05-11

本文共 3144 字,大约阅读时间需要 10 分钟。

kde gnome

kde gnome

how-are-kde-apps-able-to-run-under-gnome-00

The visual differences between the GNOME and KDE desktop environments are easy to see, so how is it possible to run an app from one under the other without problems? Today’s SuperUser Q&A post has the answer.

GNOME和KDE桌面环境之间的视觉差异很容易看到,因此如何在没有问题的情况下从一个另一个运行一个应用程序呢? 今天的“超级用户”问答页面有答案。

Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.

今天的“问答”环节由SuperUser提供,它是Stack Exchange的一个分支,该社区是由社区驱动的Q&A网站分组。

‘Shaking Hands’ clipart courtesy of .

“握手”剪贴画由 。

问题 (The Question)

SuperUser reader LeNoob wants to know how KDE apps are able to run under GNOME:

超级用户读者LeNoob想知道KDE应用程序如何在GNOME下运行:

If GNOME uses GTK+ and KDE uses Qt, how are KDE applications able to run under GNOME?

如果GNOME使用GTK +,而KDE使用Qt,那么KDE应用程序如何在GNOME下运行?

What makes it possible for KDE apps to run smoothly under GNOME?

怎样使KDE应用程序在GNOME下顺利运行?

答案 (The Answer)

SuperUser contributor grawity has the answer for us:

超级用户贡献者的感谢为我们提供了答案:

This is possible because these desktop environments use the same graphics system, X11. All graphical programs only talk the X11 protocol with an X server (usually Xorg), sending commands to draw this or that, and receiving input events (mouse, keyboard, etc.).

这是可能的,因为这些桌面环境使用相同的图形系统X11。 所有图形程序仅与X服务器(通常为Xorg)使用X11协议,发送命令来绘制此图形或图形,并接收输入事件(鼠标,键盘等)。

Each UI toolkit like GTK or Qt comes in the form of libraries that the graphical program links against. A program written for GNOME will use libgdk and libgtk, and a KDE program will use libQtCore with libQtGui. Both toolkits then simply use the same X11 functions to draw everything in the respective program’s window.

每个UI工具包(例如GTK或Qt)都以图形程序链接到的库的形式出现。 为GNOME编写的程序将使用libgdklibgtk ,而KDE程序将使用libQtCorelibQtGui 。 然后,两个工具箱都使用相同的X11函数在相应程序的窗口中绘制所有内容。

Most modern toolkits, like GTK, Qt, or EFL, perform all drawing themselves, and just send the finished image of the whole window over X11. Older toolkits like Xaw or Motif instead send commands to draw primitives like lines or rectangles, and the X server does all rendering.

大多数现代工具包,例如GTK,Qt或EFL,都可以自己执行所有绘图,并仅通过X11发送整个窗口的完成图像。 Xaw或Motif等较旧的工具箱会发送命令来绘制线条或矩形之类的图元,而X服务器会进行所有渲染。

The X11 protocol also covers window management, so each desktop environment will have a “window manager” program which draws window frames (“decorations”), allows you to move and resize windows, and so on. Modern “compositing” window managers actually take over Xorg’s job of composing all windows onto the final screen image, allowing things like shadows or effects to be added.

X11协议还涉及窗口管理,因此每个桌面环境都将有一个“窗口管理器”程序,该程序绘制窗口框架(“装饰”),允许您移动和调整窗口大小,等等。 现代的“合成”窗口管理器实际上接管了Xorg的工作,即将所有窗口合成到最终的屏幕图像上,从而允许添加阴影或效果之类的东西。

Tying into the same graphics system for easy “compatibility” is an awesome thing, and great when you want to have all your favorite apps running under the same desktop environment!

将相同的图形系统捆绑在一起以实现轻松的“兼容性”是一件了不起的事情,当您希望所有喜欢的应用程序在相同的桌面环境下运行时,那就太好了!



Have something to add to the explanation? Sound off in the comments. Want to read more answers from other tech-savvy Stack Exchange users? .

有什么补充说明吗? 在评论中听起来不错。 是否想从其他精通Stack Exchange的用户那里获得更多答案? 。

翻译自:

kde gnome

转载地址:http://axkwd.baihongyu.com/

你可能感兴趣的文章
AI算法连载21:统计之概率图模型
查看>>
清华学生计划表,大写的服!
查看>>
数学公式、可视化图齐齐上阵,神经网络如何一步步走向最优化「看得见」!...
查看>>
物理史2000年来最豪华阵容也是最为精彩的对决!
查看>>
北京大学姜伯驹院士:让数学之美走入生活
查看>>
90后女博士任985高校特聘教授,这次有点不一样
查看>>
收下我的膝盖!盘点世界上最牛的五篇博士论文
查看>>
治病花了130万才明白:不要轻易买保险
查看>>
科研牛人是如何看文献的?
查看>>
王飞跃答《新智元》人工智能20问
查看>>
博士最“惨”能到什么程度?
查看>>
Gartner发布2020年十大战略科技发展趋势
查看>>
7年工作经验,面试官竟然让我写算法题?
查看>>
中国科学院院士徐宗本:人工智能的基石是数学
查看>>
全家都是博士是一种什么样的体验?
查看>>
专访图灵奖得主:完全自动驾驶是计算机接近人类智能的一大步
查看>>
加州理工学院对高超声速飞行的早期研究
查看>>
“老鹰捉小鸡”小学数学题碾压成人智商,这样的题目有什么意义?
查看>>
达文西画中的数学密码
查看>>
如何在 LeetCode 高效刷题,才能拿到一线大厂 Offer
查看>>