Can you put a link to a file on the dock? Specifically: Booting a VM with one click?

Discussion in 'macOS' started by Spanky Deluxe, Jul 19, 2007.

  1. Spanky Deluxe macrumors 601

    Spanky Deluxe

    Joined:
    Mar 17, 2005
    Location:
    London, UK
    #1
    I'm using Fedora 7 in a VMWare virtual machine at the moment for development and was wondering if there was any way to automatically start up the virtual machine from the dock? Double clicking the virtual machine's file in the finder opens it up and boots it like I'd like, however, I can't put it on my dock. Ay ideas?
     
  2. wrldwzrd89 macrumors G5

    wrldwzrd89

    Joined:
    Jun 6, 2003
    Location:
    Solon, OH
    #2
    It has to be on the right side of the dock, not the left side. The dock forbids documents from living on the left and applications from living on the right. I know from personal experience how annoying this can be.
     
  3. Spanky Deluxe thread starter macrumors 601

    Spanky Deluxe

    Joined:
    Mar 17, 2005
    Location:
    London, UK
    #3
    Grrr, that is irritating. I can understand why they'd make it so that documents can't be put on the dock by default since then people would end up accidentally dragging their word files there instead of into word, however, they should make it so that if you hold option or something then you *can* move documents there.

    *Goes off to wonder how easy/hard it'd be to write a little launcher program*
     
  4. jdechko macrumors 68040

    Joined:
    Jul 1, 2004
    #4
    Is there anyway to change the properties of an alias in OS X?

    I think it's pretty easy to accomplish, but I'm not sure how to do it in OS X.

    For example, in Windows I could go to the run menu and type in
    Code:
    Notepad "C:\new.txt"
    and have new.txt open up with the notepad application, or I could use Word, or textedit, or whatever program to open a plain text document, where Notepad/Winword/textedit is the command and "C:\new.txt" is the argument. I can also create a shortcut (alias) that points to that same bit of code.

    From what I understand, aliases to programs are allowed to reside on the dock, so if you created a new alias to parallels/vmware and were able to add the path of your VM as an argument I believe you might be able to accomplish what you are looking to do with minimal effort.

    Or maybe use Automator to create a scripted action (tell finder to start parallels if its not running, tell Parallels to start Fedora VM).
     
  5. Spanky Deluxe thread starter macrumors 601

    Spanky Deluxe

    Joined:
    Mar 17, 2005
    Location:
    London, UK
    #5
    Right, I'm back and I have a solution.

    1. Open up the Script Editor (in /Applications/AppleScript/ - you *may* have to install the DevTools, I don't know).
    2. Type the following code in:
      Code:
      do shell script "open '/Volumes/Macintosh HD/Virtual Machines/Fedora.vmwarevm'"
      You'll want to replace the "/Volumes/Macintosh HD/Virtual Machines/Fedora.vmwarevm" bit to the document of your choice of course. (Make sure you get the apostrophes and speech marks right).
    3. File->Save As. Change the file format from script to application and save the file wherever you want.
    4. Find the file you just saved, put it somewhere safe (i.e. the Applications folder, rename it to what you want it to say on the dock and change the icon to whatever you want via the Get Info window too.
    5. Drag said application to your dock.

    That's it! It will of course not act exactly the same way as a normal application, i.e. it'll only bounce for a bit, closes soon afterwards and you'll get the main application icon somewhere else on the dock (i.e. VMware in my case) but it seems to work ok. :)
     
  6. kostia macrumors regular

    Joined:
    Apr 14, 2007
    #6
    If you're on an Intel Mac, choose "application bundle," not "application," or you'll end up with a PowerPC app instead of a Universal Binary.
     
  7. apfhex macrumors 68030

    apfhex

    Joined:
    Aug 8, 2006
    Location:
    Northern California
    #7
    I don't get what the problem is. Put the document on the right side of you're Dock. Done. :confused: Unless you're just set on having it on the applications side, in which case it sounds like that script will work out quite well.
     
  8. Spanky Deluxe thread starter macrumors 601

    Spanky Deluxe

    Joined:
    Mar 17, 2005
    Location:
    London, UK
    #8
    For a lot of stuff having it on the right side is fine, if you're working on a word document temporarily etc. In my case I want it to load like an application, its using the same file every time but its not a short term document, its something I use all day long and will be doing so for months and months yet, hence why I want it on the left.

    I'd much prefer to have a couple of icons in the left part of the dock that will boot up a Windows XP virtual machine or a Fedora virtual machine etc.
     

Share This Page