issues with copy/paste on Ubuntu Server VM

Discussions related to using VirtualBox on Mac OS X hosts.

issues with copy/paste on Ubuntu Server VM

Postby antoaunix » 23. Jul 2021, 02:09

hello, this is my first post

i use virtual box mainly for testing purposes. I am currently running VB 6.1.22 r144080 (Qt5.6.3) on OSX Catalina 10.15.7.
I am going crazy trying to have copy and paste work on a ubuntu server 18.04.5 LTS virtual machine. What have i tried already?


  • going to the VM preferences -> advanced -> Shared Clipboard as well as Drag'n'Drop set with Bidirectional (still no copy/paste)
  • sudo apt install virtualbox-guest-x11 and service virtualbox-guest-utils start (install but does nothing)
  • VBoxClient-all (command not found)
  • VBoxClient --clipboard (nothing happen)


how can i fix this? it's so annoying to type web addresses and long commands...
antoaunix
 
Posts: 8
Joined: 23. Jul 2021, 01:56

Re: issues with copy/paste on Ubuntu Server VM

Postby scottgus1 » 23. Jul 2021, 03:05

Guest Additions (and the prerequesites beforehand) need to be installed in the VM for shared clipboard to work. See https://www.virtualbox.org/manual/ch02. ... nux-prereq and https://www.virtualbox.org/manual/ch04. ... ions-linux

If you install these and still don't have shared clipboard, please post a vbox.log:

Start the VM from full normal shutdown, not save-state. Run until you see the problem happen, then shut down the VM from within the VM's OS if possible. If not possible, close the Virtualbox window for the VM with the Power Off option set.

Right-click the VM in the main Virtualbox window's VM list, choose Show Log. Save the far left tab's log, zip it, and post the zip file, using the forum's Upload Attachment tab.
scottgus1
Site Moderator
 
Posts: 13228
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: issues with copy/paste on Ubuntu Server VM

Postby antoaunix » 23. Jul 2021, 03:36

scottgus1 wrote:Guest Additions (and the prerequesites beforehand) need to be installed in the VM for shared clipboard to work. See

If you install these and still don't have shared clipboard, please post a vbox.log:

Start the VM from full normal shutdown, not save-state. Run until you see the problem happen, then shut down the VM from within the VM's OS if possible. If not possible, close the Virtualbox window for the VM with the Power Off option set.

Right-click the VM in the main Virtualbox window's VM list, choose Show Log. Save the far left tab's log, zip it, and post the zip file, using the forum's Upload Attachment tab.


Thank you Scott, the link you sent me aren't supposed to be for a linux host? i have an iMac, the ubuntu server is the VM... so if i'm correct i need to install the guest additions on my mac host? isn't it? where can i find the documentation for that? thanks
antoaunix
 
Posts: 8
Joined: 23. Jul 2021, 01:56

Re: issues with copy/paste on Ubuntu Server VM

Postby mpack » 23. Jul 2021, 09:30

antoaunix wrote:Thank you Scott, the link you sent me aren't supposed to be for a linux host?

The procedure for installing "prerequisites" is the same on a Linux guest as it is for the Linux host, so the GAs section refers you to an earlier description given in a Linux hosts section of the manual. I.e. the section Scott referred you to is correct.

I don't much care for that kind of cross referencing, and that one in particular strikes me as a tad awkward. Normally I would submit a suggested edit, but I'm not enough comfortable enough with Linux to do that this time.
mpack
Site Moderator
 
Posts: 34666
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: issues with copy/paste on Ubuntu Server VM

Postby granada29 » 23. Jul 2021, 10:04

antoaunix wrote:... so if i'm correct i need to install the guest additions on my mac host? isn't it? where can i find the documentation for that? thanks


No - The Guest Additions are installed in your Linux VM.

To add the CD image to the VM:
1. Give your VM window focus
2. In the Devices Menu on your Mac Menubar - select the item Insert Guest Additions CD Image ...
3. Mount the CD image in your VM - There are a few ways to do this in Linux. If you have a desktop environment you *may* get a popup. Alternatively you could mount the image from a commandline shell session
4. Run the Linux additions installation script that is in the now mounted CD image
granada29
Volunteer
 
Posts: 319
Joined: 3. Mar 2015, 07:27
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Linux, macOS, Windows

Re: issues with copy/paste on Ubuntu Server VM

Postby antoaunix » 23. Jul 2021, 17:21

first of all thanks to all the people that replied.
i tried to make it from scratch to avoid mistakes... here's the step i took

  1. created new ubuntu server VM
  2. inserted from the device menu the Guest Additions CD Image
  3. went to media folder and created a cdrom1 folder cd /media | sudo mkdir cdrom1
  4. mounted the drive sudo mount /dev/cdrom /media/cdrom1
  5. entered the cdrom1 folder cd cdrom1/
  6. installed the additions sudo ./VBoxLinuxAdditions.run
  7. reboot the machine sudo reboot

still doesn't work... is it seriously this hard to just enable a simple copy/paste????
pleeeease help me get out of this status :D

here you can see my log file (i tried to attach it but it's too big)
filemail[dot]com/d/cnvsayaddnpxtlp
antoaunix
 
Posts: 8
Joined: 23. Jul 2021, 01:56

Re: issues with copy/paste on Ubuntu Server VM

Postby scottgus1 » 23. Jul 2021, 19:10

The listed process does not include installing the prerequisites.

antoaunix should have wrote:
  1. created new ubuntu server VM
  2. installed the prerequistes from https://www.virtualbox.org/manual/ch02. ... nux-prereq
  3. inserted from the device menu the Guest Additions CD Image
  4. went to media folder and created a cdrom1 folder cd /media | sudo mkdir cdrom1
  5. mounted the drive sudo mount /dev/cdrom /media/cdrom1
  6. entered the cdrom1 folder cd cdrom1/
  7. installed the additions sudo ./VBoxLinuxAdditions.run
  8. reboot the machine sudo reboot


Both Virtualbox on the host and Guest Additions in the VM require the prerequisites. An explanation for why this prerequisite stuff is not done by the GAs installer is given in one of the two links I posted above.

antoaunix wrote:here you can see my log file

Zipped logs fit. The instructions I posted about posting a log did mention to use a zip file.

But do the prereqs first, then install the GAs, both in the VM. Then if shared clipboard doesn't start working, then zip and post the log.
scottgus1
Site Moderator
 
Posts: 13228
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: issues with copy/paste on Ubuntu Server VM

Postby mpack » 23. Jul 2021, 19:29

antoaunix wrote:is it seriously this hard to just enable a simple copy/paste????

"Simple"? I don't know of anybody that lets you copy/paste between PCs without needing to install software first, let alone between PCs running entirely different Operating Systems with mismatched UIs.
mpack
Site Moderator
 
Posts: 34666
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: issues with copy/paste on Ubuntu Server VM

Postby antoaunix » 23. Jul 2021, 20:38

scottgus1 wrote:The listed process does not include installing the prerequisites.

antoaunix should have wrote:
  1. created new ubuntu server VM
  2. installed the prerequistes
  3. inserted from the device menu the Guest Additions CD Image
  4. went to media folder and created a cdrom1 folder cd /media | sudo mkdir cdrom1
  5. mounted the drive sudo mount /dev/cdrom /media/cdrom1
  6. entered the cdrom1 folder cd cdrom1/
  7. installed the additions sudo ./VBoxLinuxAdditions.run
  8. reboot the machine sudo reboot


Both Virtualbox on the host and Guest Additions in the VM require the prerequisites. An explanation for why this prerequisite stuff is not done by the GAs installer is given in one of the two links I posted above.

antoaunix wrote:here you can see my log file

Zipped logs fit. The instructions I posted about posting a log did mention to use a zip file.

But do the prereqs first, then install the GAs, both in the VM. Then if shared clipboard doesn't start working, then zip and post the log.


thanks for your help! actually i'm kinda lost on what to do for prerequisites... i'll tell you my exact steps so you see if i misunderstood something about the prereq.

  1. deleted the old VM and all related files
  2. created a new ubuntu server vm and installed the os
  3. on VBox app i went to preferences > general > advanced and selected bidirectional both for shared clipboard and for drag n drop
  4. sudo apt-get update -y for updating
  5. sudo apt-get install -y qt5-default for installing QT
  6. sudo apt-get install -y libsdl2-dev for installing SDL
  7. sudo apt-get remove virtualbox-dkms | sudo apt-get install virtualbox-dkms installing the driver
  8. uname -a [b] to get the uname
  9. [b]sudo apt-get install build-essential linux-headers-4.15.0-151-generic dkms virtualbox-dkms installing the header
  10. sudo modprobe vboxdrv | sudo modprobe vboxnetflt enabling the drivers
  11. inserted from the device menu the Guest Additions CD Image
  12. went to media folder and created a cd1 folder cd /media | sudo mkdir cd1
  13. mounted the drive sudo mount /dev/cdrom /media/cd1
  14. entered the cdrom1 folder cd cd1/
  15. installed the additions sudo ./VBoxLinuxAdditions.run
  16. reboot the machine sudo reboot

what am i missing? it still doesn't work... did i misunderstood prereq ?
Thanks
Attachments
CKAD-2021-07-23-20-37-40.log.zip
(32.2 KiB) Downloaded 3 times
antoaunix
 
Posts: 8
Joined: 23. Jul 2021, 01:56

Re: issues with copy/paste on Ubuntu Server VM

Postby scottgus1 » 23. Jul 2021, 20:49

I'm happy to report that the GAs did install:
00:30:34.274651 VMMDev: Guest Additions information report: Version 6.1.22 r144080 '6.1.22'


However, I don't know if the VM ran long enough to try shared clipboard:
00:30:28.972710 VMMDev: Guest Log: BIOS: Booting from Hard Disk...
00:30:34.274651 VMMDev: Guest Additions information report: Version 6.1.22 r144080 '6.1.22'
00:30:53.787483 Changing the VM state from 'RUNNING' to 'SUSPENDING'

That's only 25 seconds of run time from boot to GAs to turn-off. I wonder if the VM OS services that have to start had time.

Try again, double check shared clipboard Bidirectional is on in the VM, and leave it sit for a few minutes so the OS can stabilize.
scottgus1
Site Moderator
 
Posts: 13228
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: issues with copy/paste on Ubuntu Server VM

Postby fth0 » 23. Jul 2021, 21:32

Skimming this thread, I may have overlooked something, but I think nobody asked if you're using a GUI (X11/Wayland)?

Linux server variants are often used without a GUI, and the VirtualBox Clipboard doesn't work without X11 or Wayland. When using SSH to connect to the Linux guest OS, copy and paste should work as usual (CMD-X/C/V from the macOS SSH client).
fth0
Volunteer
 
Posts: 2455
Joined: 14. Feb 2019, 03:06
Location: Germany
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...

Re: issues with copy/paste on Ubuntu Server VM

Postby antoaunix » 23. Jul 2021, 23:45

scottgus1 wrote:I'm happy to report that the GAs did install:
00:30:34.274651 VMMDev: Guest Additions information report: Version 6.1.22 r144080 '6.1.22'


However, I don't know if the VM ran long enough to try shared clipboard:
00:30:28.972710 VMMDev: Guest Log: BIOS: Booting from Hard Disk...
00:30:34.274651 VMMDev: Guest Additions information report: Version 6.1.22 r144080 '6.1.22'
00:30:53.787483 Changing the VM state from 'RUNNING' to 'SUSPENDING'

That's only 25 seconds of run time from boot to GAs to turn-off. I wonder if the VM OS services that have to start had time.

Try again, double check shared clipboard Bidirectional is on in the VM, and leave it sit for a few minutes so the OS can stabilize.


just tried, 5 minutes uptime but still nothing :( i did check for bidirectional, it seems all fine :(
antoaunix
 
Posts: 8
Joined: 23. Jul 2021, 01:56

Re: issues with copy/paste on Ubuntu Server VM

Postby antoaunix » 23. Jul 2021, 23:52

fth0 wrote:Skimming this thread, I may have overlooked something, but I think nobody asked if you're using a GUI (X11/Wayland)?

Linux server variants are often used without a GUI, and the VirtualBox Clipboard doesn't work without X11 or Wayland. When using SSH to connect to the Linux guest OS, copy and paste should work as usual (CMD-X/C/V from the macOS SSH client).


yeah i'm not using the GUI... there is completely no method for using it? i think i had seen some video on youtube where it was working... but i'm not sure. now i'm curious to learn and fix... but actually with ur suggest i could use copy and paste!!!! i installed openssh server and am just using the server from my host terminal! thank you so much! finally i don't have to type long urls :D
antoaunix
 
Posts: 8
Joined: 23. Jul 2021, 01:56

Re: issues with copy/paste on Ubuntu Server VM

Postby scottgus1 » 24. Jul 2021, 00:19

Ah, yes, no gui! fth0 takes the prize!
scottgus1
Site Moderator
 
Posts: 13228
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: issues with copy/paste on Ubuntu Server VM

Postby antoaunix » 24. Jul 2021, 00:22

scottgus1 wrote:Ah, yes, no gui! fth0 takes the prize!

so no fix for poor guy no gui? :D i mean, aside the ssh workaround
antoaunix
 
Posts: 8
Joined: 23. Jul 2021, 01:56

Next

Return to VirtualBox on Mac OS X Hosts

Who is online

Users browsing this forum: No registered users and 17 guests