After a recent set of updates, booting into Linux Mint produced a (transient) pop-up message box indicating that “The virtualbox kernel service is not running”. My immediate reaction was that there must be some problem that was preventing VirtualBox from starting. Then, I thought about this for a minute. I did have VirtualBox loaded on this machine at one time, but then I uninstalled it. This being the case, there is no reason that the virtualbox kernel service should be running! So, what’s going on?
|Update – My blow-everything-away fix worked for me but one user found that it caused a boot failure on his system. The good news is that there is a more robust fix in the recent release of Linux Mint 17.3 (Rosa). Update to Rosa or modify the script file with the same code used by Rosa. See the comments section below for full details.|
A web search produced the answer in the Linux Mint Forums. Evidently, a developer included a script to test if the VirtualBox kernel module is present. If the kernel is not found, the message box is displayed briefly and the boot process continues normally.
The flaw in this logic, is for situations like mine, where VirtualBox isn’t installed and, consequently, the kernel isn’t running. Now the information imparted by the message is true, but the message itself is completely unnecessary.
The problem is that many users will assume that something is wrong. Why would the operating system produce a pop-up message unless there is a problem? And, indeed, this was the gist of many postings on Linux Mint Forums.
A couple of users took the position that the flurry of concern was a storm in a teacup – no need to panic, it’s just a pop-up message, nothing happens. However, many others, indicated that they found the message to be either misleading and/or a nuisance.
I found one respondent’s tongue-in-cheek suggestions particularly amusing – something along the lines of: if this message is a harmless pop-up, what are we to expect next? – messages to indicate that “You are logged in”, “Your desktop has loaded”, etc.
While a web search on the “issue” quickly reveals that there is no underlying problem, for those of us who consider the pop-up to be both completely unnecessary and an unwanted nuisance, the question is how to eliminate it. Some users suggested purging the updates that created the script that produced the pop-up message; however, this approach got mixed reviews. For some users, this approach appears to have eliminated the pop-up while, for others, the message re-appeared on subsequent boot-ups. Another user suggested that “…we can always edit the script…”, and this has been my approach.
I didn’t want to spend time understanding the details of the script’s operations and a very quick scan of the code indicates that it is merely looking for a running instance of VirtualBox. Since, I am not running this software, nor do I have any plans to implement it in the foreseeable future, my quick-and-dirty solution was to comment out all the lines of code in the script. Now, at boot-up, the script is called, effectively has no executable commands, and so exits without doing anything – including not producing any pop-up message. “Problem” solved.
For anybody wanting to use this approach, and needing more detailed instructions, here’s what I did:
(1) In Terminal enter: sudo gedit /etc/X11/Xsession.d/98vboxadd-xclient (or substitute pluma for gedit if you are using the default text editor)
(2) On every line of the script that doesn’t start already with a # symbol, type a # symbol as the first character on the line (this makes the line into a “comment”)
For example, we are going to modify the section of code that was originally:
if test -f /proc/modules && ! grep -q vboxguest /proc/modules 2>/dev/null; then # Do not start if the kernel module is not present. notify-send "VBoxClient: the VirtualBox kernel service is not running. Exiting."
#if test -f /proc/modules && ! grep -q vboxguest /proc/modules 2>/dev/null; then # Do not start if the kernel module is not present. # notify-send "VBoxClient: the VirtualBox kernel service is not running. Exiting."
(3) Save the modified file.
Commenting out all the lines of code in the script file means that the script will run but do nothing. In particular, the line of code (notify-send… shown above) that generated the pop-up message is now treated as a comment and so the pop-up message is not generated.
Clearly, this approach is only applicable if VirtualBox is not being activated at boot time. But if, like me, you are not running VirtualBox, this “fix” will eliminate the annoying pop-up.
vboxclient the virtualbox kernel service is not running