wine without capturing mouse - virtual-machine

I wonder, can I use wine like a sort of virtual machine? I mean, can I run windows programs without mouse / keyboard capturing?
Second question, connected with the first one, how does several programs, run with wine, interact with each other? For example, do they see each other processes and can they read each other memory?
If I can't do it with wine, is there wine analogs, that can do it?
P.S.
I do not consider virtual machines because it is very heavy program, and wine uses much lesser resources

Wine does not 'capture' the keyboard and mouse like virtual machine software usually does - whatever program you run in wine is able to interact with your keyboard and mouse in the same manner any other application running on your machine does, since the window is actually handled by your operating system like any other desktop software. Certain games may capture the mouse, the same way they do on windows.
In much the same way, wine doesn't really sandbox your application like a virtual machine does - the application, if it chose to, could do anything that any other software run as your user account could do.
That said, running incompatible software simultaneously in two different wine prefixes can usually be done.

Related

What is the difference in physical behavior of hardware on bare metal vs VM with IOMMU passthrough?

I have some dated equipment used to run an experimental apparatus. Unfortunately, that equipment will only run on WinXP using FireWire/IEEE1394, which is becoming more and more of a pain for us to maintain hardware-wise. Unfortunately we also don't have the money to replace this equipment. We discussed perhaps trying to virtualize the XP environment on a newer OS. I'd been reading about VFIO/IOMMU and figured maybe I could pass the FireWire PCI cards through and just do it that way.
Plus side - I got it to work. I installed XP with a QEMU-KVM hypervisor. Got it set up, passed the firewire cards through, and all was recognized in the VM, including when I attached the equipment to the FW cards. XP device manager saw that it was all there.
Unfortunately, I've found that the actual interaction with the hardware seems to be touchy at best. Things misbehave in weird, unexplainable ways. Some of those made me think that the guest OS wasn't communicating with the passed through cards correctly. This was surprising as I was under the impression that passed through cards were utilized directly by the guest OS without host OS intervention.
My question is basically - if I'm virtualizing an older system and passing through the various ports/cards needed, should it behave as if it were bare metal? Or are there circumstances where what the guest OS tries to do is not the same as if it were bare metal (I.E - the host OS changes something when the instruction leaves the VM)? As I said - I was under the impression that the guest OS was interacting with hardware directly, but experience has made me question if this is actually the case.
Part of the reason I want to know this is that there's other equipment that would be more dangerous or lead to damage of the equipment if it behaved unexpectedly (I.E Lasers where power is computer controlled) that uses other hardware interfaces. So, if there is a risk of what the guest OS thinks it's doing being disconnected from the actual reality, that's a safety risk that I want to understand before going forward.

Multiseat setup for fun and profit: hypervisors and other choices

I am grad student, and I am considering setting up my dream home workstation/art tool/entertainment device/all-purpose everything. I'm wondering if what I want to do is possible (and practical), and if so, get some suggestions and warnings from people who know more about virtualization and hypervisors than I do:
Aim: Set up a 2-4 headed computing station that is optimized for using different OS'sfor different tasks I do. I want to keep my work/play streams separated, and have control over the resources that each one is allowed. For example, one head would be Windows 10 for audiovisual work, media playing, and maybe some gaming. Another head would use Linux and be used mainly for data science (mostly R and Python), and some hosting for purely local use (such as running an instance of the Galaxy bioinformatics server, which I only plan to access locally).Finally, I want a VM that is purely devoted to web-browsing, probably some lightweight Linux distro.
I want each OS to have it's own keyboard and monitor(s), but ideally I want to copy-paste between OSs. The idea is to just swivel my chair to move between operating systems, or even to have one person using each.
What I think I need:
A hypervisor with PCI, USB, and network controller pass-through.
Two video cards,one each for my Windows and Linux workstations (with the web browsing VM using the on-chip CPU graphics). Obviously, a mobo and CPU that support full virtualization.
A USB card with multiple separate controllers, so that I can use a different controller for each OS. Something similar for network interface cards.
Separate SSDs for each OS and its apps.
Some sort of storage pool (probably ZFS based) to hold the bulk of my files, shared so I can access them from either guest. Ideally, I'd like to to be in a separate enclosure, but I don't trust eSATA cables (they seem to fail frequently) and care about speed of database access, so I'll probably put the drives inside the main case, even though that will make future migration more annoying.
Something like SPICE for KVM, so that I can copy and paste freely between OS's.
Is there anything I am overlooking?
What hypervisor or similar solution is best for what I want to do? I am leaning towards KVM, but am far from committed.I will consider paid solutions if there is a compelling reason to use them.
What are some pitfalls I should be wary of?
kvm will work here ideally, a lot of tutorials and lot of intel based configurations working like a charm
zfs can't share your data, u need nfs or samba share on host machine
Synergy software is for you.

Is it possible to have multiple VMs running on same machine with individual monitors, mouse and keyboard?

I am buying parts to build a fairly powerful machine for myself (i7-6700k, GTX 970, 32 GB RAM, etc for those who'd like to know technical details)
Kids also need their old computers replaced so the thought came to mind what if I could run 4 VMs on my machine giving us 4 workstations with 4 separate monitors, mouse and keyboard to login to their own user accounts and do whatever they like.
Is this something possible? If yes, will it be like 4 VMs running in 4 different tabs on 4 monitors? How cumbersome is it going to be to maintain/operate? Thanks!
Yes it's possible however kind of cumbersome mode of operation.
You'll be having a main vmware server for example or even vmware workstation would suffice then you'd simply install all the operating systems you need with the configurations you like.
When you're all set with them. Fire them up and pass each one to a different monitor you like and pair your each mouse and keyboard with individual vm. This configuration can be done easily with vmware menu.
As you can imagine, this is simply a master/slave matter so that your mainframe(actual pc) would have to be running all the time.
If you already have a separate monitor and set of mouse-keyboard, you can give it a shot and see it in action for yourself.
Hope this would help.

C++ Issue creating a mouse simulator

I have been given the following project to do:
create a program that runs on computer 1. The program will simulate mouse movements and pass that information through a usb cable from computer 1 to computer 2. Computer 2 must believe the information being passed to it is coming from a mouse-device.
Basically computer 2 has to believe that a mouse is connected to its usb-port, when actually it is another computer (computer 1), and computer 1 basically simulates mouse movements. Which movements the computer simulates doesn't really matter because that would probably be the easy bit, the harder bit is actually making the software that makes that possible.
QUESTION: Is there any program that currently does that? If so please tell me which one it is. If there isn't any program you know of, how would I go about making it myself?
PS: I would assume that this project is theoretically possible. I mean the computer 1 would just have to send signals to computer 2 that are similar to the normal signals sent to a computer by an ordinary mouse.
The ability to act as a USB host as well as a client (keyboard, mouse, etc.) is not typically part of the USB chipset in PCs. The ability to serve either role requires something unique like USB OTG; which you can find in some mobile phones.
So no, this is generally not possible with two random PCs and a USB cable. In any case, you can find a discussion on this here:
Emulate USB Device with USB Host
The thread mentions that you could make a proxying device with active electronics in it to sit between two host-only devices and be capable of translating to appear as a client to one. But with just a plain old USB cable you can't.
Since you're so specific about wanting it to be done with USB and no need to install special software you are probably not interested in something like Synergy:
https://en.wikipedia.org/wiki/Synergy_(software)
...but someone else finding this question might be.

Virtual monitors on single monitor

Our application is to display different things on different monitors at the same time. One of them is a touch screen and another a typical monitor. I'm somehow forced to develop this in an environment with only one monitor. Is there any way to simulate two monitors in an environment with only one monitor? I thought that this would be easy with some virtualization software but I couldn't find anything like this. Any ideas?
May be VirtualBox could help? It supports multiple monitor guest systems even if there are less monitors on the host.