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

OSXvnc-wrapper woes and solution UNIX
If anyone else out there uses the OSXvnc server from [Update: is no longer a Mac-related website; the domain expired and it's now run as a porn site! Do not try to visit there!] and used the OSXvnc-wrapper solution posted there to get it to automatically run and stay up, you may be interested in this script. You will have no doubt noticed when installing Classic applications under 10.1 that when it says it must close all applications, it means OSX applications as well. This gets into an interesting loop where it kills OSXvnc, which respawns, which then gets killed, etc. As a "hack" solution, I use the following as a replacement for the OSXvnc-wrapper file:

while true
while [ `ps -aux | grep '' | grep -v 'grep' | wc -l` = 1 -a `ps -aux
| grep '' | grep -v 'grep' | wc -l` = 0 ]
sleep 1
/Applications/ `cat /etc/osxvnc-args`
sleep 10
[Editor's note: the "while" command just inside the first 'do' loop has been broken onto two lines for easier readability. Put a space after "aux" and then everything from line two onto the same line.]

What it does is check to see if Dock is running but Finder isn't (this happens when you are installing software that requires closing everything) and if so, waits for this to change. Once it runs, if it gets killed for any reason, it waits 10 seconds and starts checking again. The 10 second wait was necessary since momentarily after killing OSXvnc, both Dock and Finder are still running (finder hasn't been killed), and OSXvnc will start up again and get in the weird loop again.

I got frustrated and created this when that mysterious loop cuased me to force boot one too many times and it corrupted my FS... :( now I don't have to worry about it :)

Hope someone else finds this useful.
  • Currently 2.33 / 5
  You rated: 5 / 5 (3 votes cast)

OSXvnc-wrapper woes and solution | 7 comments | Create New Account
Click here to return to the 'OSXvnc-wrapper woes and solution' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Authored by: SeanAhern on Jan 06, '02 02:28:02AM

Anyone tried making VNC run at boot-time by creating a script in StartupItems? I have been trying it, and I'm getting problems with my /bin/sh script. Now, I've been a bourne shell user for years, so I'm a little confused about what I'm doing wrong. (Especially since I only get the error during the boot sequence, it's a bit time-consuming to debug.)

So, anyone got a working StartupItems script that starts up an OSXvnc server and keeps it up?

[ Reply to This | # ]
Authored by: skinlayers on Jan 06, '02 03:02:03PM

Try these instructions from the website.

[ Reply to This | # ]
Authored by: iloatheny on Jun 07, '02 09:19:36PM

I've tried the startup script that was posted with OSXvnc when the homepage was still alive, and it launches the server but garbles my screen if I connect. The app appearing as a GUI, even on the login screen, is quite annoying; I am going to try pulling it out of the package and if successful, prepare a fink package so the server has a more Mac OS X -compliant bevaviour.
In the mean time if anyone has succeeded in making a startup script, please let all know.

[ Reply to This | # ]
Authored by: iloatheny on Jun 07, '02 09:25:44PM

BTW the garble doesn't happen when I launch the service via the GUI app. Any clues?

[ Reply to This | # ]
Or remove it from the package
Authored by: mithras on Apr 03, '02 09:10:29AM

Another solution is to remove the OSXvnc-server program from the package of the GUI app. Running it from another location won't make OS X consider it a GUI process, so Classic installers won't try to quit it.

It was only with 10.1 that OS X decided to show a Dock icon if you ran any program from inside a package.

(This only applies if you're running OSXvnc as a startup item, of course)

[ Reply to This | # ]
OSXvnc: Killing the automatic process
Authored by: tlmurray23 on Oct 29, '07 12:46:18PM

I use VNC (various types) maybe once a month, usually as a server, almost never as a client. I noticed today when I was looking at my Activity Monitor that there was a process named "OSXvnc-Server" running.

There is no VNC-related startup item in my user preferences. I am guessing that some VNC package installer had placed something somewhere that starts this service on boot-up.

The one mentioned in this thread, and who now appears to be a porn site, is, oddly enough, NOT one that I use or used often. Brands I use a Chicken, Tiffany Screens (not really VNC), ScreenBoard, Spy Server, and Vine Server. I have the Microsoft Remote Desktop Connection installed but have never used it.

Anyone know how I might get rid of it? Or, which of the various VNC tools might have installed this? The point is that I don't want to waste resources on an automatically loaded process when I use it so rarely.

[ Reply to This | # ]
OSXvnc: Killing the automatic process
Authored by: kerouassady on Oct 29, '07 02:07:41PM

VNC comes loaded on every Mac as part of Apple Remote Desktop. Make sure its not running in the Sharing preference pane.

Vine Server comes with a way to stop or start the VNC system server.

[ Reply to This | # ]