In this article, we will explain how to set timers, alarms, and stopwatches on your Debian system. We will explain the following two ways to do so:
We have run the commands and procedures mentioned in this article on a Debian 10 Buster system.
GNOME Clocks is a simple application to show the time and date in multiple locations and set alarms or timers. The software also includes a stopwatch. In this section, we will explain how to install Gnome Clocks if it is already not available on your system. Then, we will tell you how you can use the utility.
For a person who does not want to open the Command Line much, installing software present in the Debian repository through the UI is very simple. On your Debian desktop Activities toolbar/dock, click the Software icon.
In the Software utility, click on the search icon and enter Gnome Clocks in the search bar. The search results will list the Gnome Clock entry as follows:
This package is developed and maintained by Debian Stable Main repository.
Click Gnome Clocks and the following view will appear:
Click the Install button to begin the installation process. The following authentication dialog will display for you to provide your authentication details as only an authorized user can install software on Debian.
Enter your password and click the Authenticate button. After that, the installation process will begin, displaying a progress bar as follows.
Gnome Clocks will then be installed to your system and you will get the following message after a successful installation:
Through the above dialog, you can choose to directly launch the software and even Remove it immediately for whatever reason.
You can launch Gnome Clocks either by searching for it from the Application Launcher bar as follows or directly from the Applications menu:
In order to launch the tool through the command line, you need to enter the following command in the terminal:
$ gnome-clocks
The Gnome Clocks application opens in the World view by default.
Click on the Alarm tab and then the New button in order to set a new alarm. The following New Alarm will appear as follows:
Through this dialog, you can:
Once you have specified all the details, use the Done button in order to save the alarm. Once the alarm is saved, you can edit it any time by opening it from the alarms list in the Alarm view.
In order to delete an alarm, right-click on it; this will mark the alarm as selected. You can then delete it by clicking the Delete button located at the bottom right.
Click on the Stopwatch tab to open the Stopwatch view.
Through this view you can:
Click on the Timer tab in order to open the Time view:
You will see that the default time for the timer is set to 5 minutes. Through the Timer view, you can:
After thorough research, I could not find a single tool that would provide the timer, stopwatch and alarm functionality. However, following are some tools and tricks that would help you achieve your purpose.
You can open the Terminal through the application launcher search.
Enter the following commands in order to install the timer utility:
$ curl -o ~/timer https://raw.githubusercontent.com/rlue/timer/master/bin/timer $ sudo chmod +x ~/timer
Use the following command in order to get help on how you can use this utility:
$ ./timer -h
For example, the following command will run the timer for 1 minute:
$ ./timer 1
The following command will set the timer for 10 seconds:
$ ./timer -d 10
This is a small hack that will turn your Terminal into a stopwatch. Run the following command:
$ time cat
The command will not print anything till you terminate it. Once you terminate the command through the Ctrl+C shortcut, it will display the time duration between running and terminating the command as follows:
You can use this time-lapse as a stopwatch in your Terminal.
Okay so, here is another trick! You can easily use the sleep command to set an alarm to your system. This is how the sleep command works:
$ sleep 10m --will make your terminal wait for 10 minutes
$ sleep 10s --will make your terminal wait for 10 seconds
$ sleep 10h --will make your terminal wait for 10 hours
And,
$ sleep 10d --will make your terminal wait for 10 days
The Terminal will execute the next prompt/ command after the sleep command ends. However, we usually want an alarm sound to be played as a wakeup call. How about incorporating the sleep command into a command that plays an alarm tone for you.
Step 1: Save an alarm tone as an mp3 file in your system
Step 2: Use the following command to wait/sleep for a specified time before playing your mp3 alarm tone
$ sleep [x]h [x]m && mplayer /path/to/file.mp3
For example:
$ sleep 4h && mplayer /Music/alarmtone.mp3
This command will play your alarm tone after 4 hours.
So these were a few ways in which you can use your Debian system as an alarm clock, stopwatch, and a timer.
Magento is a free and open-source e-commerce platform written in PHP. It is simple, easy…
ISPConfig is an open-source control panel that allows users to manage multiple servers from a…
As a Linux administrator, you may find it necessary to troubleshoot or test your Simple…
Ubuntu 24.04, like many modern Linux distributions, relies on the NetworkManager for managing network connections.…
Restic is a modern, open-source backup program designed for efficiency, security, and simplicity. It enables…
phpMyAdmin is a popular free tool written in PHP intended to administer MySQL and MariaDB…