系统是Fedora 25.问题是vncviewer正在显示黑屏。相比之下,vnc包列表与vnc viewer正确显示的Fedora 24系统中的相同。使用相同的客户端系统来访问服务器。
已经审核并尝试了解决此问题的其他主题,特别是vnc包要求,$HOME//.vnc/xstartup permissions
以及xstartup脚本的建议。
下面是xstartup脚本:
#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec gnome-session
# --session=gnome-fallback
# exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
startx &
以下是systemctl status vncserver:
的输出vncserver@:2.service - Remote desktop service (VNC)
Loaded: loaded (/etc/systemd/system/vncserver@:2.service; enabled; vendor
preset: disabled)
Active: active (running) since Fri 2017-01-13 07:05:58 PST; 1h 18min ago
Process: 25119 ExecStop=/usr/bin/vncserver -kill %i (code=exited,
status=0/SUCCESS)
Process: 25152 ExecStart=/usr/bin/vncserver %i (code=exited,
status=0/SUCCESS)
Process: 25147 ExecStartPre=/usr/bin/vncserver -kill %i (code=exited,
status=2)
Main PID: 25161 (Xvnc)
Tasks: 186 (limit: 4915)
CGroup: /system.slice/system-vncserver.slice/vncserver@:2.service
├─25161 /usr/bin/Xvnc :2 -auth /home/dan/.Xauthority -desktop server:2
(dan) -fp catalogue:/etc/X11/fontpath.d -geometry 1024x
├─25168 /usr/bin/vncconfig -nowin
├─25170 /usr/libexec/gnome-session-binary
├─25177 dbus-launch --autolaunch 98c684d1ace64647a9df44e5b61d8590 --
binary-syntax --close-stderr
├─25178 /usr/bin/dbus-daemon --syslog-only --fork --print-pid 5 --
print-address 7 --session
├─25182 dbus-launch --exit-with-session /usr/libexec/gnome-session binary
├─25183 /usr/bin/dbus-daemon --syslog --fork --print-pid 5 --print-
address 7 --session
├─25191 /usr/libexec/at-spi-bus-launcher
├─25196 /bin/dbus-daemon --config-file=/usr/share/defaults/at-
spi2/accessibility.conf --nofork --print-address 3
├─25199 /usr/libexec/at-spi2-registryd --use-gnome-session
├─25203 /usr/libexec/gvfsd
├─25222 /usr/bin/gnome-keyring-daemon --start --components=secrets
├─25242 /usr/libexec/gnome-settings-daemon
├─25252 /usr/bin/pulseaudio --start --log-target=syslog
├─25296 /usr/libexec/tracker-extract
├─25301 /usr/libexec/tracker-store
├─25318 /usr/libexec/tracker-miner-apps
├─25320 /usr/libexec/evolution/evolution-alarm-notify
├─25324 /usr/libexec/deja-dup/deja-dup-monitor
├─25329 /usr/libexec/gsd-printer
├─25335 /usr/libexec/imsettings-daemon
├─25336 /usr/libexec/tracker-miner-user-guides
├─25378 abrt-applet
├─25418 /usr/libexec/tracker-miner-fs
├─25438 /usr/libexec/gvfs-udisks2-volume-monitor
├─25462 /usr/bin/seapplet
├─25529 /usr/libexec/gvfs-gphoto2-volume-monitor
├─25559 /usr/bin/ibus-daemon -r --xim
几年前有几个主题。这些已经过审查和尝试。它们似乎不适用于这种情况。
答案 0 :(得分:1)
你可以在这里找到答案:https://www.server-world.info/en/note?os=Fedora_25&p=desktop&f=6 - 就我的情况而言,在/home/USER/.vnc/xstartup
取代library(twitteR)
client_twitter_id <- "XXXXXXXXXXXXXXXXXXXXXX"
client_twitter_secret <- "XXXXXXXXXXXXXXXXXX"
twitter_token <- "XXXXXXXXXXXXXXXXXXX"
HeaderValue = paste0('Bearer ', twitter_token)
response = POST(
'https://api.twitter.com/token',
accept_json(),
authenticate(client_twitter_id, client_twitter_secret),
body = list(grant_type = 'client_credentials'),
encode = 'form',
verbose()
)
##token = content(response)$access_token
twitter_token <- "XXXXXXXXXXXXXXXXXXXXXXX"
HeaderValue = paste0('Bearer ', twitter_token)
consumer_key <- "XXXXXXXXXXXXXXXXXXXXXX"
consumer_secret <- "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
access_token <- "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
access_secret <- "XXXXXXXXXXXXXXXXXXXXXXXXXXX"
setup_twitter_oauth(consumer_key, consumer_secret, access_token, access_secret)
所以我使用gnome-session而不是mate-session,因为我正在使用gnome-desktop。 没有空白屏幕(等待一段时间直到传输)。
答案 1 :(得分:0)
我正在使用Fedora 27并遇到相同的问题“黑屏”。我尝试了很多“解决方法”,但都没有一个适合我。然后我切换到使用MATE桌面环境,并在几秒钟内使其工作。如果您在此问题上困扰了很长时间,我建议您尝试使用MATE桌面。
如果未安装MATE,则应安装MATE:
dnf -y group install "MATE Desktop"
here is the help of installing MATE. 如下更新xstartup。
#!/bin/sh
#def
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
exec /usr/bin/mate-session
记住要重新启动VNC服务,它应该可以工作。
#systemctl start vncserver@:1.service
希望对您有所帮助。
答案 2 :(得分:0)
要在〜/ .vcn /
中为xstartup添加配置的内容!/bin/sh
#
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
# exec /etc/X11/xinit/xinitrc
#
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
gnome-session &
答案 3 :(得分:-1)
我在F25中也遇到了gnome的问题。我刚刚修改了xstartup,如下所示,它开始运行良好:
#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
exec gnome-session
#exec /etc/X11/xinit/xinitrc