In Ubuntu 16.04, after locking a certain program to the launcher, occasionally problems such as failure to run normally or inputting Chinese correctly may occur. Take SQLyog as an example here to summarize some common problems and solutions.
1. The icon disappears/cannot start after locking
You can find the configuration file ending with .desktop in the ~/.local/share/applications/ folder. Taking SQLyog as an example, the initial configuration file is as follows:
[ Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=SQLyog
Icon=sqlyog_exe.png
Path=/home/kevinyang/SQLyog10.2
Exec=Z:\home\kevinyang\SQLyog10.2\SQLyog.exe
StartupNotify=false
StartupWMClass=SQLyog.exe
OnlyShowIn=Unity;
X-UnityGenerated=true
Because SQLyog is started with the help of wine, and the configuration of Exec here records the execution method inside wine, firstly, the icon locked to the launcher will not be displayed normally, and secondly, clicking the icon will not start SQLyog. Change the startup configuration to the following command:
Exec=wine "Z:\home\kevinyang\SQLyog10.2\SQLyog.exe"
The icon can be displayed normally, and the program can be started normally by clicking it.
2. Cannot use Sogou input method
You can try to add these environment variables related to fcitx at startup:
export XMODIFIERS="@im=fcitx"export GTK_IM_MODULE="fcitx"export QT_IM_MODULE="fcitx"
Take SQLyog as an example, write a startup script as follows:
#! /bin/sh
export XMODIFIERS="@im=fcitx"export GTK_IM_MODULE="fcitx"
wine "Z:\home\kevinyang\SQLyog10.2\SQLyog.exe"
Use the chmod +x command to grant execution permission to this script, and then point the Exec configuration to this script in the .desktop file.
Digression: The problem of sublime not being able to input Chinese is also a frequently asked question. The solutions in many blogs used to be more complicated. Now a great god has dedicated a script project to solve this problem. Click to view sublime-text-imfix The project integrates some work such as compiling the library files in the previous solution. After pulling it down, you can directly execute the sublime-text-imfix script. Friends in need can refer to it. Anyway, I have switched to vscode.
The above is the whole content of this article, I hope it will be helpful to everyone's study.
Recommended Posts