LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   x11vnc persistant? (http://www.linuxquestions.org/questions/linux-software-2/x11vnc-persistant-271359/)

Lleb_KCir 12-28-2004 09:36 PM

x11vnc persistant?
 
how can i make the x11vnc persistant. by that i mean once i click out of the viewer how can i get the

x11vnc -device:0

to stay up and running?

PBSchmidt 12-29-2004 07:08 AM

Lleb_KCir,

maybe I can help a little.

To get vncserver up at startup, I decided to put it into the inetd.

First I created some new services in /etc/services:

Code:

# tightvnc added -ps-
vnc640          5950/tcp                        # VNC Server 640x480
vnc800          5951/tcp                        # VNC Server 800x600
vnc1024-8      5952/tcp                        # VNC Server 1024x768 8 bit
vnc1024        5953/tcp                        # VNC Server 1024x768 16 bit

then, I put the following into /etc/ientd.conf:
Code:

vnc640  stream  tcp    nowait  nobody  /usr/bin/Xvnc Xvnc -inetd -query localhost -once -geometry 640x480 -depth 16
vnc800  stream  tcp    nowait  nobody  /usr/bin/Xvnc Xvnc -inetd -query localhost -once -geometry 800x600 -depth 16
vnc1024-8      stream  tcp    nowait  nobody  /usr/bin/Xvnc Xvnc -inetd -query localhost -once -geometry 1024x768 -depth 8
vnc1024 stream  tcp    nowait  nobody  /usr/bin/Xvnc Xvnc -inetd -query localhost -once -geometry 1024x768 -depth 16

and - HEUREKA! - it worked. Note the ports defined in /etc/services, each one gives you a different resolution or color depth.

I know, this is a cookbook-style hack, and I must admit, that I do not recall all the details about the options, I did this a year ago. But I can access my X on my Debian Server from the garden in summer with my notebook, isn't that something;)

HTH, Peter

Lleb_KCir 12-29-2004 11:07 AM

is that for vncserver or x11vnc, will that work for x11vnc?

i know that with vncserver i can just run:

vncserver -geometry 1024x768 -depth 24

and that will creat a virtual xwindow that i can get access to, but i want controll over the active desktop like x11vnc gives. thing is when you disconect the viewer that instance shuts down.

PBSchmidt 12-30-2004 07:16 AM

Hello Lleb_KCir,

no, this is a new instance of /usr/bin/Xvnc spawning for every session login. The inetd superserver spawns that for every new session - i.e. if I remotely login, a new Xvnc -inetd ... appears in htop, this process dissappears after logout. inetd persistantly waits to start a new Xvnc server process whenever someone asks for.

In my place, this runs for months without having to restart anything.

So I guess, this is what you are looking for. Check it out!

I hope, I got your question right and found the right answer.

Cheers,

Peter

sbassett 12-30-2004 07:57 AM

I think for X11vnc this might be what you are looking for (from the X11vnc faq):

Q-18: Can I change settings in x11vnc without having to restart it? Is there a way to remote control it?

Look at the -remote (same as -R) and -query (same as -Q) options added in the Dec/2004 libvncserver CVS. They allow nearly everything to be changed dynamically and settings to be queried. Examples: "x11vnc -R shared", "x11vnc -R forever", "x11vnc -R scale:3/4", "x11vnc -Q modtweak", "x11vnc -R stop", "x11vnc -R disconnect:all", etc.. These commands do not start a x11vnc server, but rather communicate with one that is already running. The X display (VNC_CONNECT property) is used as the communication channel, so the X permissions and DISPLAY must be set up correctly for communication to be possible.

There is also a simple tcl/tk gui based on this remote control mechanism. See the -gui option for more info.


Hope this helped a little

Lleb_KCir 12-30-2004 03:00 PM

sbassett, that is exactly what i was looking for. thanks ill mess with that when i get home and have a chance to play around with some of those settings.

Lleb_KCir 12-30-2004 05:22 PM

ok how do i get the x11vnc -R forever to work? when i type that in the konsole of the active screen it does nothing to keep the instance open after i exit the viewer or close that konsole?

utcamperj 01-12-2005 09:25 PM

x11vnc persistent
 
I am having trouble setting up inetd as others have described here, which is what I need to do.

What I do that is similar to what YOU want is to install the "rfb" package, then from the GUI console run "x0rfbserver" (the 0 is zero). The first time you run it you have to provide a password that will be required for you to connect from another machine, then it runs as a little annoying icon. I move it to another workspace so it's completely out of the way. Then from another machine you can connect to that one with any vnc client, such as vncviewer. x0rfbserver will stay open when you disconnect and you can reconnect as many times as you like.

My problem is that for that program to work someone must first log onto the console and run x0rfbserver (I suppose i could get that to auto-start). I prefer to get my own session that I can log onto as myself or root and not interrupt the console user, which is why i'm setting up the inetd method.

Joe

Lleb_KCir 01-13-2005 12:02 AM

ahh thanks ill check that out. that might just do the trick for me as its just for my media box and trying to read the text on the TV is not all that easy.

Lleb_KCir 01-13-2005 11:41 AM

Re: x11vnc persistent
 
Quote:

Originally posted by utcamperj
I am having trouble setting up inetd as others have described here, which is what I need to do.

What I do that is similar to what YOU want is to install the "rfb" package, then from the GUI console run "x0rfbserver" (the 0 is zero). The first time you run it you have to provide a password that will be required for you to connect from another machine, then it runs as a little annoying icon. I move it to another workspace so it's completely out of the way. Then from another machine you can connect to that one with any vnc client, such as vncviewer. x0rfbserver will stay open when you disconnect and you can reconnect as many times as you like.

My problem is that for that program to work someone must first log onto the console and run x0rfbserver (I suppose i could get that to auto-start). I prefer to get my own session that I can log onto as myself or root and not interrupt the console user, which is why i'm setting up the inetd method.

Joe

well i can say this. it does not seem to work. i can get it to ask for the p/w, but then it just dies. it refuses to accept the p/w from my remote systems.

i have tried using both vncViewer and the new tscleint and both give authentication error. yes i double checked to make sure i did not have cpas locks on either system and the p/w is simple enough that no i did not misspell it.

habala 01-14-2005 10:34 AM

To answer the initial question... use option '-many' when starting the server.

For instance like this:
x11vnc -many -display :0

/Magnus

Lleb_KCir 01-14-2005 11:07 PM

Quote:

Originally posted by habala
To answer the initial question... use option '-many' when starting the server.

For instance like this:
x11vnc -many -display :0

/Magnus

That is exactly what i wanted to be able to do and is working perfectly.

/bow

thank you much.


All times are GMT -5. The time now is 06:53 PM.