1、通过快捷键Ctrl + Alt + T打开终端命令操作窗口,输入:sudo nautilus,然后根据提示输入密码,输入完毕可能会出现些警告信息,不用管。
nautilus这个命令是用于以root权限打开文件管理窗口。
2、在这个界面中通过“计算机”进入pycharm.sh所在文件夹。一般在安装包的bin文件夹中。
3、在文件pycharm.sh中添加红色字样内容(根据自己实际pycharm.sh文件内容适当添加)
[pxgeng@localhost bin]$ vi pycharm.sh
if [ -n “KaTeX parse error: Can't use function '\"' in math mode at position 79: …roperties.file=\̲"̲PYCHARM_PROPERTIES”"
fi
MAIN_CLASS_NAME=“ P Y C H A R M M A I N C L A S S N A M E " i f [ − z " PYCHARM_MAIN_CLASS_NAME" if [ -z " PYCHARMMAINCLASSNAME"if[−z"MAIN_CLASS_NAME” ]; then
MAIN_CLASS_NAME=“com.intellij.idea.Main”
fi
VM_OPTIONS_FILE=“ P Y C H A R M V M O P T I O N S " i f [ − z " PYCHARM_VM_OPTIONS" if [ -z " PYCHARMVMOPTIONS"if[−z"VM_OPTIONS_FILE” ]; then
VM_OPTIONS_FILE=“ I D E B I N H O M E / p y c h a r m IDE_BIN_HOME/pycharm IDEBINHOME/pycharmBITS.vmoptions”
fi
if [ -r “ V M O P T I O N S F I L E " ] ; t h e n V M O P T I O N S = ‘ " VM_OPTIONS_FILE" ]; then VM_OPTIONS=`" VMOPTIONSFILE"];thenVMOPTIONS=‘"CAT” “ V M O P T I O N S F I L E " ∣ " VM_OPTIONS_FILE" | " VMOPTIONSFILE"∣"GREP” -v “^#.*” | “KaTeX parse error: Expected 'EOF', got '\n' at position 6: TR" '\̲n̲' ' '` VM_OPT…VM_OPTIONS -Djb.vmOptionsFile=”$VM_OPTIONS_FILE""
fi
IS_EAP=“false”
if [ “$IS_EAP” = “true” ]; then
OS_NAME=echo $OS_TYPE | "$TR" '[:upper:]' '[:lower:]'
AGENT_LIB=“yjpagent- O S N A M E OS_NAME OSNAMEBITS”
if [ -r “ I D E B I N H O M E / l i b IDE_BIN_HOME/lib IDEBINHOME/libAGENT_LIB.so” ]; then
AGENT="-agentlib:$AGENT_LIB=disablej2ee,disablealloc,delay=10000,sessionname=PyCharm30"
fi
fi
COMMON_JVM_ARGS=""-Xbootclasspath/a:$IDE_HOME/lib/boot.jar" -Didea.paths.selector=PyCharm30 I D E P R O P E R T I E S P R O P E R T Y " I D E J V M A R G S = " − D i d e a . p l a t f o r m . p r e f i x = P y t h o n − D i d e a . n o . j r e . c h e c k = t r u e " A L L J V M A R G S = " IDE_PROPERTIES_PROPERTY" IDE_JVM_ARGS="-Didea.platform.prefix=Python -Didea.no.jre.check=true" ALL_JVM_ARGS=" IDEPROPERTIESPROPERTY"IDEJVMARGS="−Didea.platform.prefix=Python−Didea.no.jre.check=true"ALLJVMARGS="VM_OPTIONS $COMMON_JVM_ARGS $IDE_JVM_ARGS $AGENT $REQUIRED_JVM_ARGS"
CLASSPATH=“ I D E H O M E / l i b / b o o t s t r a p . j a r " C L A S S P A T H = " IDE_HOME/lib/bootstrap.jar" CLASSPATH=" IDEHOME/lib/bootstrap.jar"CLASSPATH="CLASSPATH: I D E H O M E / l i b / e x t e n s i o n s . j a r " C L A S S P A T H = " IDE_HOME/lib/extensions.jar" CLASSPATH=" IDEHOME/lib/extensions.jar"CLASSPATH="CLASSPATH: I D E H O M E / l i b / u t i l . j a r " C L A S S P A T H = " IDE_HOME/lib/util.jar" CLASSPATH=" IDEHOME/lib/util.jar"CLASSPATH="CLASSPATH: I D E H O M E / l i b / j d o m . j a r " C L A S S P A T H = " IDE_HOME/lib/jdom.jar" CLASSPATH=" IDEHOME/lib/jdom.jar"CLASSPATH="CLASSPATH: I D E H O M E / l i b / l o g 4 j . j a r " C L A S S P A T H = " IDE_HOME/lib/log4j.jar" CLASSPATH=" IDEHOME/lib/log4j.jar"CLASSPATH="CLASSPATH: I D E H O M E / l i b / t r o v e 4 j . j a r " C L A S S P A T H = " IDE_HOME/lib/trove4j.jar" CLASSPATH=" IDEHOME/lib/trove4j.jar"CLASSPATH="CLASSPATH: I D E H O M E / l i b / j n a . j a r " i f [ − n " IDE_HOME/lib/jna.jar" if [ -n " IDEHOME/lib/jna.jar"if[−n"PYCHARM_CLASSPATH” ]; then
CLASSPATH=“ C L A S S P A T H : CLASSPATH: CLASSPATH:PYCHARM_CLASSPATH”
fi
export CLASSPATH
LD_LIBRARY_PATH=“ I D E B I N H O M E : IDE_BIN_HOME: IDEBINHOME:LD_LIBRARY_PATH”
export LD_LIBRARY_PATH
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
IFS=“KaTeX parse error: Expected 'EOF', got '\n' at position 10: (printf '\̲n̲\t')" LD_LIBRAR…IDE_BIN_HOME: L D L I B R A R Y P A T H " " LD_LIBRARY_PATH" " LDLIBRARYPATH""JAVA_BIN”
KaTeX parse error: Expected 'EOF', got '\ ' at position 9: {AGENT} \̲ ̲ "-Xbootclassp…IDE_HOME/lib/boot.jar"
-classpath “$CLASSPATH”
KaTeX parse error: Expected 'EOF', got '\ ' at position 14: {VM_OPTIONS} \̲ ̲ "-XX:ErrorFil…HOME/java_error_in_PYCHARM_%p.log"
“-XX:HeapDumpPath=KaTeX parse error: Expected 'EOF', got '\ ' at position 35: …PYCHARM.hprof" \̲ ̲ -Didea.paths.…VM_OPTIONS_FILE”
KaTeX parse error: Expected 'EOF', got '\ ' at position 27: …TIES_PROPERTY} \̲ ̲ -Didea.platfo…@"