How to set timers, alarms and stopwatch in Debian 10

In this article, we will show you how to set timers, alarms, and stopwatch on your Debian system. We will explain the following two ways to do this:

  • Via the user interface using the Gnome Clocks tool
  • Various tricks and hacks are used through the command line

We ran the commands and procedures mentioned in this article on the Debian 10 Buster system.

Through the Gnome Clock (GUI)

GNOME Clocks is a simple application to display time and date in multiple places 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 no longer available on your system. Then we will tell you how you can use the utility.

Install the GNOME Clock

For a person who does not want to open the command line much, installing the software present in the Debian repository through the user interface is very simple. On the toolbar / dock of the Actions panel on the Debian desktop, click the Software icon.

In the software utility, click on the search icon and enter the Gnome clock in the search bar. The search results will result in the following Gnome Clock entry:

GNOME Watch

This package is designed and maintained by the Debian main repository.

Click Gnome Clocks, and the following view appears:

Install software

Click the Install button to start the installation process. The next authentication dialog will show you the opportunity to provide your authentication information, since only an authorized user can install the software in Debian.

Log in as administrator

Enter your password and click the Authentication button. After that, the installation process will begin, displaying a progress bar as follows.

Software is installed

After that, the Gnome Clocks clock will be installed on your system, and after successful installation you will receive the following message:

GNOME Watch

In the dialog above, you can directly launch the software and even uninstall it immediately for any reason.

Launch the GNOME Clock

You can launch Gnome Clocks by searching in the application launcher as follows or directly from the application menu:

Clock

To run the tool through the command line, you need to enter the following command in the terminal:

$ gnome-clocks

Gnome Clocks opens in the World view by default.

Watch application

Set alarm

Click the Alarm tab and then the New button to set a new alarm. The next new alarm will look like this:

Set alarm

Using this dialog you can:

  • Set the alarm time
  • Give a name to your anxiety
  • Set the days on which you want to repeat the alarm.
  • Use the slider to mark / unmark the alarm as active

After you have specified all the details, use the Finish button to save the alarm. After the alarm is saved, you can edit it at any time by opening it from the list of alarms in the “Alarm” window.

To delete an alarm, right-click on it; this marks the alarm as selected. Then you can delete it by clicking the Delete button located in the lower right corner.

Use stopwatch

Click the Stopwatch tab to open the Stopwatch view.

Thanks to this view, you can:

  • Start the stopwatch through the start button
  • Stop a running stopwatch using the Stop button
  • Mark circles on a running stopwatch using the Lap button
  • Continue the stopped stopwatch, through the Continue button
  • Stopwatch reset to 00:00 with the reset button

Use stopwatch

Use a timer

Click on the Timer tab to open the Time view:

Use a timer

You will see that the default time for the timer is set to 5 minutes. Through the Timer view, you can:

  • Set user time for timer
  • Start the timer using the start button
  • Pause the start timer using the “Pause” button
  • Resume a paused timer using the Continue button
  • Reset timer using reset button

Via Debian Command Line – Terminal

After careful research, I could not find a single tool that would provide the functions of a timer, stopwatch and alarm clock. However, the following are some tools and tricks that will help you achieve your goal.

You can open the Terminal by searching the application launcher.

Set timer

Enter the following commands to install the timer utility:

$ curl -o ~/timer https://raw.githubusercontent.com/rlue/timer/master/bin/timer
$ sudo chmod +x ~/timer

Install Timer Command Line Tool

Use the following command to get help on how you can use this utility:

$ ./timer -h

Linux Timer Command

For example, the following command starts the timer for 1 minute:

$ ./timer 1

The following command sets the timer for 10 seconds:

$ ./timer -d 10

Use the terminal as a stopwatch

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 until you stop it. After the command is completed, the Ctrl + C shortcut will display the length of time between execution and completion of the command as follows:

time team

You can use this period of time as a stopwatch in your terminal.

Set an alarm from the terminal

Ok, here’s another trick! You can easily use the sleep command to set an alarm for your system. This is how the sleep command works:

$ sleep 10m – make your terminal wait 10 minutes

$ sleep 10s – make your terminal wait 10 seconds

$ sleep 10 hours – make your terminal wait 10 hours

And,

$ sleep 10 days – make your terminal wait 10 days

The terminal will execute the following prompt / command after completion of the sleep command. However, we usually want the sound of the alarm to sound as a wake-up call. How about including a sleep command in a command that plays an alarm for you?

Step 1. Save the sound as an mp3 file on your system

Step 2: Use the following command to wait / sleep for a certain time before playing your mp3 alarm

$ sleep [x]hour [x]m && mplayer /path/to/file.mp3

For instance:

$ sleep 4h && mplayer /Music/alarmtone.mp3

This command will play your beep after 4 hours.

Thus, there were several ways to use the Debian system as an alarm, stopwatch, and timer.

How to set timers, alarms and stopwatch in Debian 10

Sidebar