How can I copy/paste to and from the remote host clipboard to an remote server?
I need to run simulation tool (GUI application) on our EXSi testing server booted with SLES11 P4 (SUSE Linux Enterprise Server Patch 4).
So I created simple VNC server session by
vncserver -geometry 1024x768 -depth 16 from ssh terminal.
VNC session created and by default it will load TWM desktop when you access the remote server with VNC. It very lightweight but too geeky and slugish for me. I prefer KDE or GNOME.
To load KDE, you need to modify
~/.vnc/xstartup file. Comment or remove
twm & and replace with that line with
/usr/bin/startkde. Then kill existing VNC session and start VNC session. For Gnome just change it with
/usr/bin/gnome. Only one desktop type should be inside your configuration.
I need to transfer some string data with copy and paste between me and remote server that connected with VNC, but by default both client and host clipboard are not transferred and I don’t like it.
After a while, I got idea to use
autocutsel package! The bad thing is not available on SLES11 P4 official repository, even for older <= SLES11 P3.. :’(
But later I found this 2 years old community package by Malcolm Lewis.
Refresh PGP key (since it been a while, I sync the keys) and install the package:
$ sudo zypper --gpg-auto-import-keys ref $ wget http://download.opensuse.org/repositories/home:/malcolmlewis:/SLE_11_General/SLE_11_SP4/x86_64/autocutsel-0.10.0-1.1.x86_64.rpm $ sudo rpm -iVh autocutsel-0.10.0-1.1.x86_64.rpm
Next, our final step.. just execute
autocutsel -s CLIPBOARD -fork from terminal to create deamon and start sharing clipboard vise versa between you computer and remote server from VNC!
P/s : This tutorial should be work for any linux disto with
autocutsel package installed not limited to SLES/Suse only.
Robbi Nespu | Bash, EXSi, Linux, SLES, Server, Suse, VMware, VNC