Saturday, April 20, 2024
 Popular · Latest · Hot · Upcoming
565
rated 0 times [  565] [ 0]  / answers: 1 / hits: 90714  / 2 Years ago, sun, may 29, 2022, 11:09:18

When I run apt-get upgrade on my Ubuntu 17.04 machine, sometimes it starts Dwarf Fortress by itself.



It has happened already at least two times, so it was probably not just some sort of one time thing. Also, the execution ofapt-get upgrade seemed to be paused until I manually quit the Dwarf Fortress, so it most probably wasn't caused by something else running in that time.



The console at that time said Unpacking xxx. where xxx was something with mysql in name. I don't however know which package exactly, as today, apt-get upgrade upgraded a lot of mysql related packages.



I would like to know what happens and how to stop it from happening.


More From » apt

 Answers
7

With a question as weird as this, it's of course impossible to say for sure -- but I'll eat my hat if my first hunch isn't correct. :)



The only way I can think of, how such unrelated things could be linked is this:
After installing (well, extracting) Dwarf Fortress, instead of going to the directory every time and running it with ./df, you wanted to be able to run it from anywhere, like any old command. You added the Dwarf Fortress directory to your $PATH, before the system directories, perhaps by chance, perhaps because you noticed it didn't work otherwise, and you'd instead just get information about your filesystems.



Dwarf Fortress's executable is named df, which is also the name of a system tool for displaying disk space usage of your filesystems, creating a collision. By making it so that when you type df, Dwarf Fortress starts, you've shadowed the system tool, so when a script wants to - let's say - check if you have enough free space for unpacking an archive, instead of invoking df - the system tool - it'll start Dwarf Fortress instead. And after you quit Dwarf Fortress, the poor little script will be very confused as to why it wasn't given the disk usage information it asked for.



Anyway, thanks for the laugh, this has to be among the funniest problems I've ever seen voiced on StackExchange. :)


[#10710] Tuesday, May 31, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
singerrupt

Total Points: 435
Total Questions: 111
Total Answers: 109

Location: Angola
Member since Tue, May 5, 2020
4 Years ago
singerrupt questions
;