LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 02-26-2015, 01:44 PM   #1
AcidRa1n
LQ Newbie
 
Registered: Jun 2012
Posts: 13

Rep: Reputation: Disabled
x11VNC Questions.


I have an Asus Chromebox running Ubuntu 14.10 in my office's lobby for a monitoring system.

I have SSH and x11VNC setup.

My current process is logging in Via SSH and using this command:

sudo x11vnc -display :0 -auth /var/lib/lightdm/.Xauthority

to start the VNC.

First question: Why is is that after closing my viewer and disconnecting from the VNC I have to re-input that command to start the VNC server again to allow me to connect.
This is a hassle. Especially because my CO-Worker needs to access the box sometimes as well. I would like to just start it once and have it work for as long as possible.

Second question: I would like x11VNC to start up upon boot up.
You can probably see why this is my second question. I only want to do this once I find out why the session seems to expire. I do not want to have to keep restarting the VNC to connect.
 
Old 02-26-2015, 03:07 PM   #2
sudowtf
Member
 
Registered: Nov 2013
Posts: 206

Rep: Reputation: 46
Code:
-forever               Keep listening for more connections rather than exiting
                       as soon as the first client(s) disconnect. Same as -many

                       To get the standard non-shared VNC behavior where when
                       a new VNC client connects the existing VNC client is
                       dropped use:  -nevershared -forever   This method can
                       also be used to guard against hung TCP connections that
                       do not go away.
https://stackoverflow.com/questions/...r-linux-ubuntu
 
Old 02-26-2015, 04:50 PM   #3
AcidRa1n
LQ Newbie
 
Registered: Jun 2012
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sudowtf View Post
Code:
-forever               Keep listening for more connections rather than exiting
                       as soon as the first client(s) disconnect. Same as -many

                       To get the standard non-shared VNC behavior where when
                       a new VNC client connects the existing VNC client is
                       dropped use:  -nevershared -forever   This method can
                       also be used to guard against hung TCP connections that
                       do not go away.
https://stackoverflow.com/questions/...r-linux-ubuntu

Sorry, I've used Linux off and on over the years. I believe I know how to make it start on boot. However I do not want to try it without making sure the VNC serverstay on after disconnecting. Can you give me a little more info?

So I need to use -forever?
 
Old 02-27-2015, 08:39 AM   #4
sudowtf
Member
 
Registered: Nov 2013
Posts: 206

Rep: Reputation: 46
yes x11vnc -forever [...]
or
x11vnc -nevershared -forever [...]
depending on your desire

sudo x11vnc -forever -display :0 -auth /var/lib/lightdm/.Xauthority
 
1 members found this post helpful.
Old 02-27-2015, 10:13 AM   #5
AcidRa1n
LQ Newbie
 
Registered: Jun 2012
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sudowtf View Post
yes x11vnc -forever [...]
or
x11vnc -nevershared -forever [...]
depending on your desire

sudo x11vnc -forever -display :0 -auth /var/lib/lightdm/.Xauthority
Thank you so much, that solves that problem.
 
Old 02-27-2015, 10:57 AM   #6
AcidRa1n
LQ Newbie
 
Registered: Jun 2012
Posts: 13

Original Poster
Rep: Reputation: Disabled
Edit: Nevermind

Last edited by AcidRa1n; 02-27-2015 at 10:59 AM.
 
Old 02-27-2015, 10:59 AM   #7
sudowtf
Member
 
Registered: Nov 2013
Posts: 206

Rep: Reputation: 46
you run this command ONCE and never again unless it crashes and needs to be restarted.

you can run it in the background by appending an "&" after the command, or sometimes i prefer to run things in a 'screen' session

Last edited by sudowtf; 02-27-2015 at 11:01 AM.
 
Old 02-27-2015, 11:35 AM   #8
AcidRa1n
LQ Newbie
 
Registered: Jun 2012
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sudowtf View Post
you run this command ONCE and never again unless it crashes and needs to be restarted.

you can run it in the background by appending an "&" after the command, or sometimes i prefer to run things in a 'screen' session
Yea I did. Starts up good. I experienced a little glitch.
 
Old 02-27-2015, 11:41 AM   #9
AcidRa1n
LQ Newbie
 
Registered: Jun 2012
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sudowtf View Post
you run this command ONCE and never again unless it crashes and needs to be restarted.

you can run it in the background by appending an "&" after the command, or sometimes i prefer to run things in a 'screen' session
I am actually struggling to get my KRDC to autostart and login.. Do you know what I can add in Cron for that?
 
Old 02-27-2015, 11:53 AM   #10
sudowtf
Member
 
Registered: Nov 2013
Posts: 206

Rep: Reputation: 46
i recall it glitching for me too, i found my launcher which stopped the "glitches":
Code:
sudo x11vnc -forever -usepw -display :0 -autoport 5900 -nap -noxdamage -nolookup -auth guess  -allow 192.168. &
Specifically i think it's the -noxdamage.
Also notice the -allow to only allow 192.168.0.0/16 (you can use -allow multiple times, ex: -allow 25. -allow 10.0.0. -allow -192.168.1.)
The -usepw requires you to previously configured a password.

If it still tends to die, you could alway write a wrapper:
Code:
#!/bin/sh
while true
do
  echo "[re]starting"
  sudo x11vnc -forever -usepw -display :0 -autoport 5900 -nap -noxdamage -nolookup -auth guess -allow 192.168.   #no "&" here
  echo "Died"
  echo
done
 
Old 02-27-2015, 11:55 AM   #11
sudowtf
Member
 
Registered: Nov 2013
Posts: 206

Rep: Reputation: 46
Quote:
Originally Posted by AcidRa1n View Post
I am actually struggling to get my KRDC to autostart and login.. Do you know what I can add in Cron for that?
i do not.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
x11vnc error: Only root will have read permission for the file, and so x11vnc must be yogesh_attarde Linux - Software 7 09-23-2014 07:30 AM
x11vnc slackbuild for 13.1 zoran119 Slackware 4 08-24-2010 07:50 PM
x11vnc Shwick Linux - Server 1 12-09-2008 10:56 AM
help with x11vnc gtludwig Linux - Networking 5 10-08-2006 05:53 PM
Trying to use x11vnc? Snump Mandriva 12 04-12-2006 03:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 11:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration