解决Ubuntu下pycharm无法输入中文的问题
sudo nautilus在这个界面中通过“计算机”进入pycharm.sh所在文件夹。一般在安装包的bin文件夹中。 3、在文件pycharm.sh中添加红色字样内容(根据自己实际pycharm.sh文件内容适当添加) [maokx@localhost bin]$ vi pycharm.sh # --------------------------------------------------------------------- if [ -n "$PYCHARM_PROPERTIES" ]; then IDE_PROPERTIES_PROPERTY="-Didea.properties.file=\"$PYCHARM_PROPERTIES\"" fi MAIN_CLASS_NAME="$PYCHARM_MAIN_CLASS_NAME" if [ -z "$MAIN_CLASS_NAME" ]; then MAIN_CLASS_NAME="com.intellij.idea.Main" fi VM_OPTIONS_FILE="$PYCHARM_VM_OPTIONS" if [ -z "$VM_OPTIONS_FILE" ]; then VM_OPTIONS_FILE="$IDE_BIN_HOME/pycharm$BITS.vmoptions" fi if [ -r "$VM_OPTIONS_FILE" ]; then VM_OPTIONS=`"$CAT" "$VM_OPTIONS_FILE" | "$GREP" -v "^#.*" | "$TR" '\n' ' '` VM_OPTIONS="$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-$OS_NAME$BITS" if [ -r "$IDE_BIN_HOME/lib$AGENT_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 $IDE_PROPERTIES_PROPERTY" IDE_JVM_ARGS="-Didea.platform.prefix=Python -Didea.no.jre.check=true" ALL_JVM_ARGS="$VM_OPTIONS $COMMON_JVM_ARGS $IDE_JVM_ARGS $AGENT $REQUIRED_JVM_ARGS" CLASSPATH="$IDE_HOME/lib/bootstrap.jar" CLASSPATH="$CLASSPATH:$IDE_HOME/lib/extensions.jar" CLASSPATH="$CLASSPATH:$IDE_HOME/lib/util.jar" CLASSPATH="$CLASSPATH:$IDE_HOME/lib/jdom.jar" CLASSPATH="$CLASSPATH:$IDE_HOME/lib/log4j.jar" CLASSPATH="$CLASSPATH:$IDE_HOME/lib/trove4j.jar" CLASSPATH="$CLASSPATH:$IDE_HOME/lib/jna.jar" if [ -n "$PYCHARM_CLASSPATH" ]; then CLASSPATH="$CLASSPATH:$PYCHARM_CLASSPATH" fi export CLASSPATH LD_LIBRARY_PATH="$IDE_BIN_HOME:$LD_LIBRARY_PATH" export LD_LIBRARY_PATH export GTK_IM_MODULE=fcitx export QT_IM_MODULE=fcitx export XMODIFIERS=@im=fcitx # --------------------------------------------------------------------- # Run the IDE. # --------------------------------------------------------------------- IFS="$(printf '\n\t')" LD_LIBRARY_PATH="$IDE_BIN_HOME:$LD_LIBRARY_PATH" "$JAVA_BIN" \ ${AGENT} \ "-Xbootclasspath/a:$IDE_HOME/lib/boot.jar" \ -classpath "$CLASSPATH" \ ${VM_OPTIONS} \ "-XX:ErrorFile=$HOME/java_error_in_PYCHARM_%p.log" \ "-XX:HeapDumpPath=$HOME/java_error_in_PYCHARM.hprof" \ -Didea.paths.selector=PyCharm2017.1 \ "-Djb.vmOptionsFile=$VM_OPTIONS_FILE" \ ${IDE_PROPERTIES_PROPERTY} \ -Didea.platform.prefix=Python \ com.intellij.idea.Main \ "$@"