[CentOS] VNC: i want see " my session"

Sat Jul 18 11:50:24 UTC 2015
Patrick Hess <patrickhess at gmx.net>

(Please don't top-post.)

Milton Plasencia wrote:
> I copy the /etc/systemd/system/vncserver@:1.service to /etc/systemd/system/vncserver@:0.service

As I said in my previous post, for what you are wanting to do,
vncserver is not the right tool. Use x11vnc instead (and also
remove the above copy).

> Jul 18 11:17:16 systemd[1]: vncserver@:0.service: control process exited, code=exited status=98
> Jul 18 11:17:16 systemd[1]: Failed to start Remote desktop service (VNC).
> Jul 18 11:17:16 systemd[1]: Unit vncserver@:0.service entered failed state.

This error is caused by display :0 alreading being in use
by the X server. Again, in your case you don't want to run
vncserver anyway.

> The problem is i not understand the “logic" of vnc connection, so i try to dark…

If both your VNC server and client are on the same local network,
the following two commands should be all you need to get started:

  1. On the server, from within the X session you want to share:

       x11vnc -forever -shared

  2. Then, on the client:

       vncviewer your-vnc-server:0

You should also take a look at http://www.karlrunge.com/x11vnc/.
That site provides a ton of useful information on how to run
x11vnc in all different kinds of situations.

Patrick