Today, in this article, we show how to create taskbars and menu entries for Linux applications. The most popular and well-known open source operating system is Linux. As an operating system, Linux is software that runs in the background of all other applications on a computer, receiving requests from them and transmitting them to the hardware.
Linux is an open source technology, which means it was created by developers who make the original source code freely available for distribution and modification. The software itself is an operating system, like Windows or Apple OS for Mac computers. It was created in 1991 by Finnish student and developer Linus Torvalds, whose goal was to develop a free operating system core for personal computers. He succeeded, and this kernel has grown, modified and added over the years and used by thousands of people around the world.
Linux is closely modeled on UNIX, another widely used multi-user operating system. It is the main operating system used in servers, supercomputers and mainframes around the world. It is less common on desktop computers, but its popularity in this area has increased significantly in recent years. Below are the steps to create taskbar and menu entries for Linux applications.
How to make taskbars and menu entries for linux applications
Step 1: Show hidden files and folders
/home/username/.local/share/applications
Step 2: Find the WMClass for the app
The next thing to do is set your application’s WMClass, or window ID. This allows us to create a modern taskbar entry that combines the application launcher and open windows into one icon. If you skip this step, you’ve just created a shortcut to launch the application. To define your specific application’s WMClass class, either start your own AppImage or destroy the old method by running the executable directly.
Finding WMClass in X11
xprop WM_CLASS
WM_CLASS(STRING) = “appname”, “AppName”
Finding WMClass in Wayland
If you’re using a newer distro, you’re probably not using the traditional X11 screen server, but the newer one Wayland server which is friendly to the touch. unfortunately this trick it only works with GNOME because it depends on the GNOME Shell’s Looking Glass tool.
All open windows should now be listed with each one wmclass. Remember to write a file wmclass From your app to the next step.
Step 3: Create a desktop file
[Desktop Entry]Type=ApplicationName=ApplicationNameGenericName=ApplicationTypeIcon=/home/Username/.local/share/applications/ApplicationIcon.extensionExec=/home/Username/ApplicationDirectory/ApplicationExecutable.extensionTerminal=falseCategories=ApplicationSubCategory;ApplicationCategoryKeywords=Keyword1;Keyword2;Keyword3StartupWMClass=ApplicationWMClass
Using quotes to handle spaces
Exec=/home/Username/Application Directory/Application Executable.extension
Exec=”/home/Username/Application Directory/Application Executable.extension”
Use asterisks to handle version numbers
Exec=/home/Username/ApplicationDirectory/ApplicationExecutable-v2.2.extension
Exec=/home/Username/ApplicationDirectory/ApplicationExecutable-v*.extension
Now when you download a AppImage or tarballyou will be able to integrate it in your taskbar and menus as if it were any other application installed.
Final Words
We hope you like our article about how to create taskbars and menu entries for Linux applications. Although Linux is quite a complex operating system, anyone with a basic understanding of technology can learn and use it. Small businesses are switching to Linux daily, and you can join them. It’s not just for big companies and businesses. Whether you realize it or not, you probably already use Linux. Between one and two-thirds of web pages on the Internet are produced by servers running Linux, depending on which user study you look at.