Ask / Submit

[QUESTION] Terminal command for insert word into the clipboard ?[answered]

asked 2015-07-03 20:02:07 +0200

Schturman gravatar image

updated 2015-07-06 13:10:01 +0200

Hi to all
Can someone tell me what the terminal command for insert specific word from specific text file into the clipboard in SailfishOS, that can be paste in the other app (note etc...)?

EDIT: We can use "pbcopy" from warehouse. Thanks to @V10lator for link.

edit retag flag offensive close delete


like in terminal: top right - drag mode 'select' -> select text
top right 'copy' ?

rudi ( 2015-07-03 20:40:16 +0200 )edit

I asked about command to insert specific word from specific text file into clipboard. Not from terminal app. Please read question.. ;)

Schturman ( 2015-07-03 20:57:17 +0200 )edit

how do you open the text file? how do you identify the word you are searching for?
please specify your question ;-)

and there is this question

rudi ( 2015-07-03 21:23:31 +0200 )edit

I mean for example sed, cat or grep command from specific text file and the output insert into clipboard that can be paste in another app. P.S. I will check your link.. thanks

Schturman ( 2015-07-03 21:59:02 +0200 )edit

@schturman I think I know what you mean, like sending a dbus message with data "some_text" and having that text replace the current content in the clipboard. Pretty neat thing.

Should be quite doable with some tweak I guess.

juiceme ( 2015-07-03 22:31:35 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2015-07-05 11:44:39 +0200

This has been asked and answered on StackOverflow:

I guess either the xclip or xsel program should work, but it seems that neither is currently available for Jolla. Perhaps somebody could cross-compile either for Jolla and upload it to openrepos?

Here's also a handy tip how to get paste to work (with xclip) using ctrl+v on the command line:

edit flag offensive delete publish link more


It's not really a answer... And I also read this article...

Schturman ( 2015-07-05 12:42:42 +0200 )edit

xclip / xsel use, as the name suggests, X11. Now you don't have X11 on your Jolla (and there's no way to get it) as it uses Wayland. So stackoverflow doesn't help here (and the answers there will be obsolete in the foreseeable future as desktops will switch from X11 to Wayland, too, SailfishOS is just a great early adopter).

V10lator ( 2015-07-05 13:49:02 +0200 )edit

yep you are right... But how to do this in sailfish, for now no one know...

Schturman ( 2015-07-05 14:02:58 +0200 )edit

A bit of investigating showed that there might be two ways to access the clipboard on SailfishOS: Either directly through Wayland (see ) or through QT (see ). Will investigate some more (search for a command line tool like xclip/xsel but using Wayland or QT).

V10lator ( 2015-07-05 14:10:39 +0200 )edit

Half of the solution:

V10lator ( 2015-07-05 14:18:29 +0200 )edit
Login/Signup to Answer

Question tools



Asked: 2015-07-03 20:02:07 +0200

Seen: 893 times

Last updated: Jul 06 '15