Home > System Tutorial > LINUX > body text

How to pin icons to the taskbar in Ubuntu 18.04

王林
Release: 2024-01-08 23:10:44
forward
1234 people have browsed it

Open the terminal and enter application management cd ~/.local/share/applications/
Create a new application icon vim ***.desktop (for example: wechat.desktop)

Ubuntu 18.04 如何固定图标到任务栏的方法

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=
Exec=
Icon=
NoDisplay=false
StartupWMClass=
Copy after login

Exec represents the application startup path, Icon represents the icon path

Then click the Apply button and drag the newly generated application icon to the taskbar

Ubuntu 18.04 如何固定图标到任务栏的方法

At this time, when StartupWMClass is empty, double icons will appear when starting the application

Ubuntu 18.04 如何固定图标到任务栏的方法

To solve this problem, first open the application and then enter in the terminal:

xprop |grep WM_CLASS, at this time the mouse pointer will turn into a crosshair, then click on the open application, the terminal will feedback a message, including 2 strings

Ubuntu 18.04 如何固定图标到任务栏的方法

Add the contents of the first string to StartupWMClass, save it, close the application and reopen it, and the double icon will no longer appear

The above is the detailed content of How to pin icons to the taskbar in Ubuntu 18.04. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:jb51.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!