写这篇文章是为了方便自己,也同时为了方便他人。
目前的开源软件盛行,很多的README文档都是以英文的形式出现,很多懒人不愿意去读此类的文章,所以遇到问题也不会知道怎么去解决。
Linux应用心得已经在《My Study》中发布了三期,虽然以FAQ形式的出现,但是由于Linux应用的突飞猛进,很多的问答已经变得很苍白,但是我希望还是能够体现Linux中一种自由、开放的精神,让更多的人得到帮助。
如果你对太多的A、Q不知所措,可以Ctrl+F查找你所需要的问题。
Q00120:
vim 编辑后发现忘记使用 sudo,如何解决?
A00120:
在 vim 的普通模式下,按
:w !sudo tee %
Q00121:
XMind doesn't start on Linux: After a crash on Linux Mint, the mind mapping program XMind would not start. When executing XMind, the program displays a dialog with the following error message:
An error has occurred. See the log file ~/Desktop/configuration/[numbers].log
The .log file is as follows:
!SESSION 2016-12-13 09:35:51.394 -----------------------------------------------
eclipse.buildId=R3.7.0.201611010032
java.version=1.8.0_111
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=de_DE
Command-line arguments: -os linux -ws gtk -arch x86_64 -data ../workspace
!ENTRY org.eclipse.osgi 4 0 2016-12-13 09:35:51.994
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:78)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
at org.eclipse.equinox.launcher.Main.main(Main.java:1492)
A00121:
the solution on most Linux distributions, including Linux Mint, Ubuntu, Fedora and Suse, is detailed in this xmind-dev group. I installed XMind in /etc/opt
. As some paths and strings are outdated in the forum solution, here is my corrected xmind.ini file:
-configuration
/opt/xmind/XMind_amd64/./configuration
-data
/opt/xmind/XMind_amd64/../workspace
-startup
/opt/xmind/XMind_amd64/../plugins/org.eclipse.equinox.launcher_1.3.200.v20160318-1642.jar
--launcher.library
/opt/xmind/XMind_amd64/../plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.400.v20160518-1444
--launcher.defaultAction
openFile
-vmargs
-Dfile.encoding=UTF-8
Adapt the path to your installation folders. Now XMind should start without freezing.