如何在Ubuntu上安装yEd图形编辑器?
yEd是一个function丰富的编辑器,用于分层图和流程图。 我想在Ubuntu上安装它。 不幸的是,它似乎没有在官方存储库中提供。
在Ubuntu上安装yEd需要遵循哪些步骤?
有两种方法可以在Ubuntu上安装yEd。
使用提供的图形安装程序
yEd附带了一个易于使用的图形安装程序,可以处理所有系统依赖项(Java,最重要的是):
跟着这些步骤:
- 在yworks下载页面上找到yEd Graph Editor部分
- 为您的系统下载相应的Linux yEd安装程序(32位或64位)
- 使用
chmod +x yEd<...>.sh
或通过进入文件管理器的属性菜单( 属性→权限→允许执行文件作为程序 )使安装程序可执行 - 运行安装程序并按照概述的步骤操作
- 当你完成后,你应该能够在Unity Dash中找到yEd
手动安装
- 确保安装了最新的Java版本
- 在其下载页面下载压缩的yEd版本
- 解压缩zipfile的内容
-
导航到解压缩的文件夹并在java中打开
yed.jar
:java -jar "yed.jar"
-
要将yEd集成到您的系统中,您可以在
~/.local/share/applications
下创建一个.desktop
启动器。 例如:$ 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
确保根据您的系统更改
Exec=
和Icon=
行。
如果要关联yEd的.graphml文件(它不是由安装程序自动完成的),您可以使用以下脚本:
#! /bin/bash # Run the script in the root of yEd installation directory # Tested with Ubuntu 18.04 # Create a new mime type definition file cat >graphml+xml-mime.xml << EOL yEd graphml file (xml format) 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.