VerySimple Developer Blog
Technical Tips, Tricks and Rants.
 
Dec
03
Filed Under (Announcements, OSX, Windows) by Jason on 03-12-2006

Update: The proof of concept that I did here was actually implemented as a feature into Parallels version 2.5. Did my idea inspire them or where they already working on it…? The world may never know! My humble idea had it’s 15 minutes of fame on the social network sites. Alas, this hack is no longer necesary for launching Windows applications. However, it still may be interesting and useful as a crude messaging system between the host and guest OS. With that I present the original article:

With the latest version of Parallels coherence mode you can run Windows apps yet have the Windows OS itself transparent. This creates the visual effect that you are running Windows apps within OSX. The coherence feature is still a little rough but it got my gears spinning and I saw some amazing possibilities. The illusion doesn’t seem quite complete to me without being able to launch Windows apps from the Dock. I created this simple app as a proof of concept that it could be easily done. It’s simple but it works!

You can try it out for yourself: Download docksync_v01.zip

The app requires .NET Framework 2.0 which you can install from Windows Update

Update: Grab Matt’s add-on DockSyncOSX and you can drag/drop Windows Shortcuts!

Demo Video

How does it work?

Obviously there is some communication between OSX and Windows already through parallels. But, not having access to that API, I decided to create a simple app on the Windows side that basically monitors a shared directory. On the OSX side, you simply create a specially crafted text file in that directory to send a command over to Windows. Any OSX method to generate a text file can be used. Just to keep things simple, I used a shell script that can be executed by double-clicking an icon. The result is crude but it works and hopefully might inspire someone to take it a little further.

Here’s a screenshot of the Windows app that’s monitoring for commands:

docksync.png

This is being released with no license so use the code at your own risk. If you have any suggestions or updates, please post them here. In particular if you know of an cleaner way to trigger the creation of the task file on the OSX side, that would be cool. Preferably something that people can create and edit without having to compile.

Download docksync_v01.zip

 

Comments:
35 Comments posted on "Launch Parallels Windows App From the OSX Dock"
Benniphx on December 3rd, 2006 at 8:04 pm #

the dockshare.exe give´s me allways a error under winxp sp2 german

but nice work, hop to get it wörking :)


Jason on December 3rd, 2006 at 8:14 pm #

Hey Benniphx, Do you have .NET Framework 2.0 installed?

Also, I don’t know if you have Visual Studio 2005, but if so you can try to compile it with the source included - or maybe if you have a friend also with German version of windows.

If you can send me the error message, maybe I can fix it…?


Mike Vitoroulis on December 3rd, 2006 at 8:20 pm #

Great! I will definitely be following the development of this program. I get a program error while trying to execute the .exe, it fails to launch properly. (Windows XP SP2)


Mike Vitoroulis on December 3rd, 2006 at 8:29 pm #

Ah! This requires .NET 2.0! Testing it out now. ;)


Jason on December 3rd, 2006 at 11:33 pm #

Glad you got it running! Lemme know if you do anything cool with it.


Philip Plante on December 4th, 2006 at 3:37 am #

I just was thinking about this app last night.

I was going to make Windows export its start menu, put it on the share, and then have OSX load that list into a Dock menu or something. Then using the same method as you have developed, it would launch the windows app.

Basically I wanted to get rid of the windows taskbar and such, possibly even kill explorer.exe so that I have more resources available.

Do you have any plans to further this?


Makepeace on December 4th, 2006 at 6:44 am #

Why using a text file for communication rather than direct TCP/IP?
Seems to me that it would be both faster and simpler to make this a simple webservice type app - send a request on a given port for a program to run (could be by name) and the service on Windows (running as system service natch) would run it…


Mark on December 4th, 2006 at 7:05 am #

That’s a very cool idea. I was thinking about this (the problem, not your solution) yesterday when I first tried coherence mode. Now if only the Windows icons for apps weren’t so ugly and out of place…


Tuaregue » Parallels ‘Coherency’ Mode on December 4th, 2006 at 8:15 am #

[...] EditComo se bastasse houve um caramelo que fez um programinha que permite executar programas que estejam numa VM do Parallels, apartir da dock do OSX. Oh! Maaaniiita! Acho que vais ficar com o meu portátil, é que eu vou-te gamar o MacBook se o comprares . [...]


Dan Atkinson on December 4th, 2006 at 8:43 am #

An excellent idea with some very wide ranging intergration benefits!

Reading the comments on Digg, it was interesting to note another possibility along this line… Retrieving the start menu information and structure and basically copying it into OSX for use in the dock. Sort of having a virtual Start menu in OSX.


Pat Zearfoss on December 4th, 2006 at 10:40 am #

Great idea!, But how does this speak for security running parallels. Doesn’t this open a potential doorway into macOS when running parallels?


Kada on December 4th, 2006 at 10:47 am #

Awesome. Looking Forward To New Features


[...] With the latest version of Parallels coherence mode you can run Windows apps yet have the Windows OS itself transparent. The illusion doesn’t seem quite complete to me without being able to launch Windows apps from the Dock. I created this simple app as a proof of concept that it could be easily done. It’s simple but it works!read more | digg story [...]


Andreas Pardeike on December 4th, 2006 at 1:19 pm #

Damn,
can’t this be done by scripting Parallels? I think you can start any app via AppleScript. So it would be quite easy to write decoy AppleScripts that start the counterpart in Parallels, stay open and once they quit, quit their counterpart too.

Or am I totally wrong here?
Andreas
http://www.twosailors.net


bill on December 4th, 2006 at 2:25 pm #

this is EXACTLY what they need to add to Parallels! Thank You


ron on December 4th, 2006 at 3:09 pm #

nice…but how do you add the shortcuts to the OSX dock?


Jason on December 4th, 2006 at 3:24 pm #

You can just drag the .term file onto your dock. Because it’s not a true application, you can’t drag it into the left-hand side of the dock, but you can drag it into the the right-hand side (next to the trash bin icon).

If you know how to write applescript, you could compile a script to take the place of this .term file and then the icon will seem just like a normal OSX application.


ron on December 4th, 2006 at 3:51 pm #

@Jason

thanks…but how do i create a new one? maybe you can give us an example of an Internet Explorer shurtcut.

thanx


ron on December 4th, 2006 at 3:59 pm #

shortcut


[...] Wer die Magie, die ich im letzten Beitrag beschrieben habe, noch erweitern möchte, kann mit der kleinen Freeware Docksync Windows-Anwendungen, die über Parallels gestartet wurden, im OS X Dock ablegen. Ein Screencast zeigt anschaulich, wie das geht. [...]


ron on December 4th, 2006 at 4:04 pm #

o.k.

it works…cool.


Jason on December 4th, 2006 at 4:25 pm #

Hey Ron, if you download the app you’ll see a file called notepad.term in there. Just place that anywhere you want, then drag it to the Dock.

If you want to change it from Notepad to IE, just open the .term file with TextEdit or whatever. You’ll see that its just a regular XML file. scroll down until you see NOTEPAD.EXE. You can just replace that with any Windows program.


jason on December 4th, 2006 at 5:22 pm #

This seems to be something that would lend itself SO well to a windows service that could always be running so you wouldn’t have to start and stop it yourself. Is this something you might look into for this app?


Jason on December 4th, 2006 at 6:01 pm #

yea, a service would definitely be the way to go. I do know how to write windows services without any trouble. I was waiting to see if there was any interest in this app before putting any more time. It made the digg front page, so I guess the answer is yes! But, also, I would be very surprised if Parallels does not add this functionality into the software soon - so I don’t know if it is worth it to get too carried away with this app. For now I have to get back to my paid work, but i probably will tweak around with this some more this week. thanks!


Chris Saad on December 4th, 2006 at 6:18 pm #

That would be cool for our app. The Mac community is yelling about our lack of Mac support.


Jason on December 4th, 2006 at 6:21 pm #

Hey MakePeace - that is an interesting idea. For that matter, if you have it using a web service, you could control your windows machine from anywhere - you could even have the listener app pointing at a public server. Kind scary, but interesting idea!


[...] VerySimple Dev Blog » Blog Archive » Launch Parallels Windows App From the OSX Dock The new ver of parallels sounds very interesting, indeed! (tags: apple software) [...]


Mac on December 5th, 2006 at 8:47 pm #

Nice app, but I don’t have an Intel Mac (gf does though!). Not sure you should release without any licence as this surely means anyone can patent the code and cut you out of it? Or use your code to power their app which they charge for and pay you nothing… you sound like an honest guy but unfortunately there are some nasty people around. And some of them runn computer companies!


Steven G. on December 6th, 2006 at 11:09 pm #

Nice Job with the Doc Sync. Heres a way to launch Win Apps from your OSx Doc without as much overhead. Not as flexible but works.


Steven G. on December 7th, 2006 at 12:55 pm #

Matt on December 13th, 2006 at 1:49 am #

Hey guys - I wrote an OSX app which will let you launch Windows shortcuts natively from your desktop.

DockSync is a Windows shortcut launcher for OSX. When running in tandem with the VerySimple-made DockSync Windows service, DockSync for OSX allows the user to simply double-click on an application shortcut copied from Windows to their OSX Desktop or dock.

http://farmproject.object-farm.org/blog/?p=4


[...] DockSync is a Windows shortcut launcher for OSX. When running in tandem with the VerySimple-made DockSync Windows service, DockSync for OSX allows the user to simply double-click on an application shortcut copied from Windows to their OSX Desktop or dock. DockSync also runs silently, as to never disrupt your workflow. [...]


drthipp on December 15th, 2006 at 12:32 pm #

if you want to get the applications on the left side of the dock …

make sure both docksync_v01 and DockSyncOSX are working
build the following automator workflow
get specified finder items (the .lnk file)
open finder items (with default application)
launch application (parallels)
save as application (not workflow)
drag the automator application to the dock

launching parallels isn’t necessary but it will bring parallels (not necessarily the app you just opened) to the front (it doesn’t do this automatically). to go one step further, open get info for the automator application and change the icon to whatever you want. the only “problem” is there’s no triangle under the app in the dock. voila … near total integration


drthipp on December 15th, 2006 at 1:26 pm #

if you setup the .lnk files to run thru automator (as above) you can also launch the app thru spotlight and probably quicksilver (i haven’t verified this).


Jurgen on December 23rd, 2006 at 2:00 pm #

I found a folder in my ~/Library/Parallels named “Windows Applications”.
It contains .app files (ok, technically a .app file is a folder) used to fill the dock with icons of running windows apps, but if you launch one of those apps it will open that particular program in Parallels.


Post a comment

Name: 
Email: 
URL: 
Comments: 
Close
  • Social Web

NOTE: Email is disabled

E-mail It