I’m looking for a way to automate clipboard functionality on KDE Plasma.
I’ve used xsel and xclip in the past.
Neither of these seem to be available anywhere on Rock KDE Plasma - I’ve searched dnf repos and the package installer gui (not sure of the name of it on OpenMandriva).
In the past I’ve run a command like: cat <text-from-file> | xclip cat <text-from-file> | xclip -sel c
This is nice and copies the info to the clipboard so I can paste it other places via shift-insert or ctrl-v
I also found xclipboard via dnf but that is just a clipboard history thing.
Is there a way to use klipper on the console to get my functionality?
Oh, also when I run vi/vim/neovim I get a warning when I try to copy that states: Clipboard: no provider
– Update –
I’ve just installed the OpenMandriva Rock (KDE Plasma) on my desktop running a AMD Ryzen 7 9700X, 32Gb RAM and it runs so great (smooth & fast). I was previously on Ubuntu 24.04.
I’m a developer and I run nvim 90% of the time for the code I’m writing and not being able to copy to the system clipboard is going to make things very difficult for me.
I’m not complaining I’m just trying to figure this out so I can use it for my daily driver.
I’ve had OpenMandriva on my laptop and run nvim there too, but just hadn’t noticed this issue – that I can’t copy text from neovim / vi to the system clipboard. I can’t copy text out of there and paste it anywhere else.
Thanks for any help.
I just opened up neovim and highlighted text two different ways:
selected with mouse
via nvim (Shift-V) then “j” to highlight successive lines
In both cases, I then tried Shift-Ctrl-C.
I then attempted to paste into another terminal window but in both cases the pasted text was not the text I highlighted and copied. Instead it was old text from the system clipboard.
I see no way to select and copy text from nvim or vi within OpenMandriva.
I can do this on my Ubuntu 24.04 installation & I have a laptop running Manjaro (arch-based) and copy / paste within vi / nvim works properly on that platform also.
Thanks for your help.
If I could just get xclip on my OpenMandriva then I could probably get this fixed but i’ve found no way to do that. If you know of a way, let me know.
As I said, I’m a dev, but I wasn’t sure how to build xclip bec it’s not actually obvious from the repo.
I found a text file in the repo named INSTALL and that file has all the steps for building.
Dependencies
You’re going to need the GNU C build chain and then you’ll also have to install
the X11 dev libraries (libxmu-devel.x86_64) via:
sudo dnf install libxmu-devel.x86_64
After that, follow the steps in the INSTALL text file and you’ll be able to build, test and install xclip to your system.
As soon as I installed it to my system and then went back to neovim and tried the copy and paste and it worked! So happy. This means i can continue to use OpenMandriva as my daily driver.
This solves the issue for me. But it is a bit of a pain that I have to build xclip myself.
thanks,
pkgs.org + terminal is one of the main ways I install things. I use ROME, but xsel and xclip appear to be available for ROCK
I’m attaching a TTS script I use, it gets any selected text into the clipboard (X11/wayland) different purpose, but part of it might be interesting
#!/bin/sh
# Determine the clipboard command based on the session type
if [ "$XDG_SESSION_TYPE" = "wayland" ]; then
clip_cmd="wl-paste --primary --no-newline"
else
clip_cmd="xclip -rmlastnl -o"
fi
# Retrieve clipboard content and replace newlines with ,,,
clipboard_content=$($clip_cmd | sed -z 's/\n/,,,/g')
# Escape special characters and pass to SpeechNote
echo "$clipboard_content" | sed 's/[^a-zA-Z0-9]/\\&/g' | xargs flatpak run net.mkiol.SpeechNote --action start-reading-text --text