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

    Very popular on the Ask Ubuntu resource has gained a very strange question from a user of the Ubuntu Linux distribution. According to him, in some cases when updating the system with the help of sudo apt-get upgradewhat happens he cannot expect at all: the launch of the game “Dwarf Fortress”. The story turned out to be instructive ... The



    whole question of Steven Vascellaro is as follows:
    When I run apt-get upgradeon my machine with Ubuntu 17.04, Dwarf Fortress sometimes starts spontaneously .

    This has already happened at least twice, so it does not look like any one-time event. In addition, it seems that the execution apt-get upgradefreezes until I manually exit Dwarf Fortress, so most likely this behavior is not caused by something else that is launched at the same time.

    The console at this moment displays Unpacking xxx.where xxx- something with mysqlthe name. I do not know exactly which package, because today I apt-get upgradeupdated many packages related to MySQL.

    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 this unusual apt-get behavior. What are your ideas?

    The answer 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 entirely correct) assumption, when the user became uncomfortable each time calling it from a certain directory c ./df, he simply added the necessary directory to the beginning of the environment variable $PATH(i.e. with a priority higher than y /bin). As everyone knows, there is a system utility of the same name ( df) for displaying information about the space occupied on a disk. And then everything is clear: for example, there is a check (by calling df) of the space available for installation ... but you have to wait until the game ends (and get an unexpected result).

    As it became known from the second and more correct answer, even a variable$PATHwas not required because the user simply moved his dfto /usr/local/bin, the priority of which is already higher by default:

    $ 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 on chat.stackexchange.com or reddit (180+ comments). For instance:

    What other utility will you check for disk usage? Dwarf Fortress is the right tool for this. Dwarves are mining new disk space in the mountains. Have you thought what they are doing?

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

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

    Also popular now: