📜 ⬆️ ⬇️

Why does the Dwarf Fortress game start during apt-get upgrade?

The great popularity of the resource Ask Ubuntu got a very strange question the user of the Linux distribution Ubuntu. According to him, in some cases, when upgrading the system with sudo apt-get upgrade , something that he cannot expect at all happens: the launch of the game “Dwarf Fortress”. The story was instructive ...



Fully question Steven Vascellaro sounds as follows:
When I run apt-get upgrade on my machine with Ubuntu 17.04, sometimes Dwarf Fortress spontaneously starts.
')
This has already happened at least twice, so it doesn't seem like a one-time event. In addition, it seems that executing apt-get upgrade stops until I manually exit Dwarf Fortress, so most likely this behavior is not caused by something else that is running at the same time.

The console at this moment displays Unpacking xxx. where xxx is something with mysql in the title. I don’t know exactly which package, because today the apt-get upgrade updated many MySQL related packages.

I would like to know what is happening and how to prevent it. Thanks for your ideas.

This data was enough to guess the reason for such an unusual apt-get behavior. What are your ideas?

The solution is ...
The binary file of the game is named df , which corresponds to the first letters of its name. Therefore, according to the first (and not quite right) assumption, when it became inconvenient for the user to call it from a certain directory with ./df each time, he simply added the necessary directory to the beginning of the $PATH environment variable (that is, with a priority higher than that of /bin ). As everyone knows, there is a system utility of the same name ( df ) for displaying information about the space occupied on the disk. And then everything is clear: there is, for example, checking (by calling df ) free space to install ... but you have to wait for the end of the game (and get an unexpected result).

As it became known from the second and more correct answer, even the $PATH variable was not needed, because the user simply moved his df to /usr/local/bin , which has a higher default priority:

 $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 17.04 Release: 17.04 Codename: zesty $ echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin 

A wide variety of other answers can be found at chat.stackexchange.com or reddit (180+ comments). For example:

What other utility will you check disk usage for? Dwarf Fortress is the right tool for this. Dwarves mine new disk space in the mountains. And you thought what they do?

Once I met a game server on which source was an alias for running Counter-Strike server. Because of this, many normal shell scripts behaved strangely.

The comments are welcome descriptions of similar cases from your rich admin practice.

Source: https://habr.com/ru/post/335944/


All Articles