个人非常喜欢freemind软件,该软件在ubuntu19.10上不能直接使用sudo apt-get install freemind命令直接安装,很不方便。而使用源码方式安装,里面却有很多坑,为此折腾了几个小时。
现记录如下以备后查。原创不易,转载请注明出处!
环境
- 系统:ubuntu19.10-x64
- 软件:
- ant: Apache Ant(TM) version 1.10.6 compiled on July 11 2019
- freemind: freemind-src-1.0.1.tar.gz
- java:openjdk version "1.8.0_232"
1、安装前先安装必须软件,sudo apt-get install ant libcanberra-gtk-module, 下载 freemind-src-1.0.1.tar.gz(https://sourceforge.net/projects/freemind/files/freemind/1.0.1/freemind-src-1.0.1.tar.gz/download),并解压到 Document 目录下,如下
albter@tyrone:~/Documents/freemind$ ls accessories doc images Resources_bg.properties Resources_gl.properties Resources_pl.properties Resources_vi.properties build.xml eclipe_templates lib Resources_ca.properties Resources_hr.properties Resources_pt_BR.properties Resources_zh_CN.properties check_for_duplicate_resources.sh freemind license Resources_cs.properties Resources_hu.properties Resources_pt_PT.properties Resources_zh_TW.properties de freemind_actions.xsd mac_file_association.xslt Resources_da.properties Resources_id.properties Resources_ro.properties tests dictionaries.properties freemind.bat mindmap_menus.xml Resources_de.properties Resources_it.properties Resources_ru.properties version.properties dictionary_de.ortho freemind.properties mkdmg.sh Resources_el.properties Resources_ja.properties Resources_se.properties windows-launcher dictionary_en.ortho freemind.sh patterns_updater.xslt Resources_en.properties Resources_ko.properties Resources_sk.properties dictionary_es.ortho freemindw.bat patterns.xml Resources_es.properties Resources_lt.properties Resources_sl.properties dictionary_fr.ortho freemind.xsd plugins Resources_et.properties Resources_nb.properties Resources_sr.properties dictionary_nl.ortho history.txt readme.txt Resources_eu.properties Resources_nl.properties Resources_tr.properties dictionary_ru.ortho html Resources_ar.properties Resources_fr.properties Resources_nn.properties Resources_uk_UA.properties
注意在使用README里面的步骤时不要加sudo,也就是直接在该目录下执行
- chmod +x *.sh # 赋予该目录下的sh文件执行权限
- ant dist
- ant post
- ant run # 运行freemind
2、执行ant dist后会在~/Document下生成bin文件夹,情况如下
albter@tyrone:~/Documents/bin$ ls classes dist
3、把dist文件夹拷贝到/usr/local/lib下并改名
sudo cp -r ~/Documents/bin/dist /usr/local/lib/freemind1.0.1
sudo chmod +x /usr/local/lib/freemind1.0.1/freemind.sh
sudo ln -s /usr/local/lib/freemind1.0.1/freemind.sh freemind
4、拷贝.freemind(https://github.com/tianzong2019/toolset/blob/master/freemind.tar.gz)目录到用户根目录下
albter@tyrone:~/.freemind$ ls auto.mmfilter auto.properties log.0 log.0.1 patterns.xml
5、这样在终端上执行freemind命令即可打开freemind软件,只是不能lock到ubuntu的启动器(俗话说的菜单栏)上
解决方法是,拷贝freemind.desktop(https://github.com/tianzong2019/toolset/blob/master/freemind.zip)到/usr/share/applications下
6、启动器上的freemind图标显示
复制~/Documents/freemind/windows-launcher/FreeMind.ico 到 /usr/local/lib/freemind1.0.1下面
修改freemind.desktop文件
Icon=FreeMindWindowIcon 为 Icon=/usr/local/lib/freemind1.0.1/FreeMind.ico
这样图标就显示正常了。~_~
-