Explain the solution to the Ubuntu 16.04 launcher icon exception

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

Explain the solution to the Ubuntu 16.04 launcher icon exception
Ubuntu adds the Chrome icon to the correct posture of the launcher
Explain the solution to the freeze when ubuntu dual system starts
Solution for Ubuntu unable to connect to the network
The solution to the failure to install .deb under Ubuntu 16.04
Solution to the virtual machine ubuntu16.04 cannot connect to the Internet
Solution to the slow speed of ubuntu18.04 wireless network
ubuntu16.04 method steps to upgrade the kernel
Ubuntu modified the default sh to bash
Solution to the problem that ubuntu cannot connect to the Internet in the virtual machine
How to modify the hostname on Ubuntu 20.04
Explain how to set static IP on ubuntu14.04
Use the command to solve the Ubuntu projector problem:
How to open the ubuntu system in win10
The road to reinstallation of ubuntu 18.04 from scratch
Wsl sets the default account to root (ubuntu18.04)
Publish the node.js project under Ubuntu to heroku
Explain how to add swap partition on Ubuntu 16.04
The ultimate guide to install gooderp on ubuntu
Introduction to the use of Hanlp in ubuntu
How to run the parsing server on Ubuntu 14.04
Solution to pycharm unable to import classes under Ubuntu
How to check the installed JDK on Ubuntu
How to install the latest MySQL on Ubuntu 18.04
The same solution for cloning ubuntu18 virtual machine ip
Use the command line to detect the Ubuntu version method
How to add the gzip module to Nginx on Ubuntu 14.04
How to turn the language of Ubuntu into Chinese? ?
Solutions to the black screen when installing ubuntu (3 types)