How can I install yEd graph editor on Ubuntu?

yEd is a feature rich editor for hierarchical diagrams and flow charts. I would like to install it on Ubuntu. Unfortunately it doesn’t appear to be available in the official repositories.

What steps would I have to follow to install yEd on Ubuntu?

Asked By: Glutanimate

||

There are two ways to install yEd on Ubuntu.

Using the provided graphical installer

yEd comes with an easy-to-use graphical installer that takes care of all the system dependencies (Java, most importantly):

yEd installer GUI

Follow these steps:

  1. Find the yEd Graph Editor section on the yworks download page
  2. Download the appropriate Linux yEd installer for your system (32- or 64-bit)
  3. Make the installer executable with chmod +x yEd<...>.sh or by going into the properties menu of your file manager (Properties → Permissions → Allow executing file as program)
  4. Run the installer and follow the outlined steps
  5. When you’re done you should be able to find yEd in your Unity Dash

Manual installation

  1. Make sure you have the latest Java release installed
  2. Download the zipped yEd release on its download page
  3. Extract the contents of the zipfile
  4. Navigate to the extracted folder and open yed.jar in java:

    java -jar "yed.jar"
    
  5. To integrate yEd into your system you can create a .desktop launcher under ~/.local/share/applications. E.g.:

    $ cat ~/.local/share/applications/yed.desktop
    [Desktop Entry]
    Encoding=UTF-8
    Name=yEd Graph Editor
    Comment=Edit graphml files in yed
    Exec=java -jar /home/user/applications/yEd/yed.jar %u
    Terminal=false
    Type=Application
    Icon=/home/user/applications/yEd/icons/yicon32.png
    Categories=Application;Office
    StartupNotify=false
    MimeType=application/xml;
    NoDisplay=false
    

    Make sure to change the Exec= and Icon= lines according to your system.

Answered By: Glutanimate

If you want to associate yEd’s .graphml files (it’s not done automatically by the installer), you can use the following script:

#! /bin/bash

# Run the script in the root of yEd installation directory
# Tested with Ubuntu 18.04
# Tested with Ubuntu 22.04 LTS


# Create a new mime type definition file
cat >graphml+xml-mime.xml << EOL
<?xml version="1.0"?>
 <mime-info >
   <mime-type type="application/x-graphml+xml">  
   <comment>yEd graphml file (xml format)</comment>
   <glob pattern="*.graphml"/>
   <generic-icon name="x-application-graphml+xml"/>
  </mime-type>
 </mime-info>
EOL

# Install the new mime definition
sudo xdg-mime install graphml+xml-mime.xml

# Install icon (size 48 can be extracted from i4j_extf_2_1aawyej_k3n8ea.ico file)
sudo xdg-icon-resource install --context mimetypes --size 32 .install4j/yEd.png x-application-graphml+xml

# Append %F to yEd .desktop file so it is visible in "Open With Other Application" menu
sed -i '/Exec/ s/$/ %F/' ~/.local/share/applications/yEd Graph Editor-0.desktop

# Finally go to file manager, right click, select "Open With Other Application",
# click "View All Applications" and select yEd.
Answered By: Samuli Asmala
Categories: Answers Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.