PDA

View Full Version : Unable to get tight VNC working



MaxTroy
2020-01-21, 13:09
Hi Forum,

Im a new linux user but have been an IT tech for 15 years now. Im pretty good with Windows but Linux is a whole new world.

Could I get some assistance with this please? Im totally stuck. I have been following guides etc and following the guides exactly. It seems that there is no single guide that gives 100% of the information so I have used bits and pieces from mulitple sources. Here is what I have done:

Kali GNU 2019.4
1. Login as root user
2. apt-get install update
3. apt-get upgrade
4. apt-get install xfce4 xfce4-goodies gnome-icon-theme tightvncserver
5. apt-get install tightvncserver
6. adduser vnc
7. apt-get install sudo
8. gpasswd -a vnc sudo
9. su - vnc
10. chmod 755 /home/vnc/.vnc/xstartup
11. chown vnc /home/vnc/.vnc/xstartup
12. chmod 755 /root/.Xauthority
13. chown vnc /root/.Xauthority
14. vncserver
15. nano .vnc/xstartup (add gnome-session & to the bottom of the file)
16. vncserver -kill :1
17. vncserver :1 -geometry 1280x720 -depth 24 -dpi 96 (same as desktop resolution but not sure about depth and dpi)

When starting the VNC server as the VNC user I get this:
Timeout in locking authority file /root/.Xauthority

When attempting to connect with the client I get "Unable to contact setting server could not connect: permission denied"

So I tried running vncserver as the root user. It doesn't error when starting but I just get a grey screen with a black X as the cursor.

Any suggestions on what I am missing please? Should tightvnc run OK as root? I read somewhere else that it won't run as the root user for security reasons.

MaxTroy
2020-01-22, 10:18
I fixed it :) x11vnc did the trick

sml156
2020-01-23, 04:51
I fixed it :) x11vnc did the trick

I am having a problem also could you tell me where x11vnc goes, Like what command you did.

MaxTroy
2020-01-23, 10:13
I am having a problem also could you tell me where x11vnc goes, Like what command you did.

Firstly I removed tightvnc


apt-get remove tightvnc

Then I installed x11vnc


apt-get install x11vnc

The defaults of x11vnc just worked right off the bat. No screwing around with the desktop environment settings or startup behaviour. It just worked immediately.

After some more fiddling about I even managed to get it to start as a system service so I get presented with the login screen. I should have probably added to my cheat sheet how I did this but I didn't. If you really really want to know how to do this (and can't figure it out after searching for it) i'll dig out the article that I used.

sml156
2020-01-25, 03:54
I already have x11vnc installed, Maybe if I follow the tutorial you used it might help.

yesimxev
2020-01-27, 12:29
We recommend tigervnc though, that works with new NH app including KeX VNC out of the box

intraxit
2020-02-13, 00:12
We recommend tigervnc though, that works with new NH app including KeX VNC out of the box

I cannot connect to tigervnc though using realvnc client on windows (32bit)

vnc server is starting fine no errors, but after connection attempt status of vncserver.service shows :

Feb 12 23:43:54 kali dbus-daemon[1623]: [session uid=0 pid=1621] Activating service name='org.gtk.vfs.Metadata' requested by>
Feb 12 23:43:54 kali dbus-daemon[1623]: [session uid=0 pid=1621] Successfully activated service 'org.gtk.vfs.Metadata'
Feb 12 23:44:15 kali xfce4-notifyd[1723]: xfce4-notifyd: Fatal IO error 11 (Resource temporarily unavailable) on X server :1.
Feb 12 23:44:15 kali org.a11y.Bus[1650]: X connection to :1 broken (explicit kill or server shutdown).
Feb 12 23:44:15 kali xfconfd[1644]: Name org.xfce.Xfconf lost on the message dbus, exiting.
Feb 12 23:44:15 kali org.gtk.vfs.Daemon[1664]: A connection to the bus can't be made
Feb 12 23:44:15 kali tumblerd[1729]: Name org.freedesktop.thumbnails.Cache1 lost on the message dbus, exiting.
Feb 12 23:44:15 kali tumblerd[1729]: Name org.freedesktop.thumbnails.Manager1 lost on the message dbus, exiting.
Feb 12 23:44:15 kali tumblerd[1729]: Name org.freedesktop.thumbnails.Thumbnailer1 lost on the message dbus, exiting.
Feb 12 23:44:15 kali org.gtk.vfs.Daemon[1806]: A connection to the bus can't be made

Looks like a kernel problem (out of memory on dbus ?)... any ideas ?

Cheers