Archives For November 30, 1999

This simple tutorial shows how to get rid of the “Mobile Broadband” menu option from the upper right system status menu in GNOME Desktop.

GNOME, the default desktop in Ubuntu and Fedora Workstation, has built-in support for mobile broadband. If your computer (usually laptop) has a built-in SIM card slot, then it will show you the “Mobile Network” page in Settings and “Mobile Broadband” option in upper right menu.

For those who rarely use this feature, the option is useless but makes the menu longer. So, it’s a good choice to completely disable it!


Continue Reading…

My Ubuntu laptop recently runs into a power-off issue. Every time when I shutdown or reboot the machine, it stuck at blank screen with text message “systemd-shutdown[1]: waiting for process: crond” for more than a minute.

According to the keyword ‘crond‘, it has something to do with the cron schedule job. And, thanks to this thread, user may run the command below to list all current schedule cron jobs:

find /etc/cron* -type f | xargs  ls -ltr

And there you’ll find that the schedule job ‘/etc/cron.d/collect‘ tries to run an unknown crond binary under ‘/var/tmp’ every 10th minute (e.g., 5:10, 5:20, 5:30 …). So the problem may not occur when shutdown/reboot within a few minutes after login.

The /var/tmp directory stores temporary files or folders that are preserved between system reboots. According to @bird7676 in that thread, the files were probably created by Free Download Manager.

Solution:

If you don’t use and have removed the Free Download Manager, simply remove these temporary files as well as the schedule job.

To do so, either use a system cleaner (e.g., BleachBit), or press Ctrl+Alt+T on keyboard to open terminal and run command below to remove the files:

sudo rm /etc/cron.d/collect /var/tmp/crond /var/tmp/bs

If the app is important for you, you may run ‘mv‘ command to move the files to another location or backup unfinished downloads before deleting them.

NOTE: while the binary may be still running though you have removed the file, you may need to shutdown/reboot twice to check if the problem is fixed.

Going to free up Ubuntu system disk space? Try clearing the systemd journal logs, it may free up a few GB of space.

By using the Disk Usage Analyzer tool, I found that /var/log/journal takes more than 4 GB system space in my Ubuntu 20.04.

Systemd has its own logging system called the journal, and the log files are stored in /var/log/journal. As long as I don’t need the logs for any debugging, it’s safe to delete these files. And following steps will show you how.

1. First open terminal from system app launcher, and you may run command to check out the current disk usage of all journal files:

journalctl --disk-usage

2. If you decide to clear the logs, run command to rotate the journal files. All currently active journal files will be marked as archived, so that they are never written to in future.

sudo journalctl --rotate

3. Now clear the journal logs by choosing one of following commands:

  • Delete journal logs older than X days:
    sudo journalctl --vacuum-time=2days
  • Delete log files until the disk space taken falls below the specified size:
    sudo journalctl --vacuum-size=100M
  • Delete old logs and limit file number to X:
    sudo journalctl --vacuum-files=5

4. You can also edit the configuration file to limit the journal log disk usage (100 MB for example).

Run command in terminal to edit the file via Gedit text editor (For 23.04+, replace gedit with gnome-text-editor):

sudo -H gedit /etc/systemd/journald.conf

When the file opens, un-comment (remove # at the beginning) the line #SystemMaxUse= and change it to SystemMaxUse=100M.

Save the file and reload systemd daemon via command:

systemctl daemon-reload

That’s all, Enjoy!