Adding a Program to Gnome Dock in Ubuntu

Nov 14, 2021

The backgroud

I recently installed Ubuntu 20.04 LTS on a machine where I needed a solid and friendly OS1. I also wanted to install a couple programs including Lite XL2 and VS Code3 among others, and decided to use the pre-built binaries and setup them in a portable manner. For VS code, extracting the gzipped tar and creating an empty ‘data’ directory inside the extracted directory is the way to go. Lite XL also comes in a similar package and I’ve extracted both into the Downloads directory4. Adding the icons to the gnome dock in Ubuntu was the next task. At the time of writing, the dock doesn’t allow adding icons for a non-configured program by right-clicking it’s icon. Below is how I added the icons to the dock.

The process

This is faily straightforward. We just need to create a <program-name>.desktop at the ~/.local/share/applications/ location. The content of the org.lite_xl.lite_xl.desktop file created for Lite XL is as follows.

[Desktop Entry]
Type=Application
Name=Lite XL
Comment=A lightweight text editor written in Lua
Exec=/home/hsen/Downloads/lite-xl/bin/lite-xl %F
Icon=/home/hsen/Downloads/lite-xl/share/icons/hicolor/scalable/apps/lite-xl.svg
Terminal=false
StartupWMClass=lite-xl
Categories=Development;IDE;
MimeType=text/plain;

The above added an icon to the dock and made Lite XL searchable in the activities view. Repeated the steps for VS Code with appropriate changes and the task was done within minutes.


  1. A big thank you to all opensource contributors around the world! ↩︎

  2. An extension of Lite. A text editor which is lightning fast and has a growing community. ↩︎

  3. A great IDE that is also open source. ↩︎

  4. Take care when removing files from Downloads directory if doing this :) ↩︎

UbuntuLinuxGnomeDesktop

Setting Up an OpenVPN Server on CentOS

Updating Instance Properties of an existing Google Compute Engine Virtual Machine