1

This may seem like a stupid question, but I really can't find a way to open files from nautilus using jedit. I tried drag n drop and it doesn't work. Couldn't find any plugins in jedit to do this either.

Alternatively, I don't mind just double clicking to open, but I can't set jedit as default text editor application since it doesn't appear in my application list for some reason. So there's no way I can open the files from nautilus.

The only way i can open at the momemnt is either within jedit or in the terminal, but these are really inefficient for me. So it would be great if anyone could give me a hand in solving this trivial problem.

I did some googling and from here http://jedit-devel.narkive.com/3Qsqp2II/jedit-devel-jedit-drag-and-drop-bug-in-gnome, seems like the versions may be affecting this issue. Not sure about this. But here are my facts

java version "1.7.0_65"

jEdit 5.1.0

Mad Program
  • 129
  • 1
  • 1
  • 9
  • Is it the official jEdit version from our repository or the one that is in the Ubuntu repositories? The one in the Ubuntu repositories is probably not 100% original but changed by the Ubuntu package maintainer. – Vampire Apr 02 '15 at 13:56

3 Answers3

0

How about adding jEdit to List of Applications in “Open With” When Right-Clicking Files in Nautilus?

Instructions from https://ubuntugenius.wordpress.com/2012/06/18/ubuntu-fix-add-program-to-list-of-applications-in-open-with-when-right-clicking-files-in-nautilus/

For example, this is my jedit.desktop file:

$ cat /usr/share/applications/jedit.desktop 
[Desktop Entry]
Version=1.0
Type=Application
Name=jEdit
GenericName=Text Editor
Comment=Text editor for code
Exec=jedit %F
Terminal=false
MimeType=text/plain;
Icon=jedit
Categories=TextEditor;Development;
StartupNotify=true
Actions=Window;Document;

[Desktop Action Window]
Name=New Window
Exec=jedit
OnlyShowIn=Unity;

[Desktop Action Document]
Name=New File
Exec=jedit
OnlyShowIn=Unity;

If you want to make jEdit the default for opening the particular filetype, you can now right-click one, choose Properties, go to the Open With tab, click on jEdit under Recommended Applications, and click the Set as default button.

Hope this helps.

AhLeung
  • 207
  • 1
  • 5
  • this would be great if it works. but I tried following the instruction on link and in your code and jedit still doesn't appear in the application list – Mad Program Mar 31 '15 at 10:41
0

This should work and works just fine for me. If you are using the version included in the Ubuntu repository, try changing to our official version in our own repository as described on our homepage. If you are using the official version, look in your Activity Log for anything suspicious when trying to drag&drop. Also jEdit should be available as a normal Application and for "Open with Application..." just fine, at least with our official packages. If all does not work, open a bug in the bugs tracker, then we can maybe help you better than here.

Vampire
  • 35,631
  • 4
  • 76
  • 102
0

This might be something unique to my wonky machine running Ubuntu 12.04, but I found the line JAVA="${JAVA_HOME}/bin/java" to be the problem.

From a terminal, it resolves to the correct value of /usr/lib/jvm/java-8-oracle/bin/java.

However, from the desktop or launcher bar, it resolves to /com/home/users/current/local/java.

Maybe someone more learned than I can explain this, but my solution was to edit the file at /usr/local/bin/jedit, replacing the last line:

exec "${JAVA}" -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -jar "/usr/local/share/jEdit/5.3.0/jedit.jar" -reuseview "$@"

With:

exec "java" -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -jar "/usr/local/share/jEdit/5.3.0/jedit.jar" -reuseview "$@"

This only works if the JVM is set up properly.

Steve Gelman
  • 874
  • 9
  • 16