jEdit problem copying/pasting into terminal
Having installed Ubuntu (9.10), and jEdit (4.3.2), I came across the following problem:
Copying and pasting code from jEdit into my terminal window didn't work. I vaguely recall it working like "first time after bootup" or "first time after jEdit starts" but - to all intents and purposes, it was useless. None of the following worked: ctrl-shift-V, Shift-Ins, right-click-paste, Menu->Edit->Paste.
This was a real shame as my very common practise is to compose shell commands, sql commands, and many others, in an editor like jEdit, before pasting into a terminal window for execution.
I downloaded a trial version of UltraEdit, and that worked fine. I could paste from there into my terminal. Same with gEdit. I could even copy/paste from jEdit into UltraEdit and gEdit, and then copy/paste from there to my terminal.
The biggest thing that's different about jEdit, compared with the others, is that it's a java app. So ... for fun I tried a different JVM. The one I'm more used to actually:
sudo apt-get install sun-java6-jre
By default Ubuntu installs OpenJDK. In my case:
OpenJDK Runtime Environment (IcedTea6 1.6.1) (6b16-1.6.1-3ubuntu3)
Anyway ... the point is that this fixed the problem. Kind-of. Shift-Ins doesn't work but ctrl-shift-V, right-click-paste, Menu->Edit->Paste all work. Which is more than good enough!
I've now got my own launcher for jEdit whoch does the following: export JAVA_HOME=/usr/lib/jvm/java-6-sun
/usr/bin/jedit
but there are other solutions (e.g. setting JAVA_HOME in your shell startup scripts).
Some other people have had the same problem (or at least, a problem that exhibits similar symptoms):
http://ubuntuforums.org/showthread.php?t=1050738
http://old.nabble.com/Copy-and-Paste-in-Linux---Fedora-td27138029.html