We have moved to a new Sailfish OS Forum. Please start new discussions there.
2

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

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

Schturman gravatar image

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

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...)?
Thanks

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

edit retag flag offensive close delete

Comments

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

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

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 +0300 )edit
1

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
https://together.jolla.com/question/17195/question-how-to-access-clipboard-from-the-command-line/

rudi ( 2015-07-03 21:23:31 +0300 )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 +0300 )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 +0300 )edit

1 Answer

Sort by » oldest newest most voted
0

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

This has been asked and answered on StackOverflow: https://stackoverflow.com/questions/749544/pipe-to-from-clipboard.

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: https://www.debian-administration.org/article/565/Using_the_X_clipboard_from_the_command_line

edit flag offensive delete publish link more

Comments

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

Schturman ( 2015-07-05 12:42:42 +0300 )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 +0300 )edit

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

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

A bit of investigating showed that there might be two ways to access the clipboard on SailfishOS: Either directly through Wayland (see https://bugs.freedesktop.org/show_bug.cgi?id=52077 ) or through QT (see http://doc.qt.io/qt-5/qclipboard.html ). 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 +0300 )edit

Half of the solution: https://openrepos.net/content/alfmar/pbcopy

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

Question tools

Follow
2 followers

Stats

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

Seen: 1,097 times

Last updated: Jul 06 '15