Is there a command for pasting what is in clipboard?
I need a command that does the same thing as to press Ctrl+V.
I tried a few options for xclip
, but they don't paste normally and need middle click or so.
Is there a command for pasting what is in clipboard?
I need a command that does the same thing as to press Ctrl+V.
I tried a few options for xclip
, but they don't paste normally and need middle click or so.
Klipper
The Kubuntu is using as default the Klipper. KDE UserBase: http://userbase.kde.org/Klipper
As a KDE/Qt application the Klipper can be used via the qdbus: http://manpages.ubuntu.com/manpages/trusty/man1/qdbus.1.html
Available commands can be viewed with the qdbusviewer:
or with the terminal (konsole):
:~$ qdbus org.kde.klipper /klipper
method void org.kde.klipper.klipper.clearClipboardContents()
method void org.kde.klipper.klipper.clearClipboardHistory()
method QString org.kde.klipper.klipper.getClipboardContents()
method QString org.kde.klipper.klipper.getClipboardHistoryItem(int i)
method QStringList org.kde.klipper.klipper.getClipboardHistoryMenu()
method void org.kde.klipper.klipper.saveClipboardHistory()
method void org.kde.klipper.klipper.setClipboardContents(QString s)
method void org.kde.klipper.klipper.showKlipperManuallyInvokeActionMenu()
method void org.kde.klipper.klipper.showKlipperPopupMenu()
method QDBusVariant org.freedesktop.DBus.Properties.Get(QString interface_name, QString property_name)
method QVariantMap org.freedesktop.DBus.Properties.GetAll(QString interface_name)
method void org.freedesktop.DBus.Properties.Set(QString interface_name, QString property_name, QDBusVariant value)
method QString org.freedesktop.DBus.Introspectable.Introspect()
method QString org.freedesktop.DBus.Peer.GetMachineId()
method void org.freedesktop.DBus.Peer.Ping()
The command
qdbus org.kde.klipper /klipper getClipboardContents
will get the last line from the clipboard.
The command can added to the KDE menu (http://docs.kde.org/development/en/kde-workspace/kmenuedit/index.html) and called with the keyboard shortcut or to the file manager context menu (KDE service menu - http://techbase.kde.org/Development/Tutorials/Creating_Konqueror_Service_Menus).
Other options for the clipboard managers: http://qt-apps.org/content/show.php/CopyQ?content=147452
qdbus org.kde.klipper /klipper getClipboardContents
gives an error for me: qdbus: could not exec '/usr/lib/i386-linux-gnu/qt5/bin/qdbus': No such file or directory
something is missing!
– Minimus Heximus
Dec 21 '13 at 10:47
Yes, install the package xsel
xsel --clipboard
will paste the clipboard contents.
xsel -b
;-)
– Wilf
Dec 20 '13 at 18:16
Open your terminal and type as
nano .bashrc
then
paste a line as
xclip="xclip -selection c"
then save & close with Ctrl+X+Y .
Then type bash
then on wards you can use Ctrl+V to paste.
xsel -o -b
(for pasting the 'normal' clipboard to standard out, as via Ctrl+V) orxsel -o
(for the X clipboard, which you could also paste via a middle-click of the mouse). – ᴠɪɴᴄᴇɴᴛ Aug 06 '14 at 10:24date | xclip && xclip -o
. – ᴠɪɴᴄᴇɴᴛ Aug 06 '14 at 11:13xdotool type " $(date) "
. It may also need a command to change keyboard layout to English. – Minimus Heximus Aug 06 '14 at 11:23