Minggu, 23 September 2018

How to install vnc server ubuntu with same session with dekstop x session

  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:~$ sudo apt-get install x11vnc
[sudo] password for msteam:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  x11vnc-data
The following NEW packages will be installed:
  x11vnc x11vnc-data
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 1.148 kB of archives.
After this operation, 2.739 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://id.archive.ubuntu.com/ubuntu xenial/universe amd64 x11vnc-data all 0.9.13-1.2build1 [203 kB]
Get:2 http://id.archive.ubuntu.com/ubuntu xenial/universe amd64 x11vnc amd64 0.9.13-1.2build1 [944 kB]
Fetched 1.148 kB in 6s (167 kB/s)
Selecting previously unselected package x11vnc-data.
(Reading database ... 280157 files and directories currently installed.)
Preparing to unpack .../x11vnc-data_0.9.13-1.2build1_all.deb ...
Unpacking x11vnc-data (0.9.13-1.2build1) ...
Selecting previously unselected package x11vnc.
Preparing to unpack .../x11vnc_0.9.13-1.2build1_amd64.deb ...
Unpacking x11vnc (0.9.13-1.2build1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20180209-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for desktop-file-utils (0.22-1ubuntu5.2) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Setting up x11vnc-data (0.9.13-1.2build1) ...
Setting up x11vnc (0.9.13-1.2build1) ...
maswachid@Lenovo-G470:~$

Start the vnc server with following command
msteam@Lenovo-G470:~$ x11vnc -display :0 -auth .Xauthority
##################################################################
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
#@                                                                                                                         @#
#@  **  WARNING  **  WARNING  **  WARNING  **  WARNING  **       @#
#@                                                                                                                         @#
#@        YOU ARE RUNNING X11VNC WITHOUT A PASSWORD!!           @#
#@                                                                                                                         @#
#@  This means anyone with network access to this computer                           @#
#@  may be able to view and control your desktop.                                            @#
#@                                                                                                                        @#
#@ >>> If you did not mean to do this Press CTRL-C now!! <<<                     @#
#@                                                                                                                        @#
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
#@                                                                                                                        @#
#@  You can create an x11vnc password file by running:                                   @#
#@                                                                                                                        @#
#@       x11vnc -storepasswd password /path/to/passfile                                     @#
#@  or   x11vnc -storepasswd /path/to/passfile                                                    @#
#@  or   x11vnc -storepasswd                                                                              @#
#@                                                                                                                        @#
#@  (the last one will use ~/.vnc/passwd)                                                            @#
#@                                                                                                                        @#
#@  and then starting x11vnc via:                                                                        @#
#@                                                                                                                        @#
#@      x11vnc -rfbauth /path/to/passfile                                                              @#
#@                                                                                                                        @#
#@  an existing ~/.vnc/passwd file from another VNC                                       @#
#@  application will work fine too.                                                                      @#
#@                                                                                                                        @#
#@  You can also use the -passwdfile or -passwd options.                                  @#
#@  (note -passwd is unsafe if local users are not trusted)                                  @#
#@                                                                                                                        @#
#@  Make sure any -rfbauth and -passwdfile password files                               @#
#@  cannot be read by untrusted users.                       @#
#@                                                           @#
#@  Use x11vnc -usepw to automatically use your              @#
#@  ~/.vnc/passwd or ~/.vnc/passwdfile password files.       @#
#@  (and prompt you to create ~/.vnc/passwd if neither       @#
#@  file exists.)  Under -usepw, x11vnc will exit if it      @#
#@  cannot find a password to use.                           @#
#@                                                           @#
#@                                                           @#
#@  Even with a password, the subsequent VNC traffic is      @#
#@  sent in the clear.  Consider tunnelling via ssh(1):      @#
#@                                                           @#
#@    http://www.karlrunge.com/x11vnc/#tunnelling            @#
#@                                                           @#
#@  Or using the x11vnc SSL options: -ssl and -stunnel       @#
#@                                                           @#
#@  Please Read the documention for more info about          @#
#@  passwords, security, and encryption.                     @#
#@                                                           @#
#@    http://www.karlrunge.com/x11vnc/faq.html#faq-passwd    @#
#@                                                           @#
#@  To disable this warning use the -nopw option, or put     @#
#@  'nopw' on a line in your ~/.x11vncrc file.               @#
#@                                                                                                                       @#
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#
###############################################################
23/09/2018 15:38:23 x11vnc version: 0.9.13 lastmod: 2011-08-10  pid: 14899
23/09/2018 15:38:23 Using X display :0
23/09/2018 15:38:23 rootwin: 0xc0 reswin: 0xe00001 dpy: 0x1b42c40
23/09/2018 15:38:23 ...
You can set the password by typing following command
maswachid@Lenovo-G470:~$
maswachid@Lenovo-G470:~$ x11vnc -storepasswd
Enter VNC password:
Verify password:
Write password to /home/msteam/.vnc/passwd?  [y]/n y
Password written to: /home/msteam/.vnc/passwd
maswachid@Lenovo-G470:~$
To start the vnc server using password, type the following command
msteam@Lenovo-G470:~$ x11vnc -usepw -display :0 -auth .Xauthority
23/09/2018 16:34:11 -usepw: found /home/msteam/.vnc/passwd
23/09/2018 16:34:11 x11vnc version: 0.9.13 lastmod: 2011-08-10  pid: 21815
23/09/2018 16:34:11 Using X display :0
23/09/2018 16:34:11 rootwin: 0xc0 reswin: 0xe00001 dpy: 0xfaf050
23/09/2018 16:34:11
23/09/2018 16:34:11 ------------------ USEFUL INFORMATION ------------------
23/09/2018 16:34:11 X DAMAGE available on display, using it for polling hints.
23/09/2018 16:34:11   To disable this behavior use: '-noxdamage'
23/09/2018 16:34:11
23/09/2018 16:34:11   Most compositing window managers like 'compiz' or 'beryl'
23/09/2018 16:34:11   cause X DAMAGE to fail, and so you may not see any screen
23/09/2018 16:34:11   updates via VNC.  Either disable 'compiz' (recommended) or
23/09/2018 16:34:11   supply the x11vnc '-noxdamage' command line option.
23/09/2018 16:34:11
23/09/2018 16:34:11 Wireframing: -wireframe mode is in effect for window moves.
23/09/2018 16:34:11   If this yields undesired behavior (poor response, painting

You can start the vnc session on default port 5900 and use your password to login




Tidak ada komentar :

Posting Komentar