Want to display your username in the top panel? It’s easy to do this job in Ubuntu, Fedora Workstation and other Linux with GNOME Desktop via an extension.
After following this tutorial, you’ll see your username appear in the far right corner in top panel, just like the screenshot below shows you:
1. First, open Ubuntu Software, search for and install Extension Manager app.
Install Extension Manager in Ubuntu 22.04+
2. Then, press Super (Windows Logo) key on keyboard to open the overview screen. Search for and launch Extension Manager.
3. When the tool opens, navigate to ‘Browse‘ tab. Finally, search for and click install “Add Username to Top Panel” extension.
After installation, your username should appear immediately on top panel. To remove it, go back “Installed” tab, then either turn off or remove the extension.
For other Linux, e.g., Fedora Workstation, Arch, Debian, RockyLinux with GNOME, go to this page in web browser and use the ON/OFF switch to install it.
Besides these, I’ll also show how to use the grep command with the output from the find command. Let’s first start with an overview of the find command.
The utility ‘find’ looks for files that match a certain set of parameters like the file’s name, its modification date, its extension, etc. It has the following format:
find path pattern
If a path is not specified, it searches in the current directory and its sub-directories.
Searching for Files Using their Name
Looking for a file with its name is a commonly used operation with the find command. The -iname option looks for a file regardless of its case.
For example, suppose you have two files abc.txt and ABC.txt. Both of them have the same name but different cases. Using the find command, you get both files in the results:
find -iname abc.txt
Find files with their name while ignoring the case
Searching for Files Using their Exact Name
The -name option is case-sensitive in contrast to the -iname option, so you are going to get files with the exact name.
For example, let us look for a file with the name abc.txt :
find -name abc.txt
The name of the file can be composed of wildcards as you will see later in this guide.
Searching for Files With a Particular Pattern
You can also filter files that follow a given pattern. For that, you can use wildcards.
Say, for instance, you are looking for all the configuration files on your system that end with the ‘.conf’ extension:
find /etc -type f -name "*.conf" | grep client.conf
Find files with a certain extension
In the same way, you can also search for files with the same name but with any extension of three characters as:
find ~ -name "abc.???"
Find files with the same name but any extension
If you have several file names that contain a common string, say ‘VM’, the find command in this scenario will be as:
find -name '*VM*'
Find files with a matching pattern
So far we have used a single directory (the home directory) with the ‘find’ command.
You can also search in multiple directories by specifying them on the CLI:
The type option with the find command opens many opportunities.
You can combine it with different file descriptors for different types of files. For example, ‘f’ for a regular file, ‘d’ for a directory, ‘l’ for a symbolic link, etc.
find /var/log -type f -name "*.log"
Conclusion
In this guide, I explained how to search for files by their names using the find command. You saw multiple ways to narrow down the search path and most importantly, how to incorporate the ‘wildcards’ for pattern searching.
There are many more uses of the find command. Like you can use it to find recently modified files. Here are a few more common examples if you are interested.
This simple tutorial shows how to set custom names for your desktop workspaces, and replace “Activities” in the top-left with the current workspace name you specified.
Today’s desktop operating systems mostly have multiple desktops to group app windows in different screen. These virtual desktops in GNOME (default desktop environment in Ubuntu/Fedora Workstation) are called workspaces. And, each workspace can have its own name.
Step 1: Set custom names for your workspaces
1. First, search for and install “Dconf Editor” if you don’t have it from Ubuntu Software (or GNOME Software).
2. Next, search for and open the Dconf Editor tool from ‘Activities’ overview screen.
When it opens, navigate to “org/gnome/desktop/vm/preferences“. Scroll down and click on “workspace-names” to get into the setting page.
Finally, turn off the default value, and type your desired named in ‘custom value’ box.
NOTE: GNOME by default has 2 workspaces. It adds/removes workspaces automatically to keep only one extra empty workspace. To set fixed number of workspaces, open “Settings” and navigate to “Multi-tasking > Workspaces”
For those familiar with Linux commands, this can be done simply by running the command below in terminal:
gsettings set org.gnome.desktop.wm.preferences workspace-names "['name1', 'name2', 'name3', 'name4']"
Step 2: Replace “Activities” with current workspace name
By replacing “Activities”, you can take a glance at top-left to make sure which workspace you’re working on. Though the name changes, it’s still working like before. By clicking on it will open the overview screen.
1.) First, search for and install “Extension Manager” from Ubuntu Software.
Install Extension Manager in Ubuntu 22.04
2.) Then, search for and launch the tool you just installed from overview screen:
3.) Finally, navigate to “Browse” tab, search for and install the “Activities Workspace Name” extension.
For Fedora 36 user, just go to the extension web page and use the ON/OFF switch to install it:
NOTE: If you set workspace names after installed the extension, restart GNOME Shell it required to make it work. To do so, press Alt+F2, type ‘r’ and hit Enter on Xorg session, or log out and back in on default Wayland.