-
Notifications
You must be signed in to change notification settings - Fork 964
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TigerVNC server only getting black screen on connect #684
Comments
I'm working through VNC issues as well on Xubuntu, Ubuntu Mate, and Lubuntu 18.04. I think I have it mostly figured out so far for Mate. My only guess I have for you is on the machine were you were getting the blank screen on with the configuration that ships with TigerVNC, was that you were also logged into the local GUI when you started the remote session. The configuration file that ships with TigerVNC works great with 16.04 but doesn't work in 18.04 when you're running multiple sessions for the same user (either local GUI with vnc session or multiple vnc sessions.) That may not be TigerVNC's fault, but a change in 18.04 that needs to be worked out. The change you made to the xstartup file seems to get around a dbus issue in 18.04 that the original xstartup file exposes. I'm using a very similar xstartup for Mate that also allows me to have multiple sessions for the same user. Looking at the log, I wouldn't be concerned with the errors (that's just my opinion.) John |
jmadams1, would you mind sharing your xstartup for Mate, so I can compare?
I ran across the logged-in-locally problem you're describing on my test machine, so I made sure not to log in on my production machine (even tried right after reboot launching the server via ssh then trying to connect), but it's still black. A few differences between my test machine and production machine that could be triggering this black screen issue:
These are total wild guesses. When I get a chance, I can try adding users to my test machine and see if I can get it to fail the same way. I'll also try setting it so all local users require typing a password first. I am kind of hoping that when the .deb files are made for 18.04 or when 1.9.x (or higher) is added to Ubuntu's repo, that this issue will just magically go away. |
Here's a working xstartup file for Ubuntu Mate 18.04: unset SESSION_MANAGER John |
Thank you for your xstartup file. From earlier: And Update: I still haven't tied adding more users to my test machine yet. |
Facing the same issue here, and I repeated all that you discussed in this thread and in #668. Additionally, I discovered that running I am running Desktop Ubuntu 18.04.1 on a desktop computer, and have configured another user. Both users have to enter passwords to log in. The
which works almost perfectly fine with It almost works perfectly with |
And the other thing I noticed was that I'm trying to enable remote login for both users on the machine, using the method in this SO question and answer I asked. I'm not sure starting |
Another update: I modified the Changing the |
I am working on a new, more systemd compatible, startup of vncserver. It sounds like it might solve the issues you guys are seeing. |
Hi! I also see a black screen on my Fedora |
+1 on getting the black screen on fedora 29. one difference I noted was that the xauthority file was different for both types of startup: |
+1 on the Fedora 29 black screen here too. |
FWIW, I have the same issue on a NetBSD node. I'm launching a VNC server at boot time, as a specific user. The applications and the window managers complain that they can't open the DISPLAY so I get a black screen. In the xstartup script, I circumvent the problem by testing the return status of the window manager (in my case, twm) and if there is an error, sleeping and restarting the Vnc server. What I don't get is why it fails the very first time and succeeds the next. I suspected that some system services were not fully launched but to no avail. Best regards to the developers. |
I had this issue too on ubuntu, and on my side it was the power management settings. |
On Thu, May 16, 2019 at 12:43:39AM -0700, etienne678 wrote:
I had this issue too on ubuntu, and on my side it was the power management settings.
after i set them to never turn off the screen this never happened again.
Thanks for the tip. I will try to see if in my case, on NetBSD, there is
a place during the boot sequence this could apply (now NetBSD is using a
framebuffer so perhaps before allowing to log the card is reset for the
VT).
Best,
--
Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
http://www.kergis.com/
http://www.sbfa.fr/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89 250D 52B1 AE95 6006 F40C
|
Can confirm still happening (the black screen) on Fedora 30. Very easy to reproduce:
|
Just a FYI, that method will probably never be supported. In general a modern Linux system doesn't allow multiple sessions as the same user. So the VNC session will need to be started as a service, and the user cannot be logged in locally. |
Is there another solution? Another vncviewer implementation? Perhaps x0vncviewer? One problem I've had is that I've been able to connect and view the remote desktop, but any subsequent windows that were created are displayed on the actual desktop, not my viewer virtual desktop. I can connect to the remote machine via ssh as a regular user, then run the following:
It then prints the following when I connect:
It then prompts me for my password three times - the first to "create a color profile", the second to "refresh the system repositories" and the third to again "create a color profile." After authenticating, it displays the standard display manager screen, but running an application like a terminal or the file manager appears to start, but apparently displays on the console display, not my virtual display. This is my ~/.vnc/xstartup file:
|
I'm afraid the issues you describe sound like other things.
You cannot be logged in locally and have a VNC session running at the same time. This is a limitation of modern Linux systems, and not us, so it's not something we can do much about.
This is a (well known) bug in your desktop environment. Please nag them. It seems we need to be a lot of us before they consider this a priority to fix. |
I've pushed my current working copy to #838 for those who want to see where things are heading. It still requires a lot of work, so it's not ready for general use quite yet. If you have any comments, please file them on the PR. |
This is still open, so I'm going to post my similar issue here. Let me know if I should move it. Issue: Connecting to TigerVNC server on Raspberry Pi 4 ("Rpi4") from any client leads to black screen on connect. Expected Behavior: View of the Rpi4's desktop. ** Settings**:
But I have tried at least 20 variants, including:
Others have recently posted similar issues. See here for example. I am starting the server via this command: All efforts lead to:
(B) a black screen on the client. |
I'm currently trying out xrdp + tigervnc + debian stretch + xfce. A black screen is the result of the lock screen. After it the screen is locked there seems no way to login again through vnc, the screen keeps black. |
I figured it out.... It runs x server on boot up. So, place your xinitrc somewhere it can be executed like in your home directory and chmod 777 it. Modify your /home/one/.vnc/xstartup to run the /home/one/xinitrc file. Also, make sure you have xterm installed because it needs a terminal emulator still. |
I have done the following to get the twm desktop manager on vnc screen: Here is the xstartup file content
mostly the options should only show tigervncserver as entries and choose the auto (0) mode by entering
Now the TigerVNCserver will be invoked and prompt for password. |
Finally I have got the success on Ubuntu 20.04 (gnome) $ sudo apt install tigervnc-standalone-server Permission: xstartup file: #!/bin/sh $ vncserver :1 -geometry 1680x1050 -depth 24 -localhost no Done.... |
This didn't work for me on Ubuntu 20.04. I am still getting a black screen when trying to use systemd to launch the vncserver. |
Help please`` |
As @dragonator4 said "$HOME/.Xresources is not created". I created the file and it worked as suggested in here: |
I have tested this solution but it doesn't work for me. |
@falconws the fact you seem to have a dock and a menu bar makes me think it's mostly working for you. What if you add an |
@chrisbitmead My xstartup script is below.
Are you said like this one?
|
@chrisbitmead |
You will probably find you can input to the xterm if you hover the mouse over it. If you can't see your mouse, move the imaginary mouse there. If I were you, I'd install another window manager like fvwm and see if it works with that instead of startxfce4, as a way to narrow it down. BTW, normally with xstartup scripts, the last command does not have an "&" after it. Your xsession ends when that program exits. Typically it is the window manager, or whatever program starts the window manager, but could be anything like xterm. |
@chrisbitmead I have tested this startup script
No difference result.
I can see the mouse cursor, and even if hover the mouse over xterm, can't input any character. I want to use xfce4 instead of fvwm... If not using systemd and manually execute vnc server run command via ssh session is working perfectly.
TigerVNC * systemd is so bad... |
I only suggested using fvwm as way of narrowing down where the problem might be, since fvwm is much simpler than xfce4. It's quite odd that vnc seems to run well enough to display some docks and xterms, but doesn't take input. I'd be tempted to try the TightVNC viewer to see if you get the same result. The other possibility is that xfce4 has gone into some screen lock or screen saver mode. I'd be disabling that in the xfce4 settings. Another reason to try the simplest possible setup to begin. If you don't want to install fvwm, just comment out startxfce4 leaving only xterm, and see if then you can input into it. If you can, then the problem is somewhere in xfce4. |
@chrisbitmead Thank you very much for your advice. Thanks. |
I have tested.
I can't input any operation, It seems like a freeze.
Yes. Is this xfce4 problem? fmm.... |
Maybe this is related. |
You've probably reached the end of my knowledge. I will say that I've personally also ended up with frustration trying to start guis from systemd for some reason. The only obvious advice I can give is either to forget xfce4 and go with something simpler like a plain window manager.... or... start xfce4 from an ssh script just before you login rather than systemd, or... don't use vnc. VNC is actually much inferior to xrdp. While some people might unfairly associate xrdp with Microsoft, it just plain works better, especially with multiple monitors. VNC is awful with multiple monitors, xrdp works great. I don't know if that will help your systemd issues, but rdp is the future, and vnc is no good. |
This is the xstartup file that worked for me on a Fedora 33 Mate-Compiz VM after initially experiencing a blank screen when attempting to connect: `#!/bin/sh unset SESSION_MANAGER |
For
|
God bless you, @reinzor, after wasting a day trying to get it working on 20.04 it's finally operational |
@reinzor I have tested but not working. |
I will relay my experience with this transition. Start TigerVNC, and connect to port 5901 (i.e. : 1) Note: I have not seen any impact from adding entries into my ~/.vnc/xstartup |
None of these solutions worked when launching TigerVNC via a systemd socket listener, tried Unity and Gnome with various xstartup configs accepted as solutions in various stackoverflow questions and those posted in this bug report, all resulted in nothing but a black screen. Nothing in the systemd logs but "success" connects, and nothing in the syslog but "success" notes from systemd in relation to the session. It's... just... broken. If it makes anyone feel any better, all TightVNC got me was a grey screen with the "X" mouse cursor from 2001-era Red Hat desktops. All these Ubuntu distress are basically a poor knockoff of Windows XP at this point. It won't start a second desktop session on a second monitor, it won't start one via VNC in a virtual TTY either. |
If you can get the "X" mouse cursor... it's probably working! You just don't have any apps running... you're especially missing a window manager. Find your startup script and run one. Recommend fvwm for testing, because it's simple and won't fail. Run an xterm as well, at least you'll then have a command prompt to start window managers / apps. fvwm & |
anyone was able to solve it? I'm facing the same issue. `#!/bin/bash how to build?---------------docker build -t orion-docker-runner:10.4.1 .how to run?-------------docker run -d --rm -p 5999:22 -p 5998:5901 orion-docker-runner:10.4.1 <-- deatacheddocker run -ti --rm -p 5999:22 -p 5998:5901 orion-docker-runner:10.4.1 <-- attachedstart_ssh() { } configure_vnc() {
} -- docker startup --configure_vnc && vncserver :1 -localhost no -geometry 1920x1080 -depth 32 && tail -f /dev/null && exec /usr/bin/xfce4-session` |
Seems one user can only start one kde desktop, the extras are black screen. Just now xdm and vnc show me the desktop, I think, is because I don't login to the desktop. Replace sddm to xdm fix the black screen problem, refert to this:
|
This might or might not help other people. Today I have been struggling for hours to get something other than the black screen with vnc (running tigervnc on the 22.04 system) by SSH access. Nothing appeared to work, until I connected an HDMI monitor to the headless system. Suddenly the active black vncviewer session popped to my desktop screen.... |
@zanco this reminds of different articles i read thats not possible to take screenshots if no display is connected. Xvfb might help in this case as it provides some sort of virtual display but i never used it on my own. |
Having the same issue when connecting via VNC to a user other than |
For those who have a working solution when launching via SSH, but cannot get it to work via systemd, I found the solution for this, and it seems pretty airtight -- https://unix.stackexchange.com/a/611494/444609 I compared the log output when running via SSH vs running via systemd, and observed that the difference was with the latter, we see the following message: Setting the "PAMName" option in the unit config should handle this -- but there appears to be bugs with it and systemd -- systemd/systemd#8598 So simply logging on as the user using normal su (vs SSH which is an unnecessary additional layer) in the command is the surefire way to go here. I had instant success using the solution outlined on the above stackexchange answer |
I don't think TigerVNC needs a reliance on the XDG_SESSION_TYPE or XDG_SESSION_ID variables, but since it apparently does, some sort of documentation around this would be beneficial. Edit: I also realize that this dependency could be coming from gnome and not TigerVNC... but I'm not 100% sure if the issue exists with other VNC clients and gdm, or if affects all VNC clients using gdm |
I've been stuck with a black screen since this year, anyone? |
@CBx86 Did you read the above thread? What did you try? |
This is an issue that has been resolved ages ago, and with a very generic description. It's not a productive place for new bug reports. Please use the discussion group to get help with debugging your setup. |
I have a production machine (recently built and many hours of configuration have been put into it), so I tried things on a different machine I had sitting around first.
I tried the suggestion in #668 and downloaded https://bintray.com/tigervnc/stable/download_file?file_path=tigervnc-1.9.0.x86_64.tar.gz unpacked and moved to /
On my testing machine, I was able to connect correctly. I repeated the same exact TigerVNC install process on my production machine, and when I connect I just get a black screen.
The text machine is Xubuntu 18.04, and the projection machine is Ubuntu server 18.04 with the Xubuntu desktop added on top (sudo apt-get install xubuntu-desktop) because I wanted to use the server's install wizard to configure RAID.
I did a bunch of searching and found a different xstartup suggested here instead of the default created the first time vncserver is run: https://wiki.archlinux.org/index.php/Vncserver
#!/bin/sh unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS exec startxfce4
(I'm not sure why the line breaks aren't showing ^)
I don't get black (I am able to see the desktop), but the log file has tons of errors (attached).
I'm assuming the default xstartup is fine (since it was on the other machine), and that I have something else going on.
machinename-1.log
The text was updated successfully, but these errors were encountered: