2

I am a newbie in Ubuntu (14.04) so I am very appreciative if you can guide me how to install Jason as a plugin of jEdit.

Jason installation homepage.

jEdit plugin installation instructions.

The Jason page makes it sound very easy by just run bin/jason.sh. I tried to do this in a terminal but run command was not found and I don't know what package I should install. If I double clicked on jason.sh, this file will be opened in jEdit but nothing happen.

Nor I tried to install Jason manually by copy the source file into usr/share/jEdit/jars but it didn't work neither.

Updated with screenshot:

enter image description here

It looks like I haven't permission to execute this file in this folder. I tried to do again with sudo but it didn't work

3 Answers 3

1

The installation instructions aren't telling you to run run bin/jason.sh. They're saying to run bin/jason.sh.

Suppose you wanted to put the Jason folder in your home folder:

cd # changes to your home folder

# change URL for different version or different mirror
wget http://superb-dca3.dl.sourceforge.net/project/jason/jason/version%201.4.1/Jason-1.4.1.tgz  

tar xf Jason-1.4.1.tgz

cd Jason-1.4.1

Either or both of those steps can be performed with the GUI (via a web browser and archive manager). If you did it that way, then to continue, type cd followed by a space, drag the Jason-1.4.1 folder into the Terminal to paste its full path (the version number may be different, if you're reading this in the future), then press Enter.

A couple notes about permissions and privileges:

  • The Jason archive you download contains files whose permissions have to be set a certain way in order for Jason to run properly (or, in some cases, at all). It appears, based on some of the information you've recently provided, that jason.sh is not set as executable.

    Maybe you downloaded the .zip file instead of the .tgz. A .zip archive does not typically preserve executable and other Unix-style permissions. As there are many more files than just jason.sh that rely on having the correct permissions, the correct solution is to start over using the .tgz file. This is one of the options when you download Jason.
    31 other files in the archive are supposed to be marked executable, which is why just setting the permissions for that one file is probably not the best fix, even if you are able to do so. Several of those other files are also scripts or programs and thus clearly do need those permissions. (For some it seems odd they're +x, but it's not applied indiscriminately--other files in the same dirs with the same suffixes are -x.)

    Or: Maybe the drive you've extracted the .tgz archive to is an NTFS or FAT32 drive, or some other drive that doesn't support Unix-style permissions. Then every file will have the default permissions for files and every folder will have the default permissions for folders, set when that filesystem was mounted. You can change those defaults, but you probably shouldn't--then you'd have all sorts of files marked executable that aren't supposed to be. Instead, extract Jason-1.4.1.tgz somewhere like your home folder where Unix-style permissions are supported.

    Or: Maybe the drive you've extracted the .tgz archive to is mounted with the noexec option. This is the least likely (especially based on the information you've since provided), since permissions can still be changed on noexec filesystems, the files on them just can't be run as executables. But if this is the case, the solution is the same--move the archive somewhere else and extract it there.

  • Assuming you're putting Jason in your home folder as above, this copy should belong to your user. You don't need to--and shouldn't--perform any action as root (with sudo or otherwise) as part of the installation. You also almost certainly should not run Jason as root (even if you did install it systemwide).

Now that you're in the Jason-1.4.1 folder, run the jason.sh script located in the bin subfolder by issuing the command:

bin/jason.sh

Provided you have all the required dependencies (e.g., Java), it should run Jason.

This is good for verifying Jason works, but most of the time you'll probably want to run it from the GUI. There's two main ways.

You can make make it so Nautilus will run shell scripts (provided they're marked executable) when you double-click on them:

Or you can create a launcher to run the script:

You'll probably want to make a launcher. For convenience, here's one way to do that.

This is based on this answer and that one. (If you're using the MATE desktop environment, use mate-desktop-item-edit in place of gnome-desktop-item-edit.)

  1. Right-click on your desktop and click Create Launcher... or, if you don't have that option, run gnome-desktop-item-edit --create-new ~/Desktop.

  2. For Type, keep Application.

  3. For Name, put Jason (or whatever you like).

  4. For command, enter the fully qualified path to jason.sh or browse for it (with the Browse... button). Mine is /home/ek/Jason-1.4.1/bin/jason.sh. If you're using the same version of Jason and you followed the instructions above, just replace ek with your own username.

    image of Create Launcher dialog box, making a launcher for jason.sh

    If you're in the Terminal where you ran bin/jason.sh successfully, running readlink -f bin/jason.sh will reveal the full path:

    ek@Ilex:~/Jason-1.4.1$ readlink -f bin/jason.sh
    /home/ek/Jason-1.4.1/bin/jason.sh
    
  5. Click OK.

  6. Now you have a desktop launcher called Jason that you can double-click to start the application easily. (You can move this somewhere other than your desktop, if you like.)

    enter image description here

9
  • I tried to run ./bin/jason.sh from the terminal but it didn't work,it said command not found.But now I am away from my laptop,I'll try yours later,thank Oct 6, 2014 at 14:38
  • @Tuong What directory were you in when you ran that command? Oct 6, 2014 at 14:39
  • I remembered that I run it from its extract folder Jason-1.4.1,but I am not so sure about this.I just remmember that I tried to run jason.sh only and the terminal said the command not found Oct 6, 2014 at 14:51
  • @Tuong When you regain access to the computer where the error is happening, please let me know where jason.sh is (if you can) and where you are when you run the command bin/jason.sh (or ./bin/jason.sh which should also work, but the leading ./ is unnecessary since bin/jason.sh already contains a / and will thus be interpreted as the path to a specific executable). Oct 6, 2014 at 14:56
  • I'll update the question with images later,thank a lot Oct 6, 2014 at 15:27
1

Go to the Jason-1.3.9/bin folder :

Run command sh jason.sh

0

After decompressing the Jason archive, the command to type is bin/jason.sh NOT run bin/jason.sh:

sylvain@sylvain-ThinkPad-T430s:~/Downloads/Jason-1.4.1$ chmod +x bin/jason.sh
sylvain@sylvain-ThinkPad-T430s:~/Downloads/Jason-1.4.1$ bash bin/jason.sh 
JDK_HOME is not properly set!
sylvain@sylvain-ThinkPad-T430s:~/Downloads/Jason-1.4.1$ 

enter image description here

8
  • It's not worked for me Oct 6, 2014 at 19:23
  • @Tuong: I've updated my answer with a preliminary step to ensure the script has the right persmission (+x means executable) Oct 6, 2014 at 19:47
  • It still not worked,I checked the jason.sh but in Properties->Permissions the checkbox Allow executing file as program is still not checked, whenever I tried to check it, it would be unchecked automatically Oct 6, 2014 at 19:52
  • @Tuong: Try my new proposal (bash bin/jason.sh). Oct 6, 2014 at 19:57
  • It's worked.Sylvain Amazing! The only issue is the terminal showed a lot of errors like [error] KillRing: /home/thovo/.jedit/killring.xml:1: unsupported XML version (found "1.1") (expected "1.0") and [error] PerspectiveManager: at java.awt.EventDispatchThread.run(EventDispatchThread.java:91) But can you explain the situation here for me?It would be a kind of experiences to deal with future issue. And if I exit the terminal, the Jason will quit also. Can you help me with this issue,Sylvain and Eliah? Oct 6, 2014 at 20:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .