2

I have set the GUI software updater to never automatically check for updates as I prefer doing this myself using the commandline and apt-get.

But whenever I install updates that require a reboot (mainly kernel and glibc, I think), still the GUI software updater kicks in and shows me that little reboot prompt with the three buttons Settings... Reboot later Reboot now or similar to this (I'm seeing a translated version of it).

This is annoying, especially as it keeps popping up maybe hourly or so even after I refused to reboot now. I shut the machine down daily anyway and therefore it's not important for me to be reminded of this.

How do I disable this window from popping up, or how can I configure it to stay closed after I clicked on Reboot later once?


What I already did is to set the software updater to never automatically look for updates, but this is of course not related to the reboot prompt:

software&updates > update settings

I also have modified the dconf key com.ubuntu.update-notifier/no-show-notifications to True using dconf-editor, but the window still appears.

dconf-editor

1 Answer 1

1

When you install updates, two files are created in /run which are read to determine if updates require rebooting: reboot-required and reboot-required.pkgs, one of which is just a string indicating a reboot is needed and one which shows which package(s) is calling for it.

You can (as root or with sudo) rm these two files and that should do it. Truncating them is not enough - they must not exist. Curiously, I cannot find anything in the /etc/apt files about this and my only real clue came from /etc/update-motd.d pointing to /usr/lib/update-notifier/update-motd-reboot-required (which is called by SSH on login to indicate a reboot is required), and which has the following code in it:

#!/bin/sh -e
#
# helper for update-motd

if [ -f /var/run/reboot-required ]; then
    cat /var/run/reboot-required
fi

/var/run is a symlink to /run, so there is my answer. If you don't speak sh, the if [ -f ... ] is a conditional to see if a file exists; the subsequent cat command prints its contents in the SSH session.

3
  • Thanks, that sounds interesting. I will try it on the next kernel update and report back.
    – Byte Commander
    Feb 10, 2016 at 7:46
  • @ByteCommander: I am impatient so an alternative would be to touch both files into existence as root with the default umask, which yields appropriate 644 permissions on them. Then log out and log back in: behold, the reboot prompt reappears. Remove them, log out and back in: no prompt. That was my testing method since kernel updates are not too frequent. I'll also add the following: since the if [ -f ___ ] construct seems to be used and relies on a regular file, I bet if you touched both files and played with the perms, you could disable the pop-up altogether.
    – Curtis
    Feb 10, 2016 at 16:11
  • 1
    @ByteCommander: just ran a kernel update and watched the output. The trigger is in /etc/kernel/postinst.d/ and is a symlink called update-notifier to /usr/share/update-notifier/notify-reboot-required, which both touches the files and runs the applet. You should be able to remove the symlink and then just touch an empty file with the same name; an alternative would be the chmod ugo-x on the linked file too so that it fails to execute when called. No more pop-ups.
    – Curtis
    Feb 10, 2016 at 16:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .