Wireless Army
This is a blog / tips and tricks website for web developers and security researchers.
follow us in feedly


debian gnome vnc server
by admin
 at 2020-05-18 05:03:13.

the following will fix th gray screen or the black screen problem with vncserver

apt-get install tightvnc server

for backup
cp .vnc/xstartup .vnc/xstartup.back

change your xstartupfile

#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
#!/bin/shxrdb $HOME/.Xresources
xsetroot -solid grey
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
# x-window-manager &
gnome-session &

 

run

vncserver :1

 

this will usually run on port 5901

you can do vncserver -list 

or 

vncserver -kill :1

if you can't connect you need to enable portforwarding for your ssh connection (best option )

because from default it will only be availble for localhost

when you do netstat -lntp you will see 127.0.0.1 instad if 0.0.0.0