Therefore I uninstalled Vino and experimented with x11vnc until I had a perfect setup that works beautifully together with Macs on the network. Worst of all, it's incapable of renaming the exported Avahi service name, meaning that Mac OS clients will see duplicate entries for the machine in their sidebar (one for file shares and one for the desktop share). VNC server supports protocol version 3.3 (viewer 3.3) (type vnc password) Password: VNC.* Linux Mint comes with Vino pre-installed, which is a nice VNC server but quite bare-bones and requires Gnome. As it still works extremely easy and fine under Linux Mint Rebecca I will copy the text here.Similarly, this allows you to record a Mac OS desktop. Vncserver x11vncTo aid testing of the built-in SSL/TLS support for x11vnc, a number of VNC Viewer packages for Unix, Mac OS X, and Windows have been created that provide SSL Support for the TightVNC Viewer (this is done by wrapper scripts and a GUI that starts STUNNEL.) It should be pretty convenient for automatic SSL and SSH connections.Thanks to the Wayback machine (web.archive.org) I managed to retrieve the post.In fact, the user can even log out and log back in as another user, since the x11vnc server continues running as root at all times.* Alright, so to make it launch as root in conjunction with MDM, you need to edit the MDM Init script.* Go down to the bottom of the file and insert the following right before the last "exit 0" line:If then nohup x11vnc -norc -forever -shared -rfbauth /etc/x11vnc.pwd -allow 192.168.0. This also allows the VNC user to connect during the login stage and actually log in without physically being at the console. Only the first 8 characters of the password will be used due to VNC protocol limitations!* We want the x11vnc server to start at the same time as Linux Mint's MDM login manager, which is when we can be sure that the desktop X server has been started. But unlike Vino, we can actually configure this thing to do what we want! In this case, we'll be setting it up to run a single server that controls the entire machine as if we sat at the console.* Now create a hashed password file only readable by root.If you don't want that security, you can remove the whole "-allow 192.168.0." part.* That's it. This option basically prevents unauthorized internet connections since by only accepting local-network connections. So just change it to whatever your network is. For instance, you might be on 192.168.1. To whatever your local network prefix is if that's not your prefix.
![]() X11Vnc Viewer Mac OS ClientsAnd just to clarify the x11vnc process will of course never die just because you log out of the current user. Like I said, it has to do with the actual MDM process itself dying (which should never happen). Note that some people think that "nohup" protects it from dying when you log out from one user and return to the login screen that's not true. Fi (the mdm-Init script is executed twice on boot, so this statement ensures that we don't launch x11vnc twice if it's already running)Nohup x11vnc (executes the server process without listening to the "HUP" hangup signal this ensures that the process keeps running even when the launching "terminal" shuts down (this simply protects against the MDM process dying and taking x11vnc down with it, but is actually useless because MDM never dies on a normal system even when switching users, and may even be harmful because IF MDM somehow died then we'd probably want the VNC server to die too, but oh well). Here's an explanation of what all of the options above are doing:If then. Best ad blocker for chrome macAlso, don't try to launch this from anywhere but the mdm-Init script, because it's the best possible place for hooking into the same DISPLAY/XAUTHORITY as the main window manager.* The only area where we could improve things is if we could somehow set it to automatically re-launch the daemon if it dies for some reason. The solution is to disconnect and reconnect from the VNC server.* Sidenote: Don't be tempted to try the -inetd mode, because that is a special socket mode which spawns one process per connection and doesn't support mDNS, etc it's useless. (only allow clients on the same local IPv4 subnet, this also blocks ipv6 clients since we aren't adding any v6 addresses)-autoport 5900 (try to listen on port 5900, otherwise keep incrementing until we find a free port)-avahi (use mDNS service discovery to announce the VNC server address and port to the network)-env X11VNC_AVAHI_NAME=`hostname` (if your computer is called "MediaCenter" for instance, then the automatic mDNS service name would be MediaCenter:0, so we force it to just plain "MediaCenter" (hostname) to merge it neatly into the Finder sidebar so that it merges itself with any exported file shares from the same machine and doesn't take up two sidebar entries)-desktop "`hostname`'s Remote Desktop" (replaces the default "MediaCenter:0" desktop name shown as the title bar inside your VNC viewer, with a nicer title)[[-display :0 (the physical X server display we want to share we could also have used -find to autodetect the display) /dev/null 1>&2 (redirects stderr to /dev/null and stdout to stderr, thus removing all nohup and x11vnc terminal output during our initial launch (the log file will still be populated by the background child process of course) this redirection also ensures that nohup won't be writing stdout of the spawned process to nohup.out, which it would otherwise have done)* Alright, now enjoy the near-flawless VNC server! Performance and reliability is great, and it even supports clipboard sharing!- The only known issue is that anything that triggers massive amounts of screen redraws (such as a terminal window scrolling text like crazy) can break the ability to send further input (clicks/text). ![]() It's not hard to get those env variables but newbies would definitely find it difficult. Otherwise it would not be able to connect to the currently active desktop session, because X protects each running desktop with a password (the Xauthority). Just note that manually restarting x11vnc over SSH would be slightly hard because you would have to read the /proc entry belongin to MDM, read its "env" (environment variables) file, get the DISPLAY and XAUTHORITY env variables, and pass those to x11vnc when you want to start it from SSH.
0 Comments
Leave a Reply. |
AuthorJeremy ArchivesCategories |