Desktop (gb.desktop)
此类允许您使用基于
freedesktop standards 标准和 xdg-
xdg-utils 项目的与桌面无关的例程。
This class reimplements
Desktop
in
gb.qt4.
This class is static.
This class acts like a
read-only static array.
Inherited constants
Charset
|
QT和GTK+组件使用UTF-8字符编码。必须小心,因为操作系统可能使用不同的字符编码!
|
Static properties
Inherited static properties
Static methods
Inherited static methods
Is
|
Return if the current desktop has a specific type.
|
如果您使用 sudo 以 root 身份运行应用程序。
XDG 不会为 root 用户提供相同的结果,并且在尝试使用
gb.desktop 函数时可能会产生意外结果。
将 -E 与 sudo 一起使用可以帮助保留用户环境变量,使它们可以访问您的应用程序和 gb.desktop。
例如
# sudo -E $HOME/Myapp/Myapp.gambas