You are not logged in.
1. I put text from clipboard into a file called "temporary.tmp":
xclip -o -selection clipboard > temporary.tmp
2. I do certain manipulations on the file.
3. I want to get the file back to clipboard:
xclip -i -selection clipboard < temporary.tmp
Problem: Putting the clipboard's contents into temporary.tmp works, and all the manipulations are successful. However, the "Paste" button in Firefox is grayed out. What am I doing wrong?
Offline
I'm not certain about that, but it seems to me that there are two clipboards in Linux, one for console, and one for X-server. You may try
cat temporary.tmp
, then right-click on file's content, and Edit->Copy.
Offline
Baah, any way to get it to the other clipboard? I will need to repeat this for thousands of times.
Offline
hmm,
I have a similar problem.
I thought this
cat temporary.tmp | xclip
could solve your problem, cause I had a working script that pipes the output of mpc to xclip.
This is my script
#!/bin/bash
mpc --format "%artist% - %title%" | head -n 1 | xclip
But it does not work anymore.
Last time I used the script it was working.
So maybe some Updates "broke" xclip ?
EDIT:
rebuilding xclip package doesn't solve the problem...
Last edited by SiD (2008-04-28 13:35:32)
Offline
ok, I've forgotten that you have to klick the middle mouse button to paste the content.
so,
cat temporary.tmp | xclip
should work.
Last edited by SiD (2008-04-28 13:49:09)
Offline
For Firefox forms neither "Paste" from the menu or middle click seem to work, while elsewhere it is possible to paste the text with middle click. I assume there is something wrong with my approach to the problem. I will define what I want to accomplish. Maybe someone has got a better idea. I am rather newbie-sh with Linux scripting at this point.
Goal
1. Select text # The text is in a web site form in Firefox
2. Press a keyboard shortcut
3. The text is replaced with something else
My solution, which obviously didn't quite work
1. Select text
2.1. Cut text
2.2. Press a keyboard shortcut to execute a script, which will put selection into a file &
2.3. Modify the file &
2.4. Put the modified file to clipboard < FAIL
3. Paste the text
Last edited by KSiimson (2008-04-28 19:52:01)
Offline