Vino-server and mdm - vnc from login

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
MakOwner
Level 2
Level 2
Posts: 66
Joined: Sun Nov 06, 2011 3:54 pm

Vino-server and mdm - vnc from login

Post by MakOwner »

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?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
egrath

Re: Vino-server and mdm - vnc from login

Post by egrath »

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
martywd
Level 3
Level 3
Posts: 147
Joined: Sun May 08, 2011 10:35 am
Location: TX

Re: Vino-server and mdm - vnc from login

Post by martywd »

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.
.
lio256

Re: Vino-server and mdm - vnc from login

Post by lio256 »

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 &
Locked

Return to “Networking”