Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'VNC from Terminal on OSX' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
VNC from Terminal on OSX
Authored by: petergort on Sep 28, '10 03:18:13PM

don't forget that you can embed the authentication like this
vnc://username:password@ipaddressordomain
if it's a mac that you are remoting into. Setting them up as a shell alias is one way to do it. Storing them in Safari's bookmarks and the authentication in your keychain is another. Since I mostly work graphically and seldom in terminal, I put all my remote control links in a folder in my bookmarks bar. This has the side effect of also making them available on my iPad, and since I have iTeleport on my iPad the links work from there too.



[ Reply to This | # ]
VNC Shortcut with Hidden Credentials
Authored by: RichB on Sep 28, '10 11:27:19PM
There is also the built-in Finder capability to create a "VNC Internet Location" file with an extension of ".vncloc" similar to a "Web Location" file storing afp, smb or http credentials in a ".webloc" file. This is cool. I just learned it is possible the same way an afp or smb shortcut can be made with credentials embedded:
  • Create the desired connection text in Text Edit or wherever, for example, "vnc://username:password@ipaddressordomain".
  • Select the entire text (without quotes) "vnc://username:password@ipaddressordomain". This is similar to what I've done for years with afp server connections like this: "afp://username:password@ipaddressordomain".
  • Click and drag the text selection
  • Drag it to the desktop or any Finder window and a new file is created
  • The name of the file created will be the same as the selected text followed by the extension, for example, "vnc://username:password@ipaddressordomain.vncloc" (the extension is normally hidden)
  • Change the file name to whatever is desired, for example, "Mac Mini Screen Sharing.vncloc" (don't change the extension if visible)
  • The contents of the small file are not easily accessible so could be safely copied to other computers or sent as an email attachment to other Mac users, for example a spouse, as an easy shortcut to just double-click to start the screen sharing.


  • [ Reply to This | # ]
    VNC from Terminal on OSX
    Authored by: asmeurer on Sep 29, '10 08:33:20AM
    Really, don't put the password in the link. You realize that this will allow anyone with internet access to remotely access the machine in question, if they have it. Doesn't the Screen Sharing application have keychain support? If so, I would recommend using that instead.

    And to the other poster, it is extremely easy to view the contents of the file. Just type cat file in the terminal. Actually, there's really no need to examine the file anyway, since it has the password in there, anyone who wants to use it just needs to open it (if they are on a Mac).

    [ Reply to This | # ]