Page 1 of 1
Paste into Linux Console?
Posted: 11. Jan 2011, 12:53
by ichilton
Hi,
I'm running VirtualBox 4.0 on Mac OS X.
I have a Debian guest but no X - just command line.
Is it possible to get it so I can copy and paste between the host and the Debian console?
Thanks,
Ian
Re: Paste into Linux Console?
Posted: 11. Jan 2011, 15:01
by towo
I would use ssh for that.
Re: Paste into Linux Console?
Posted: 11. Jan 2011, 15:09
by ichilton
Hi,
I've got that as well, but I wanted a way to paste in the console too...
Thanks,
Ian
Re: Paste into Linux Console?
Posted: 11. Jan 2011, 16:44
by Perryg
Install the guest additions (in the guest) with the switch --nox11
Re: Paste into Linux Console?
Posted: 11. Jan 2011, 17:06
by ichilton
Hi,
Thanks - I just tried that but I dont seem to have the dkms package the documentation says to install, so I get this:
Code: Select all
# ./VBoxLinuxAdditions.run --nox11
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.0.0 Guest Additions for Linux.........
VirtualBox Guest Additions installer
Removing installed version 4.0.0 of VirtualBox Guest Additions...
Removing existing VirtualBox DKMS kernel modules ...done.
Removing existing VirtualBox non-DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules
The headers for the current running kernel were not found. If the following
module compilation fails then this could be the reason.
...fail!
Your system does not seem to be set up to build kernel modules.
Look at /var/log/vboxadd-install.log to find out what went wrong.
Once you have corrected it, you can run
/etc/init.d/vboxadd setup
to build them.
Doing non-kernel setup of the Guest Additions ...done.
Installing the Window System drivers ...fail!
(Could not find the X.Org or XFree86 Window System.)
Any ideas?
Thanks,
Ian
Re: Paste into Linux Console?
Posted: 11. Jan 2011, 17:19
by Perryg
Normal response since you don't have a window system installed.
If you have the packages installed to be able to build external modules (build-essential linux-headers-(that fit your kernel)) you should have the shared folders, and bidirectional clipboard available to you. If not then you need to install the the additional packages (in the guest) and then re-install the guest additions with the same --nox11 switch.
Re: Paste into Linux Console?
Posted: 11. Jan 2011, 17:41
by ichilton
Hi,
Thanks - installed those packages and the installation seemed to succeed, but nothing seems any different?
Code: Select all
# ./VBoxLinuxAdditions.run --nox11
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.0.0 Guest Additions for Linux.........
VirtualBox Guest Additions installer
Removing installed version 4.0.0 of VirtualBox Guest Additions...
Removing existing VirtualBox DKMS kernel modules ...done.
Removing existing VirtualBox non-DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules
Your guest system does not seem to have sufficient OpenGL support to enable
accelerated 3D effects (this requires Linux 2.6.27 or later in the guest
system). This Guest Additions feature will be disabled.
Building the main Guest Additions module ...done.
Building the shared folder support module ...done.
Doing non-kernel setup of the Guest Additions ...done.
Starting the VirtualBox Guest Additions ...done.
Installing the Window System drivers ...fail!
(Could not find the X.Org or XFree86 Window System.)
Do I have to do something to activate it?
Thanks,
Ian
Re: Paste into Linux Console?
Posted: 11. Jan 2011, 17:47
by Perryg
Have you tried the shared folders and clipboard?
It looks to me like they are now installed.
Edit: if memory servers me the keyboard shortcuts may not work in a terminal but the mouse clicks do.
Re: Paste into Linux Console?
Posted: 11. Jan 2011, 18:15
by ichilton
Hi,
I've not tried shared files, but copy and paste doesn't seem to work with the keyboard and with the mouse, when I go over the window, the mouse disappears as it's captured by the VM....
Ian
Re: Paste into Linux Console?
Posted: 11. Jan 2011, 18:16
by ichilton
Hi,
Aha, I just installed gpm on the guest and now I get a mouse cursor on there and I can copy and paste on it but the clipboard seems separate to the host - each is kept separate.
Any ideas?
Thanks,
Ian
Re: Paste into Linux Console?
Posted: 12. Jan 2011, 00:47
by Sasquatch
You need a full GUI to have shared clipboard. I understand that you got most part done, all that's left is to use a program that understands the clipboard. Xterm is not such program, but a gedit or similar is.
But as for the original question, you can't have copy/paste through shared clipboard on a CLI system like Linux server. There is no clipboard in a TTY, only a buffer created by the program itself, accessible only for itself (e.g. vim).
Re: Paste into Linux Console?
Posted: 12. Jan 2011, 00:57
by ichilton
Ah, ok - that explains it.
Thanks for the clarification.
Ian
Re: Paste into Linux Console?
Posted: 6. Apr 2011, 15:17
by benoitj
Hello,
I have to partially disagree with Sasquatch. I agree that by default, mouse & copy/paste is not supported in console, but gpm was created to provide this. This daemon was created quite long time ago.
here is the package description on debian:
This package provides a daemon that captures mouse events when the system console is active, and delivers events to applications through a library.
By default, the daemon provides a 'selection' mode, so that cut-and-paste with the mouse works on the console just as it does under X.
This works for any console apps as well (you can select & paste in vi) and works across ttys (you can select in one tty and paste in another one).
Agreed this is different than the buffer in X.
Any idea is VB plan support for gpm in guest additions?
thanks,
Benoit
Re: Paste into Linux Console?
Posted: 6. Apr 2011, 15:24
by ichilton
Hi,
I remember trying that but it still wouldn't seem to paste..
Ian
Re: Paste into Linux Console?
Posted: 24. Sep 2014, 14:49
by Brimur
An old thread I know but it was the first search result so I thought I would update this one.
My solution to this particular problem was to use Putty to SSH into the linux box and paste that way. Hope that helps others.