Vino-server and mdm - vnc from login

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read this

Vino-server and mdm - vnc from login

Postby MakOwner on Wed Aug 01, 2012 10:59 pm

I have vino working and can get to a remote desktop session after I have logged in and started the vino server.
I found these instructions on how to get the session working from the mdm login prompot:
Code: Select all
Managed to do that.
First of all, you must configure your vino server by running vino-preferences as root.
Then, append the line
/usr/lib/vino/vino-server --sm-disable &
in file /etc/gdm3/Init/Default
before the line 'exit 0'
And finally, you must prevent vino from being run second time after logging in by disabling it's autorun in System->Parameters->Autorun (or something like that, my installation has different locale)


And it worked! - sort of...
I reboot the workstation and I can use tightvnc viewer to connect to the box (that's good!) and I can enter a user id and password, but after pressing enter, the connection is terminated and vino is no longer running, and I can't connect again until I reboot.

I'm almost there! Can anyone help over the last little bit?
MakOwner
Level 1
Level 1
 
Posts: 18
Joined: Sun Nov 06, 2011 3:54 pm

Linux Mint is funded by ads and donations.
 

Re: Vino-server and mdm - vnc from login

Postby egrath on Thu Aug 02, 2012 3:59 am

Hi,

i have not used vino before, but if you want to connect using VNC only, i've written a tutorial on how to set up such a configuration in Ubuntu 12.04 and Linut MINT 13:

http://www.matrix44.net/blog/?p=1106

Essentially, you have to run x11vnc with a few parameters from your /etc/mdm/Init/Default script. Put the following line at the end (before exit 0) of the mentioned file:

Code: Select all
nohup x11vnc -shared -no6 -forever -nolookup -auth /var/lib/mdm/:0.Xauth --passwd 'Test123!' 2>/dev/null 1>&2 &


(You'll need to install the x11vnc package)

egrath
User avatar
egrath
Level 1
Level 1
 
Posts: 33
Joined: Thu Jun 14, 2012 5:44 am
Location: Austria

Re: Vino-server and mdm - vnc from login

Postby martywd on Sun Sep 30, 2012 3:40 pm

egrath wrote:Hi,
i have not used vino before, but if you want to connect using VNC only, i've written a tutorial on how to set up such a configuration in Ubuntu 12.04 and Linut MINT 13:

http://www.matrix44.net/blog/?p=1106

Essentially, you have to run x11vnc with a few parameters from your /etc/mdm/Init/Default script. Put the following line at the end (before exit 0) of the mentioned file:
Code: Select all
nohup x11vnc -shared -no6 -forever -nolookup -auth /var/lib/mdm/:0.Xauth --passwd 'Test123!' 2>/dev/null 1>&2 &

(You'll need to install the x11vnc package)
egrath


Thanks egrath!
This is a major improvement over vino-server. I used the code you suggested with two changes:
Code: Select all
nohup x11vnc -repeat -shared -no6 -forever -nolookup -auth /var/lib/mdm/:0.Xauth --passwdfile '/home/martywd/.vncpass' 2> /dev/null 1>&2 &

The '-repeat' switch because after reboot and remote VNC login, the server machine's keyboard autorepeat key functionality nolonger worked until I was able to physically sit at the machine and log off and log back on again. Adding the '-repeat' switch seems to have solved this issue.

Replacing the '--passwd' switch and cleartext password (easily seen by other local users by running 'ps' from terminal) with: '--passwdfile' , creating a file containing the VNC password with owner access only (rw) permissions (chmod 600) helps to prevent other users on the machine from viewing the password used in the VNC login.

Lot's of help available via 'man x11vnc'.

vino-server was a fight from the start to get working on my LM13 MATE (32-bit) machine. And after a remote reboot, none of the other suggestions posted on the LM forum and on the U...forum worked for me to get vino-server running again until I could physically sit at the machine and login. Again, this 'x11vnc' server config option is a vast improvement.
.
martywd
Level 3
Level 3
 
Posts: 119
Joined: Sun May 08, 2011 10:35 am
Location: Texas

Re: Vino-server and mdm - vnc from login

Postby lio256 on Mon Mar 18, 2013 4:10 pm

Thanks for this post. You can encrypt the password and ask x11vnc to read the encrypted password file instead of the plain-text file.

First create the encrypted password file:

Code: Select all
$ x11vnc -storepasswd password ~/.x11vncpass


Then the final line in /etc/mdm/Init/Default will look like this (replacing user with your username):

Code: Select all
nohup x11vnc -repeat -shared -no6 -forever -nolookup -rfbauth '/home/user/.x11vncpass' 2> /dev/null 1>&2 &
lio256
Level 1
Level 1
 
Posts: 2
Joined: Sat Jan 05, 2013 9:53 am


Return to Other networking topics

Who is online

Users browsing this forum: No registered users and 2 guests