utmapp / UTM

Virtual machines for iOS and macOS
https://getutm.app
Apache License 2.0
26.31k stars 1.31k forks source link

Clipboard sharing not working #1204

Closed ankushnarula closed 3 years ago

ankushnarula commented 3 years ago

Under the QEMU tab, checking the Advanced option doesn't enable the ability to edit settings and also disables scrolling of the QEMU arguments list.

UTM 2.0.3 (13) on macOS 11.01 arm64

Reproduce:

  1. Create an Ubuntu ARM64 virtual machine as described on this UTM wiki page.
  2. Save changes
  3. Edit the saved machine
  4. On the QEMU tab, enable the Advanced option box
  5. Attempt to scroll or edit the QEMU arguments list

utm-vm-settings-qemu-advanced

ankushnarula commented 3 years ago

FYI, I came across this bug because I'm having difficulty using qemu-guest-agent on the Ubuntu guest (with desktop installed).

I've never used QEMU before and so my current theory is that the default setting of: -device virtserialport,chardev=qga0,name=com.redhat.spice.0

needs to be changed to: -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0

I assume this because when attempting to start the service in the guest it times out because it can't access the device.

I'd like to be able to test this theory from the UI.

osy commented 3 years ago

Advanced mode means it throws out all the arguments except a few mandatory ones and you manually specify every argument. It’s really only useful for debugging or creating a highly custom .utm for distribution.

If you want to have copy/paste and resolution changing and other stuff I would install sudo apt install spice-vdagent spice-webdavd.

ankushnarula commented 3 years ago

I'm running into a similar problem with a very similar error message:

image
osy commented 3 years ago

@ankushnarula Did you enable clipboard sharing from settings?

osy commented 3 years ago

Hijacking this issue to track clipboard sharing issue on macOS.

fjwillemsen commented 2 years ago

On UTM 3.2.4 on M1 Pro with Ubuntu 22.04 LTS server I can't get clipboard sharing to work. I have checked the box in the VM setup and installed spice-vdagent as per the guide here. I had to manually start the service, but even though it says it is active (attached screenshot), it doesn't work.

image

What am I doing wrong here?

ktprograms commented 2 years ago

In the Ubuntu desktop, in a shell, run spice-vdagent (note that this doesn't end in "d" like with the service).

You can also see how to add it to the GNOME autostart commands. It needs to run in an Xorg environment (not the TTY)

fjwillemsen commented 2 years ago

Thank you for your response. Upon doing so, I got the following error:

image
ktprograms commented 2 years ago

Are you running Wayland or X11? (Check in the options at the login screen)

fjwillemsen commented 1 year ago

I had the choice between "Ubuntu" and "Ubuntu on XOrg", this happened on "Ubuntu". But I just tried again and it works, so I suppose it's alright now - thanks for your help!

Kevinizevbigie commented 1 year ago

I had the choice between "Ubuntu" and "Ubuntu on XOrg", this happened on "Ubuntu". But I just tried again and it works, so I suppose it's alright now - thanks for your help!

How did you get this working? I went through all the steps but I am unable to copy from my macOS clipboard to the VM.

I tried on Ubuntu, Ubuntu on Xorg and i3. None work.

fjwillemsen commented 1 year ago

@vinn2010 if I remember correctly, by going to Xorg and doing what @ktprograms suggested.

erzakiev commented 1 year ago

In the Ubuntu desktop, in a shell, run spice-vdagent (note that this doesn't end in "d" like with the service).

You can also see how to add it to the GNOME autostart commands. It needs to run in an Xorg environment (not the TTY)

Thanks for the response. So there is no way to set up copy-pasting with utm-virtualized ubuntu 22.04 LTS SERVER version (without GUI)?

ktprograms commented 1 year ago

No, it requires an X11 GUI environment

just-doit commented 1 year ago

Just so I understand this correctly. There is NO clipboard sharing between macOS and the console? I can't believe that...

ktprograms commented 1 year ago

I can't believe that... In theory someone could write a program to read from the spice port and inject keypresses, but it's not been done yet.

Anyway, if you don't have a need for a GUI (hence being in a console), just use a serial port display, you can copy/paste from that since it's just like a Terminal.app.

just-doit commented 1 year ago

Anyway, if you don't have a need for a GUI (hence being in a console), just use a serial port display, you can copy/paste from that since it's just like a Terminal.app.

You're right, of course, and I'm currently doing it that way, too.

godblesslancek commented 9 months ago

Thank you, the solution of installing ubuntu-gnome-desktop over a vanilla Ubuntu ARM64 VM worked like a charm for me, the clipboard now works when doing Ctrl^+Maj+V .

What worked for me Enable "Clipboard sharing" sudo apt install ubuntu-gnome-desktop reboot

What didn't work for me Enable "Clipboard sharing" sudo apt install spice-vdagent reboot

Not sure why installing gnome desktop environment did the trick, though.

ChilledAlpaca commented 7 months ago

Just so I understand this correctly. There is NO clipboard sharing between macOS and the console? I can't believe that...

https://serverfault.com/questions/874309/virt-manager-spice-copy-paste-doesnt-work says that a serial has to be created, for me it did the job. I got a terminal window, to work in and to paste for my macOS host