This is VERY VERY USEFUL to users who use Linux or Mac OS on host.
We wish a way to associate some MIME or suffix of file to an application installed in VM (usually Windows guest, for some Windows-only software).
I know this need filesystem work to automatically make the file accessable for guest, and automatically sync to host when save.
It would be AWESOME to double-click a file on host then open in guest's app
It would be AWESOME to double-click a file on host then open in guest's app
Last edited by mpack on 21. Aug 2020, 11:15, edited 1 time in total.
Reason: Remove unnecessary markup.
Reason: Remove unnecessary markup.
-
- Site Moderator
- Posts: 39156
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Mostly XP
Re: It would be AWESOME to double-click a file on host then open in guest's app
A VM is just a second PC, so anything you could do with two physical PCs you can still do when one or both PCs is virtual.
p.s. I removed your markup that doubled the size of your text. There's no need to shout.
p.s. I removed your markup that doubled the size of your text. There's no need to shout.
-
- Site Moderator
- Posts: 20965
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: It would be AWESOME to double-click a file on host then open in guest's app
Based on Mpack's statement above (The host and Virtualbox guest behave as two separate PCs), here's how this process could work in Virtualbox, and how you could do it yourself now with your own scripts (Guest Additions are required, see 'vboxmanage/vboxcontrol guestproperty get/set'):
Additionally, if multiple runs of the scripts run off the same host folder, a flag of sorts must be set to keep the GASF in place until the last script instance is finished using it.
- You double-click/right-click-Open-With a host file.
- The Open/Open-With command chosen is set by the Registry/whatever-Linux-or-Mac-uses-for-a-registry to start a custom host script/program.
- The host script makes a temporary writable Guest Additions Shared Folder in the folder containing the opened file.
- The host script sets a guestproperty to communicate to the guest that a file is ready, the GASF path where the guest can locate the file, the file name, and perhaps what guest program to open the file with.
- The host script monitors for the clearing of the guestproperty.
- A guest script monitoring for that changed guestproperty copies the file from the GASF to the guest filesystem's temp folder. (GASFs are only for copying, not opening/editing/saving).
- The guest script opens the temp file with the desired program. The script may attempt to open or lock the original GASF file to keep the host from editing that file too. Maybe a temporary "lock indicator flag file" gets created in the GASF to let the user know the guest is still processing the file.
- The guest script monitors the guest program's lock on the temp file or the running of the guest program itself, waiting for the guest program to be finished with the temp file.
- The guest script copies the temp file back into the GASF, removing the lock flag file after the copy is complete.
- The guest script clears the guestproperty.
- The host script notices the cleared guestproperty, removes the GASF configuration, and perhaps causes a temporary popup to show that the process is complete.
Additionally, if multiple runs of the scripts run off the same host folder, a flag of sorts must be set to keep the GASF in place until the last script instance is finished using it.
Re: It would be AWESOME to double-click a file on host then open in guest's app
This is similar to a feature in Parallels Desktop (though in that case, Parallels Desktop shows all Windows programs on ~/Applications/Applications (Parallels)/{VM Name}/Windows program name.app
So, you can tell Finder to open a file under any of the applications that are installed in a Windows VM and it will open it. I presume it copies the file, opens it in the actual VM and after the app is done, copies it back as scottgus explains it
So, you can tell Finder to open a file under any of the applications that are installed in a Windows VM and it will open it. I presume it copies the file, opens it in the actual VM and after the app is done, copies it back as scottgus explains it
-
- Site Moderator
- Posts: 20965
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: It would be AWESOME to double-click a file on host then open in guest's app
Yes, that setup sounds similar to what BJ6hello wants. It's really all a matter of what extra programs are installed in the guest OS and some starters & listeners on the host OS. There may even be drivers that can let the guest OS see into the host's file system, or more completely-API'd shared folders that can allow open/edit/save. Even a service that can show the guest program's icon on the host's taskbar, which tells the 'seamless-style' guest OS to show the program when clicked.CKing123 wrote:This is similar to a feature in Parallels Desktop
It all depends on what the program designer was shooting for. Parallels seems to want Windows 'parallel' to Mac OS, whereas Virtualbox shoots for a 'virtual box' inside the physical box.
Regrettably, a sense of practicality must be inserted: Parallels & similar programs and Virtualbox have both existed for some years, and Virtualbox doesn't have this yet, extremely likely because Oracle's customers haven't asked for it yet. It'll need a user to contribute code to get this in Virtualbox. Community-rolled Extension Pack & Guest Additions 2?
Re: It would be AWESOME to double-click a file on host then open in guest's app
Thank you scottgus1 for replying and detailing the stepsscottgus1 wrote:GASFs are only for copying, not opening/editing/saving
Why not use symbolic link?
I've tried, for example, on Linux host
Code: Select all
ln -s /media/mydrive/myfile /tmp/gasf/myfile
Windows guest apps can directly edit and save files in Z:
Also I've tried soft-linking a Linux host's folder into GASF, works.
Even we could try setting / as GASF so it works like wine's Z:
-
- Site Moderator
- Posts: 20965
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: It would be AWESOME to double-click a file on host then open in guest's app
If it works for opening/editing/saving, it's an outside case, and long-term it's best to not rely on outside cases. The guest program could update and change how it accesses the file and go too far outside the GASF capabilities.BJ6hello wrote:Why not use symbolic link?
Re: It would be AWESOME to double-click a file on host then open in guest's app
Recently a new project github.com/Fmstrat/winapps was launched.
People like me who want this feature can have a look.
It's similar to what I expected
People like me who want this feature can have a look.
It's similar to what I expected
-
- Site Moderator
- Posts: 20965
- Joined: 30. Dec 2009, 20:14
- Primary OS: MS Windows 10
- VBox Version: PUEL
- Guest OSses: Windows, Linux
Re: It would be AWESOME to double-click a file on host then open in guest's app
Appears to be based off KVM on Linux hosts, to run Windows apps in a Windows KVM guest, yet make them appear on the host, similar to Parallels mentioned above.BJ6hello wrote:github.com/Fmstrat/winapps
Of course, KVM != Virtualbox. Someone will probably have to contribute code to get this functionality into Virtualbox.