基本上,我不完全了解 GNOME 整个系统是如何运作的。
正如标题所示,我目前正在使用TigerVNC启动 GNOME 桌面,这与我使用物理屏幕登录时的原始 GNOME 是分开的。
这是我的~/.vnc/xstartup
脚本(xstartup
):我通过vncserver -verbose -localhost yes :2
#!/bin/sh
# Change "GNOME" to "KDE" for a KDE desktop, or "" for a generic desktop
MODE="GNOME"
#Uncommment this line if using Gnome and your keyboard mappings are incorrect.
# export XKL_XMODMAP_DISABLE=1
# Load X resources (if any)
if [ -e "$HOME/.Xresources" ]
then
xrdb "$HOME/.Xresources"
fi
export GNOME_SHELL_SESSION_MODE=ubuntu
# Try a GNOME session, or fall back to KDE
if [ "GNOME" = "$MODE" ]
then
if which gnome-session >/dev/null
then
# see /usr/share/gnome-session/sessions/ubuntu.session for more info
dbus-launch --exit-with-session gnome-session --session=ubuntu --debug &
else
MODE="KDE"
fi
fi
# Try a KDE session, or fall back to generic
if [ "KDE" = "$MODE" ]
then
if which startkde >/dev/null
then
startkde &
else
MODE=""
fi
fi
# Run a generic session
if [ -z "$MODE" ]
then
xsetroot -solid "#DAB082"
x-terminal-emulator -geometry "80x24+10+10" -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &
fi
我是 GNOME 整个系列的新手。
希望有人能给我一些建议!
我也尝试过dbus-launch --exit-with-session gnome-session --session=ubuntu --debug &
用替换dbus-launch --exit-with-session gnome-shell &
。
事实证明图标又回来了,但我的Settings
窗口却是空白的。
错误消息来自tigervnc
:
Thu Jan 28 22:13:02 2021
vncext: VNC extension running!
vncext: Listening for VNC connections on local interface(s), port 5902
vncext: created VNC server for screen 0
GNOME Shell-Message: 22:13:02.986: Telepathy is not available, chat integration will be disabled.
Gjs-Message: 22:13:03.130: JS WARNING: [/usr/share/gnome-shell/extensions/[email protected]/appIcons.js 1028]: unreachable code after return statement
Gjs-Message: 22:13:03.159: JS WARNING: [resource:///org/gnome/shell/ui/workspaceThumbnail.js 891]: reference to undefined property "_switchWorkspaceNotifyId"
(gnome-shell:15336): Bluetooth-WARNING **: 22:13:03.209: Could not create bluez object manager: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 2 matched rules; type="method_call", sender=":1.6794" (uid=1001 pid=15336 comm="gnome-shell " label="unconfined") interface="org.freedesktop.DBus.ObjectManager" member="GetManagedObjects" error name="(unset)" requested_reply="0" destination=":1.2" (uid=0 pid=1025 comm="/usr/lib/bluetooth/bluetoothd " label="unconfined")
GNOME Shell-Message: 22:13:03.384: Error looking up permission: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for geolocation
(gnome-shell:15336): AccountsService-WARNING **: 22:13:03.577: Could not get current seat: No data available
我也遵循了Arch Linux-TigerVNC
即将此文件添加进~/.vnc/config
和删除xstartup
脚本。
session=ubuntu
geometry=1920x1080
localhost
alwaysshared
不幸的是,我的图标仍然与原来的 GNOME 桌面不同 :(
这是我当前的主题:
$ gsettings get org.gnome.desktop.interface icon-theme
'Adwaita'
我不知道这是否是由Adwaita
图标引起的。例如,这是我的/usr/share/applications/org.gnome.Terminal.desktop
[Desktop Entry]
Name=Terminal
Comment=Use the command line
Keywords=shell;prompt;command;commandline;cmd;
TryExec=gnome-terminal
Exec=gnome-terminal
Icon=utilities-terminal
Type=Application
X-GNOME-DocPath=gnome-terminal/index.html
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-terminal
X-GNOME-Bugzilla-Component=BugBuddyBugs
X-GNOME-Bugzilla-Version=3.28.2
Categories=GNOME;GTK;System;TerminalEmulator;
StartupNotify=true
X-GNOME-SingleWindow=false
OnlyShowIn=GNOME;Unity;
Actions=new-window
X-Ubuntu-Gettext-Domain=gnome-terminal
NoDisplay=true
[Desktop Action new-window]
Name=New Terminal
Exec=gnome-terminal
我发现./Adwaita/scalable/apps/utilities-terminal-symbolic.svg
其基本名称不是utilities-terminal
答案1
最后,我通过以下方法解决了这个问题,apt install -y gnome-tweaks
并调整了icon-theme
后台,Ubuntu-mono-dark
然后我的图标又回来了。我发现丢失图标的问题是一个特征对于Adwaita
图标主题而不是错误。
但我从未换过org.gnome.desktop.interface icon-theme
主题。我仍然想知道为什么org.gnome.desktop.interface icon-theme
突然改变了(并且这些变化只发生在我gnome-session
从 VNC 查看器查看时,而物理 GNOME 完好无损。)(也许是因为我的kill
进程gnome
导致所有设置都变成了默认设置(Awaita
似乎是 gnome 的默认设置)?)
答案2
基本 Ubuntu 桌面安装中提供的 Gnome 图标集不完整。请尝试安装 gnome-icon-theme 包。我在设置 Numix 主题时偶然发现了这个问题,该主题依赖于一些缺失的 Gnome 图标。