12K Views

To Display A Notification After Login in Ubuntu

The best and a very easy way to display any important information on the employee screen after login.

We can create a script for this, in this script we can manually give the message which we want to give or we can take message from mysql database. We can also customize for how much time the screen will display the message.

We can use notify-send for this desktop notification. With notify-send we can send desktop notifications to the user via a notification daemon from the command line. These notifications can be used to tell user about an event or display some form of information without getting in the user way.

In this script, we are going to use pgrep command, pgrep is a command line utility. It searches for all the named processes that can be specified as extended regular expression patterns and returns their process ID.

Let’s start writing script.

Don’t forgot to give execution permission to the file using command below.

And our script is ready.

Now to run this script, after login follow the steps given below.

switch to your home directory and then go to autostart directory.

In this directory create a .desktop file like script.desktop and add execution path equals to the path to your script , there is no need to change any other things.

save and exit file.

Reboot and message will be displayed after login like this.

 

IN CASE OF ANY QUERY,CONTACT US

Category(s) Uncategorized
. . .

Comment (1)

Add Your Comment

  • Parvinder parashar
    Quite Interesting, Very Knowledgeable too
  • css.php