Setting up a desktop notification in Ubuntu after login

The following actions have been tested successfully on Ubuntu 19.04

Setting a desktop notification in Ubuntu after login requires creating a Desktop application following the Freedesktop specifications.
All such applications run as a user must be located in $HOME/.config/autostart

The autostart folder may not exist.
If not :

mkdir -p $HOME/.config/autostart

As an example, this desktop application will be named welcome.desktop

Create this file as follows :

touch $HOME/.config/autostart/welcome.desktop

Add the following lines in it :

cat welcome.desktop

[Desktop Entry]
Comment=Startup Script

Create the bash script that will display the notification message :


#!/usr/bin/env bash

notify-send “Good morning ${USERNAME^} !” “Did you check your backups ?”

Make sure that the Exec field in your welcome.desktop file points to your script.

Reboot your Ubuntu machine and log in. Your custom desktop notification will be displayed !

Further readings :

XDG autostart specification

Different ways of autostarting applications in Linux

Desktop Application Autostart Specification

Nautilus URL bar in Gnome 3

By default in Gnome 3, Nautilus URL bar is not available within the window.

If you want to type an URL such as a path towards a smb share, Just type Ctrl-L key combination.

If you want to make this URL bar available for each session, there are two ways to do it : dconf-editor or the command-line tool gsettings

Within the dconf-editor GUI program, go to : org>gnome>nautilus>preferences and set ‘Always use location entry‘ to true.

With gsettings, get the current value for gsettings get org.gnome.nautilus.preferences always-use-location-entry

Set this parameter to true : gsettings set org.gnome.nautilus.preferences always-use-location-entry true

Checking the ink level of your printer

There are several existing tools to check the ink level of your printer.
Let’s take two of them : ink and inkblot

Install them :

root@localhost:~# apt-get install ink inkblot

ink is a command-line tool whereas inkblot is an ink level monitor with a GUI.
Please verify that your printer is currently supported :

If your printer belongs to the list of the supported ones, you have to add read access to the device
which stands for your printer :

root@localhost~# chmod o+r /dev/usb/lp0

As a non-root user, to check the ink level :

fool@localhost:~$ ink -p usb

Here is the kind of result you could expect :

ink v0.5.0 (c) 2009 Markus Heinz

hp deskjet 5550

Black:                         70%
Color:                         87%

If you launch inkblot from your Gnome menu, then a icon will appear in your tray icon.
By left-clicking on it, you will get the status of your ink level within a pop-up.

More info :   man ink
                  man inkblot

Nota Bene : make sure that your printer is correctly plugged and switched on.