Minggu, 23 September 2018

How to install VNC server on Gnome Ubuntu desktop

  Tidak ada komentar
Some day i need to install vnc server on my ubuntu dekstop that connected on public IP, here i share the tutorial how to install VNC server on Gnome Ubuntu desktop

Install the vnc server by following command
maswachid@Lenovo-G470:~$
maswachid@Lenovo-G470:~$ sudo apt-get install vnc4server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  vnc-java
The following NEW packages will be installed:
  vnc4server
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/1.622 kB of archives.
After this operation, 5.466 kB of additional disk space will be used.
Selecting previously unselected package vnc4server.
(Reading database ... 280160 files and directories currently installed.)
Preparing to unpack .../vnc4server_4.1.1+xorg4.3.0-37.3ubuntu2_amd64.deb ...
Unpacking vnc4server (4.1.1+xorg4.3.0-37.3ubuntu2) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up vnc4server (4.1.1+xorg4.3.0-37.3ubuntu2) ...
update-alternatives: renaming Xvnc.1.gz slave link from /usr/share/man/man1/Xvnc to /usr/share/man/man1/Xvnc.1.gz
update-alternatives: using /usr/bin/Xvnc4 to provide /usr/bin/Xvnc (Xvnc) in auto mode
update-alternatives: using /usr/bin/x0vnc4server to provide /usr/bin/x0vncserver (x0vncserver) in auto mode
update-alternatives: using /usr/bin/vnc4passwd to provide /usr/bin/vncpasswd (vncpasswd) in auto mode
update-alternatives: using /usr/bin/vnc4config to provide /usr/bin/vncconfig (vncconfig) in auto mode
maswachid@Lenovo-G470:~$
Start the vnc server with following command

maswachid@Lenovo-G470:~$ vncserver :1

New 'X' desktop is Lenovo-G470:1

Starting applications specified in /home/maswachid/.vnc/xstartup
Log file is /home/maswachid/.vnc/Lenovo-G470:1.log

maswachid@Lenovo-G470:~$ 
Kill the vnc server with following command
maswachid@Lenovo-G470:~$ vncserver -kill :1
Killing Xtightvnc process ID 2564
maswachid@Lenovo-G470:~$ 
Update the password with following command
maswachid@Lenovo-G470:~$ vncpasswd
Password:
Verify:
maswachid@Lenovo-G470:~$
Update the vnc server configuration
msteam@Lenovo-G470:~$ nano ~/.vnc/xstartup
msteam@Lenovo-G470:~$
msteam@Lenovo-G470:~$ cat  ~/.vnc/xstartup
#!/bin/sh

# Uncomment the following two lines for normal desktop:
#unset SESSION_MANAGER
# 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 1366x768 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &

export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
gnome-session --session=ubuntu -geometry 1366x768 -ls -title "$VNCDESKTOP Desktop" &

gnome-panel &
nautilus &
gnome-settings-daemon &
msteam@Lenovo-G470:~$

Start the vnc server with custom resolution (custom resolution is optional)
maswachid@Lenovo-G470:~$ vncserver -geometry 1366x768
Found /usr/share/vnc/classes for http connections.

New 'Lenovo-G470:3 (maswachid)' desktop is Lenovo-G470:3

Starting applications specified in /home/maswachid/.vnc/xstartup
Log file is /home/maswachid/.vnc/Lenovo-G470:3.log

maswachid@Lenovo-G470:~$
You can remote the vnc server on session 3 now ( the session number is write on start logging text)




Tidak ada komentar :

Posting Komentar