NoVNC Web Console Clipboard Feature Requires SPICE Agent?

Sep 1, 2022
240
46
33
40
Just to confirm, if I want to enable the NoVNC clipboard feature, I have to install the SPICE Agent tools inside the guest, correct?

I have a Debian server VM that I'd like to be able to paste text into via the web console, if only to paste in my user's password, so I attempted to install spice-vdagent.

That didn't go so well.

Code:
 apt install spice-vdagent
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  adwaita-icon-theme alsa-topology-conf alsa-ucm-conf at-spi2-common at-spi2-core dconf-gsettings-backend dconf-service fontconfig
  fontconfig-config fonts-dejavu-core gsettings-desktop-schemas gtk-update-icon-cache hicolor-icon-theme libasound2 libasound2-data
  libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-0 libavahi-client3 libavahi-common-data libavahi-common3 libcairo-gobject2 libcairo2 libcolord2
  libcups2 libdatrie1 libdconf1 libdeflate0 libdrm-common libdrm2 libepoxy0 libfontconfig1 libfribidi0 libgdk-pixbuf-2.0-0
  libgdk-pixbuf2.0-bin libgdk-pixbuf2.0-common libgraphite2-3 libgtk-3-0 libgtk-3-bin libgtk-3-common libharfbuzz0b libjbig0 libjpeg62-turbo
  liblcms2-2 liblerc4 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpciaccess0 libpixman-1-0 librsvg2-2 librsvg2-common
  libthai-data libthai0 libtiff6 libwayland-client0 libwayland-cursor0 libwayland-egl1 libwebp7 libxcb-render0 libxcb-shm0 libxcomposite1
  libxcursor1 libxdamage1 libxfixes3 libxi6 libxinerama1 libxkbcommon0 libxrandr2 libxrender1 libxtst6 x11-common
Suggested packages:
  libasound2-plugins alsa-utils colord cups-common gvfs liblcms2-utils librsvg2-bin
The following NEW packages will be installed:
  adwaita-icon-theme alsa-topology-conf alsa-ucm-conf at-spi2-common at-spi2-core dconf-gsettings-backend dconf-service fontconfig
  fontconfig-config fonts-dejavu-core gsettings-desktop-schemas gtk-update-icon-cache hicolor-icon-theme libasound2 libasound2-data
  libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-0 libavahi-client3 libavahi-common-data libavahi-common3 libcairo-gobject2 libcairo2 libcolord2
  libcups2 libdatrie1 libdconf1 libdeflate0 libdrm-common libdrm2 libepoxy0 libfontconfig1 libfribidi0 libgdk-pixbuf-2.0-0
  libgdk-pixbuf2.0-bin libgdk-pixbuf2.0-common libgraphite2-3 libgtk-3-0 libgtk-3-bin libgtk-3-common libharfbuzz0b libjbig0 libjpeg62-turbo
  liblcms2-2 liblerc4 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpciaccess0 libpixman-1-0 librsvg2-2 librsvg2-common
  libthai-data libthai0 libtiff6 libwayland-client0 libwayland-cursor0 libwayland-egl1 libwebp7 libxcb-render0 libxcb-shm0 libxcomposite1
  libxcursor1 libxdamage1 libxfixes3 libxi6 libxinerama1 libxkbcommon0 libxrandr2 libxrender1 libxtst6 spice-vdagent x11-common

Obviously, I don't want to install X11, at least parts of Wayland, and ... huge chunks of gnome (?), along with some themes ... to get NoVNC copy/paste working in my headless MariaDB server.

Is there any other way to do this?
 
AFAIK, you need spice as a graphics card and need X with spice integration to be able to copy&paste directly in a graphical manner.
You can however configure a serial terminal and work with that via the noVNC console.
 
  • Like
Reactions: SInisterPisces
Obviously, I don't want to install X11, at least parts of Wayland, and ... huge chunks of gnome (?), along with some themes ... to get NoVNC copy/paste working in my headless MariaDB server.
VNC-Clipboard only works with a running X server.

For headless servers, I would recommend using a serial connection with xterm.js.
xterm.js also supports copy & paste.
 
  • Like
Reactions: SInisterPisces
VNC-Clipboard only works with a running X server.

For headless servers, I would recommend using a serial connection with xterm.js.
xterm.js also supports copy & paste.
Thanks!

Would either of you recommend a tutorial for actually configuring and using the xterm.js serial connection?
I tried to install Debian into a VM over serial, and the Debian installer didn't support the right character set or something. It was garbled and wouldn't respond to input.

After I installed the VM with the default NoVNC display driver, I wasn't sure how best to go about setting up the VM to be available via the xterm.js serial UI, either. The VM has a ttyS0 available. I suppose I need to configure that manually?
 
After I installed the VM with the default NoVNC display driver, I wasn't sure how best to go about setting up the VM to be available via the xterm.js serial UI, either. The VM has a ttyS0 available. I suppose I need to configure that manually?
Just add a serial console via the GUI hardware tab and enable it in Debian via systemctl start serial-getty@ttyS0.service
 
  • Like
Reactions: SInisterPisces
Just add a serial console via the GUI hardware tab and enable it in Debian via systemctl start serial-getty@ttyS0.service
Thanks! This is the step I was missing. And the big advantage of doing this vs. using the default NoVNC config is copy/paste functionality, or are there other notable advantages?

(I know it would be useful, for example, when working with VMs where the default NoVNC display adapter is disabled to work with iGPU passthrough or something similar.)

EDIT: This worked perfectly in the VM where I tried it. Thanks again!

I suppose, since I can't do that for, e.g., the Debian NetInst ISO, it's hit or miss whether installing via serial inside a VM will work.
 
Last edited:
I suppose, since I can't do that for, e.g., the Debian NetInst ISO, it's hit or miss whether installing via serial inside a VM will work.
AFAIK, Debian has a serial interface for the installer and also a SSH remote install option, which is still superior to serial in any case.
I can recommend to look into preseeding Debian (and Netbooting). You will save so much time with automation.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!