# monitor sharing under vnc is no longer working

## Adel Ahmed

I have setup screen sharing on vnc by using the libvnc.so xorg module

everything was working fine then it just stopped working

I try starting tigervnc:

* Caching service dependencies ...                                                                                                                    [ ok ]

 * Please define $DISPLAYS in /etc/conf.d/tigervnc

 * ERROR: tigervnc failed to start

I did not specify displays before, but if i do:

Display :0 appears to be already in use because of /tmp/.X11-unix/X0

 * Remove this file if there is no X server localhost:0

 * ERROR: tigervnc failed to start

I still have the same config file in /etc/X11/xorg.conf.d/50-vnc.conf 

Section "Module"

    Load "vnc" 

    EndSection

      Section "Screen"

          Identifier   "Default Screen" 

          Option       "PasswordFile"      "/home/adel/.vnc/passwd" 

          EndSection

----------

## Adel Ahmed

help! anyone?

----------

## Gusar

The tigervnc service is for virtual displays, you shouldn't start it if you want to share the real display.

As for sharing the real display, use pastebin to post /var/log/Xorg.0.log

----------

## Adel Ahmed

here's my log file:

http://pastebin.com/J1F7zQ6J

so what's the daemon sharing my screen?

----------

## Gusar

Why would there need to be a daemon? It's all in the vnc module.

There's no mention of vnc in that log. It's possible the crappy, outdated xorg.conf is to blame. Reduce xorg.conf to just the Device and Monitor sections, then check the log if the vnc module is getting loaded.

----------

## Adel Ahmed

thanks, that kinda worked

I can vnc now but the problem is I cannot see anything, on my desktop I can see the mouse moving but on my laptop(the client) I can only see blurry colours

----------

## Hu

Some proprietary driver versions and configuration combinations are known to cause problems.  The nVidia drivers with compositing enabled cause problems with VNC sharing because they bypass the layer that VNC uses.  Can you reproduce the problem with the open driver for your card?  What do you mean by "blurry"?  Are the colors correct but the image indistinct?  Is the image initially correct but slowly deviates from what it should be?

----------

## Adel Ahmed

well it's possible that the issue began when I switched to the ati-drivers 

what I meant was :

I can't see anything, I can tell if the screen is gray or white..etc but I can neither read nor tell what is on the screen, colors are scrambled( im not sure Im using the right words)

----------

## Adel Ahmed

help anyone?

----------

## Gusar

Logs, man. Logs!  :Smile: 

Besides Xorg.0.log, also post xorg.conf and other xorg config files you have. Also, what desktop environment are you using? Did you try a different one? Always post as much info as possible, there's no other way you can get help.

----------

## Adel Ahmed

here's ,my log file:

http://pastebin.com/hek1WBzQ

and here's my config

#Section "ServerLayout"

#       Identifier     "aticonfig Layout"

#       Screen      0  "aticonfig-Screen[0]-0" 0 0

#EndSection

#Section "Module"

#EndSection

Section "Monitor"

        Identifier   "aticonfig-Monitor[0]-0"

#       Option      "VendorName" "ATI Proprietary Driver"

#       Option      "ModelName" "Generic Autodetecting Monitor"

        Option      "DPMS" "false"

# the next 2 lines are the new experimental config

Modeline "1280x1024_60" 108.00 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync

Option "PreferredMode" "1280x1024_60"

EndSection

Section "Device"

        Identifier  "aticonfig-Device[0]-0"

        Driver      "fglrx"

#       BusID       "PCI:1:0:0"

#       the next line is the experimental config

Option "Monitor-CRT2" "aticonfig-Monitor[0]-0"

EndSection

Section "Screen"

        Identifier "aticonfig-Screen[0]-0"

        Device     "aticonfig-Device[0]-0"

        Monitor    "aticonfig-Monitor[0]-0"

        DefaultDepth     24

        SubSection "Display"

                Viewport   0 0

                Depth     24

        EndSubSection

EndSection

and I am using gnome as my default and only DE

thanks

----------

## Gusar

When I said "Did you try a different [desktop environment]?", that of course implied "try other desktop environments". Particularly one that is not composited (openbox or something like that).

And you still have an unnecessary Screen section in your xorg.conf.

----------

## Adel Ahmed

and when I said gnome is my only DE I implied that I do not intend to use another de  :Very Happy: 

ok I've commented out that section

----------

## Gusar

Umm, the point is to *test* things. To see whether there's a general vnc problem or if it's specific to Gnome. Because I can very well imagine that exporting a composited environment via vnc might not go well, especially if the compositor is using the composite overlay window instead of the root window.

----------

## Adel Ahmed

oh sorry I didn't mean to come off as a jerk

I cant install another DE coz Im close to my bandwidth limit  :Sad: 

and I see openbox is only 500kb download, working on it

you are correct, everything is working fine on openbox

----------

## Hu

If you disable compositing, does the problem still manifest in GNOME?

----------

## Adel Ahmed

I can't find how to disable compositing for gnome, im using gnome 2.32.1

----------

## jamapii

If libvnc.so really stopped working, you might try x11vnc. This lets you connect to an existing X session.

It works for me with nvidia. I also used vino / Gnome's screen sharing in the past, but it seems to have a few rough edges.

I have a few related scripts:

vncsrv_0

```
#!/bin/sh

DISPLAY=:0.0 x11vnc

```

You might want to edit this one after reading "man x11vnc", for options like -shared, -forever, to make it serve the screen all the time or just once, and -passwdfile, or else everything is unprotected.

vncsrv_0_screen

```
#!/bin/sh

if [ "$1" ]; then

  ssh $1 vncsrv_0_screen

else

  screen -d -m vncsrv_0

fi

```

Put the scripts on the client and the server. If you want to share the screen all the time, call vncsrv_0_screen in a X startup script. Or you can share it on demand, then call "vncsrv_0_screen server-hostname" on the client just before you connect with a vnc viewer.

You need the packages "screen" and "x11vnc" for this.

----------

## Adel Ahmed

bash: vncsrv_0_screen: command not found

i tried copying the script to /bin and I can get the command with tab completion but I'm still getting the error

any help with disabling compositing?

----------

## _______0

after trying vnc and reading about it, my conclusion is that's a fucked up protocol.

----------

## Adel Ahmed

actually, asu much trouble as I'm having with vnc

the performance was excellent and it was very easy to implement before this whole mess just happened

got any P2P alternatives?

----------

## Hu

 *_______0 wrote:*   

> after trying vnc and reading about it, my conclusion is that's a ... protocol.

 I have used VNC in a variety of circumstances for many years, and while it has not always been perfect, I think you are vastly overstating the negatives, especially since you provide neither citations nor anecdotes explaining why you think it is such a terrible protocol.  Could you elaborate on why you think it is so bad?

blakdeath: could you explain what you mean by P2P alternatives?  Are you wanting to share screens with some unpredictable user elsewhere on the planet?

----------

## Adel Ahmed

no what i meant was I want a direct connection, I do not want to use team viewer or any similar protocols, I also do not want to use the internet as I have a bandwidth limit

----------

## Hu

VNC is a direct connection protocol.  You must take special steps with it if you want an indirect connection.

----------

## Adel Ahmed

yes that was exactly what I meant  :Very Happy:  we are on the same page, I meant I wanted something similar to vnc and I'm not willing to try team viewer(thats what everyone recommends)

----------

