Ask Your Question
1

F26 Tiger VNC server still has blank screen.

asked 2017-07-12 13:18:42 -0600

estrauch gravatar image

The vncserver 'black screen' issue persists into Fedora 26. Here are the workarounds I've done so far. 1) Disable SELinux (setenforce 0) so I can get vncserver running using systemctl. 2) Login using 'GNOME on Xorg' for both server and client. 3) On the server, edit $HOME/.vnc/xstartup. Replace 'exec /etx/X11/xinit/xinitrc' with 'exec gnome-session'.

The vncviewer comes up with cursor working, but always a blank screen. This appears to be a GNOME display manager issue.

edit retag flag offensive close merge delete

Comments

Have you tried running it from the command line to see if there are any error messages?

ssieb gravatar imagessieb ( 2017-07-12 17:05:17 -0600 )edit

When I run vncserver :1 from command line, it works. When I run from systemctl, I get this error message in $HOME/.vnc/<hostname>:1.log Failed to import environment: Process org.freedesktop.systemd1 exited with status 1

estrauch gravatar imageestrauch ( 2017-07-13 00:27:27 -0600 )edit

I have exactly the same issue just like estrauch in Fedora 28. Exactly the same error. VNC server starts fine from the command line, but black screen from systemctl, crontab, rc.local ... Switching to lightdm or other display manager does not resolve the issue. Plasma/KDE VNC sessions starts up just fine with systemctl.

ChenS gravatar imageChenS ( 2018-08-15 00:45:02 -0600 )edit

4 Answers

Sort by ยป oldest newest most voted
1

answered 2017-07-13 00:43:30 -0600

ssieb gravatar image
edit flag offensive delete link more

Comments

1

This bugzilla thread provides a patch for the SELinux problem. I'm just disabling SELinux for now using 'setenforce 0' command. Additionally, it suggests adding Environment=XDGSESSIONTYPE=x11 to vncserver@.service file. I tried that but still same problem, i.e. "Failed to import environment: Process org.freedesktop.systemd1 exited" message in .vnc/<host>:1.log file. Running vncserver from command line works just fine, but not from systemctl. It appears the problem may be that systemctl tries to run vncserver as root, as I get the sudo password prompt.

estrauch gravatar imageestrauch ( 2017-07-13 10:57:19 -0600 )edit
1

Did you run systemctl daemon-reload after changing the service file? If you didn't, the changes won't be used.

ssieb gravatar imagessieb ( 2017-07-13 13:01:04 -0600 )edit

yes I did this.

estrauch gravatar imageestrauch ( 2017-07-14 08:02:24 -0600 )edit
0

answered 2017-07-13 11:33:53 -0600

mfoged gravatar image

I had the same issue on CentOS 7 until a few days ago. I had also put the line EXEC=gnome-session but changed it to gnome-session &

this is my xstartup file: unset SESSIONMANAGER unset DBUSSESSIONBUSADDRESS exec /etc/X11/xinit/xinitrc gnome-session &

As you can see from below I use SELinux, as it's a bad idea to disable it. SELinux status: enabled SELinuxfs mount: /sys/fs/selinux SELinux root directory: /etc/selinux Loaded policy name: targeted Current mode: enforcing Mode from config file: enforcing Policy MLS status: enabled Policy deny_unknown status: allowed Max kernel policy version: 28

edit flag offensive delete link more

Comments

Changing 'exec gnone-session' to just 'gnone-session' in startup did fix error message "Failed to import environment". Still blank screen.

estrauch gravatar imageestrauch ( 2017-07-14 08:06:11 -0600 )edit

when logged in with vncviewer, have you tried to hit <enter>? That's the only way I can invoke the Gnome login screen on CentOS 7.

mfoged gravatar imagemfoged ( 2017-07-16 09:24:56 -0600 )edit

I have tried all this but does not work. "hit <enter> " does not get out of black screen.

ChenS gravatar imageChenS ( 2018-08-15 00:48:27 -0600 )edit
0

answered 2017-09-12 12:59:17 -0600

emike gravatar image

So far as I can tell, starting from the command line works, starting from systemctl does not:

emike 1932 1 0 03:22 ? 00:00:00 /usr/libexec/gnome-session-binary emike 2684 1 0 03:24 pts/0 00:00:00 /usr/libexec/gnome-session-binary

The gnome-session-binary on pts/2 was started from "vncviewer :2" on the command line. The other gnome-session-binary was started by 'systemctl start vncviewer#:1.service"

Further proof, "DISPLAY=:1 gnome-shell" from the command line will get the blank screen working.

From the .vnc logs for both :1 (blank) and :2 (working, command line) is this:

< Failed to import environment: Process org.freedesktop.systemd1 exited with status 1

Likely because there is no controlling tty. This is a bug. Don't know what the workaround would be.

emike at emike.org

edit flag offensive delete link more
0

answered 2017-09-12 13:04:07 -0600

emike gravatar image

updated 2017-09-12 13:20:13 -0600

From what I can tell, vncserver failes when started from 'systemctl' but works when started from the command line.

I did both and checked gnome-session-binary:

emike 1932 1 0 03:22 ? 00:00:00 /usr/libexec/gnome-session-binary

emike 2684 1 0 03:24 pts/0 00:00:00 /usr/libexec/gnome-session-binary

The one on pts/0 was started from the command line. The other from systemctl.

Under the one started from the command line, there is a 'gnome-shell'. Not under the other. Also, a diff of the log files (:1 systemctl and :2 command line) the only noteable difference is:

< Failed to import environment: Process org.freedesktop.systemd1 exited with status 1

I can assume that this is because there is no controlling tty. This is definitely a bug. I don't yet know of a workaround.

Hope this helps.

emike

edit flag offensive delete link more

Comments

emike, I agree with you totally. I have been trying to find a way to start the VNC server session at boot up with tty, but no luck. I still do not know a way to workaround.

ChenS gravatar imageChenS ( 2018-08-15 00:50:13 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-07-12 13:18:42 -0600

Seen: 8,269 times

Last updated: Sep 12 '17