# x11vnc

## DumbAss

Hi people,

Does anyone have any experience with x11vnc? It's a new vncserver much like x0rfbserver. 

http://www.karlrunge.com/x11vnc/

If it's good maybe I'll try to install it. Emerging would be much nicer  :Smile: 

----------

## fleed

Looks really good, and better than x0rfbserver. Thanks for bringing that up...err... DumbAss!

----------

## fleed

Actually, reading through the page you pointed out, it looks like x11vnc is in libvncserver, which is in portage. I'm trying to emerge it now (after copying version 0.5 to 0.6 in my portage tree).

----------

## DumbAss

 *fleed wrote:*   

> Actually, reading through the page you pointed out, it looks like x11vnc is in libvncserver, which is in portage. I'm trying to emerge it now (after copying version 0.5 to 0.6 in my portage tree).

 

Is saw it too  :Smile:  I emerged it at once. How do you replace the version? I really hope it works better than x0rfbserver.

[edit]

Hmm... I get: Xlib: connection to ":0.0" refused by server.

[/edit]

----------

## fleed

Yup, x11vnc is in there! I wasn't successful hacking a version 0.6 of libvncserver. 

Try xhost + when connected to your X11 server

----------

## DumbAss

 *fleed wrote:*   

> Yup, x11vnc is in there! I wasn't successful hacking a version 0.6 of libvncserver. 
> 
> Try xhost + when connected to your X11 server

 

x11vnc works beautiful but now I can only export :1 & :2 but not :0. But I'm trying to solve it. Xhost + worked but I think it is because I'm not connect to my X11 server.

What I can't understand is that no one ever told me about this beautiful server. In a couple of hours I can go home and I try how fast it really is.

----------

## jonnymalm

Please let us know how well it works.  I use XDMCP & cygwin/X server to connect to my box on my internal home lan.  I find that this works great with a light wm like fluxbox.  

It looks like this would be great for remote connections over the Internet, especially since you can tunnel it over ssh

----------

## DumbAss

Hi, well I tested it and it works OK. Not great OK. BUT... still a lot better than x0rfbserver or a casual vnc server. KRFB is just a little bit faster. On the other hand x11vnc is rock-stable. In the past x0rfbserver kept crashing over and over but I have had not a single crash with x11vnc. I even made a rc-script for it  :Smile: 

One thing though ( ? ),

How do I make it run as a background service when I start it in a terminal. I used the option -bg but that didn't work for me. Anyone?

For the viewers: try it! Really!

----------

## DumbAss

today I compiled the 0.6 version myself and the newest x11vnc.c that wasn't in the package. The -bg option works now and a higher compression can be achieved. I'm now trying to crash it, but I haven't managed to do it.

I'm verry happy with it. If I can figure out how ebuilds work maybe I'll make an ebuild in the future.

----------

## ericpartington

I tried to emerge x11vnc today - i am running on a PPC machine and i have accepted unstable "~PPC" but it looks like the libvncserver is stable for bot ppc and x86.  These are the errors that i get when the emerge fails :

```

zrle.c:82: structure has no member named `zrleData'

zrle.c:83: structure has no member named `zrleData'

zrle.c:84: structure has no member named `zrleData'

zrle.c:126: `rfbEncodingZRLE' undeclared (first use in this function)

zrle.c:126: (Each undeclared identifier is reported only once

zrle.c:126: for each function it appears in.)

zrle.c: In function `FreeZrleData':

zrle.c:179: structure has no member named `zrleData'

zrle.c:180: structure has no member named `zrleData'

zrle.c:181: structure has no member named `zrleData'

make[2]: *** [zrle.o] Error 1

make[2]: Leaving directory `/var/tmp/portage/libvncserver-0.6/work/LibVNCServer-0.6'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/var/tmp/portage/libvncserver-0.6/work/LibVNCServer-0.6'

make: *** [all] Error 2

 

!!! ERROR: net-libs/libvncserver-0.6 failed.

!!! Function src_compile, Line 45, Exitcode 2

!!! (no error message)

```

any ideas?  i noticed that DumbAss mentioned that he compiled it himself, i am in the process of trying to do this myself.  Any suggestions as to how i can compile it myself? any locations that i should save the code to?

thanks for any help, trying to create a digital picture frame here and this will help me to manage the remote screen/laptop/pictureframe with a wireless connection.

eric

----------

## DumbAss

Really cool idea that pictureframe. I was thinking about that myself. If you're done could you post some pictures?

Ok, back to business. What I did was: ebuild fetch *package*

That downloaden a tar.gz. I opened it and replaced te x11vnc.c file. After that I had te do ebuild *package* digest and after that I could emerge it as an usual package.

I hope I was of any assistence.

----------

## ericpartington

I will definitley post ome pictueres if ic an get this part solved. 

This is what happens when i try 

```
ebuild libvncserver fetch
```

```

root@Blackmac eric # ebuild libvncserver fetch

!!! Name error in libvn: missing a version or name part.

!!! Error: PF is null 'libvn'; exiting.

```

so what to do next?  i have looked at the man pages for ebuild and found the apropriate structure for ebuild.  There is also a fresh ebuild for libvncserver but again trying to emerge the fresh ebild gives me the same error i had in my same previous post.  I have also tried emerging the full path tp the ebuild and no such luck so far.

Any more suggestions for how to get this app going?

----------

## DumbAss

Well, you have done an emerge already so the .tar.gz has been downloaded already. It's somewhere in /usr/portage/distfiles/

----------

## ericpartington

Yup, i did some poking around and found the .tar.gz file.  I expanded it to my /home/eric directory, opened it up, found the x11vnc.c and replaced it with the one from the x11vnc website. I tried running the 

```

ebuild *package* digest

```

 and it fails with an error :

```
!!! Name error in libvn: missing a version or name part. 

!!! Error: PF is null 'libvn'; exiting. 

```

i have tried specifyin the path to the newly edited epanded folder in my home folder.  Any more suggestions?  i have also tried to emerge gemsvnc and it fails on the install with and eror that i dont have right now as i am at work.  

suggestions anyone? should i post something in the portage area to see if there are suggestion?

Eric

----------

## DumbAss

What happens if you do:

```
ebuild /fullpathtopackage/package-version.ebuild digest
```

----------

## ericpartington

when i try 

```

ebuild /usr/tmp/portage/libvncserver-0.6/build-info/libvncserver-0.6.ebuild digest

```

i get this error

```
!!! aux_get(): ebuild for 'libvncserver-0.6/libvncserver-0.6' does not exist at:!!!            /usr/portage/libvncserver-0.6/libvncserver/libvncserver-0.6.ebuild

doebuild(): aux_get() error; aborting.

```

that is after i have copied the new x11vnc.c file into the libvncserver-0.6 directory.

 - do i need to run that digest feature?  is there a way to try simply emerging the files in the dist directory?  how do i tell emerge to not unpack a new copy fo the files in the tar.gz file that overwrite the dist files ?  there must be a way to run those files instead of unpacking again...

this is beginning to be a pain in the butt. anyways i'll keep trying of people keep sending suggestions.

thanks for the help so far everyone

eric

----------

## ericpartington

Alright , i noticed something funny here ....

when i tried the previous operation:

```
!!! aux_get(): ebuild for 'libvncserver-0.6/libvncserver-0.6' does not exist at:!!!            /usr/portage/libvncserver-0.6/libvncserver/libvncserver-0.6.ebuild

doebuild(): aux_get() error; aborting.

```

it tells me that it cant find the ebuild file a path that is not the same as i typed.  The error gives me that it is looking in the path :

```
/usr/portage/libvncserver-0.6/libvncserver/libvncserver-0.6.ebuild//usr/portage/libvncserver-0.6/libvncserver/libvncserver-0.6.ebuild
```

 and when i try to find the path it obviously doesnt exist.  so i try to locate the path and this is where the ebuild exists:

```
/usr/portage/libvncserver-0.6/libvncserver/libvncserver-0.6.ebuild
```

which is not the same.  how do i change the path that it looks in?

----------

## ericpartington

again an update - so much good stuf can happen on a monday

```
root@Blackmac libvncserver # ebuild libvncserver-0.6.ebuild digest

>>> Generating digest file...

<<< LibVNCServer-0.6.tar.gz

<<< libvncserver-0.6-20040101-x11vnc.c.bz2

>>> Generating manifest file...

<<< ChangeLog

<<< libvncserver-0.5-r1.ebuild

<<< libvncserver-0.6.ebuild

<<< files/0.5-optional-configure.ac.patch

<<< files/digest-libvncserver-0.5-r1

<<< files/digest-libvncserver-0.6

>>> Computed message digests.

```

so now i got that to work, but when i try emerging the package again it gives me the same error that exits the build.  How can i get past this last hurdle?

----------

## DumbAss

I really don't know. I searched on google but I couldn't find anything about the error message.

I suggest you check you CFLAGS in /etc/make.conf

Maybe if you use other CFLAGS it will compile.

----------

## ericpartington

alright i guess the question here is how does one emerge and ebuild?  everytime i run emerge libvncserver i seem to be emerging the .tar.gz file and overwriting the files that i have changed.  How did you manage to run emerge on the new ebuild digest that you created dumbass?  just curious here, getting closer by the day.

thanks again for all the help

Eric

----------

## DumbAss

If you do

```
man ebuild
```

there's a list of commands that go with ebuild. I thought I used:

```
ebuild package-version.ebuild install
```

then it doesn't download the package again but uses the one on your harddisk.

----------

## opm8

ericpartington,

This is the same error I got on two different boxes by using the ebuild.  What I did was download the source off sourceforge and compile it myself.  Worked great!   :Very Happy: 

I usually download stuff to /usr/local/src, unpack it with 'tar -xvzf LibVNCServer-0.6.tar.gz' which creates a LibVNCServer-0.6 directory.  In there follow the directions in the README file. It's painfully easy.

Hope this helps.

--opm8

 *ericpartington wrote:*   

> I tried to emerge x11vnc today - i am running on a PPC machine and i have accepted unstable "~PPC" but it looks like the libvncserver is stable for bot ppc and x86.  These are the errors that i get when the emerge fails :
> 
> ```
> 
> zrle.c:82: structure has no member named `zrleData'
> ...

 

----------

## agarthe

I am obviously not too bright when it comes to rc-scripts. DumbAss can you supply your rc-script? I have tried a couple of different ways to do an rc-script but each time they fail. I can start from the command line with no problems...

Thanks in advance

----------

