Linux trying to install factorio to /usr/games

Anything that prevents you play the game properly. Do you have issues with paying for the game, downloading it or properly running it on your computer? Let us know here.
Post Reply
scooter010
Inserter
Inserter
Posts: 22
Joined: Tue Apr 30, 2019 6:09 am
Contact:

Linux trying to install factorio to /usr/games

Post by scooter010 »

Hey ho!

I would like to install factorio into the designated folder /usr/games
Problem is, factorio won't start if it's inside that folder, because it cannot create the .lock file (no write permissions for my user-account).

First of all, normal user doesn't have write permissions to /usr/games .
So I added user and group "games". Fileowner and group of /usr/games changed to "games" (rekursive).
Then I set the setuid bit to factorio binary and even added my user-account to group games.
The result is: factorio does not start.

Code: Select all

No protocol specified
   0.000 2020-11-15 16:43:02; Factorio 1.0.0 (build 54889, linux64, alpha)
   0.054 Operating system: Linux (Pop 20.10)
   0.054 Program arguments: "factorio" 
   0.054 Read data path: /usr/games/factorio_folder/data
   0.054 Write data path: /usr/games/factorio_folder [104363/142505MB]
   0.054 Binaries path: /usr/games/factorio_folder/bin
   0.069 System info: [CPU: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz, 12 cores, RAM: 31956 MB]
   0.069 Environment: DISPLAY=:1 WAYLAND_DISPLAY=<unset> DESKTOP_SESSION=pop XDG_SESSION_DESKTOP=pop XDG_CURRENT_DESKTOP=pop:GNOME __GL_FSAA_MODE=<unset> __GL_LOG_MAX_ANISO=<unset> __GL_SYNC_TO_VBLANK=<unset> __GL_SORT_FBCONFIGS=<unset> __GL_YIELD=<unset>
   0.069 Display options: [FullScreen: 1] [VSync: 1] [UIScale: automatic (100.0%)] [Native DPI: 1] [Screen: 255] [Special: lmw] [Lang: de]
No protocol specified
  16.664 Warning Logger.cpp:522: Symbols.size() == 18, usedSize == 10
Factorio crashed. Generating symbolized stacktrace, please wait ...
Raw stacktrace: 0xaee845, 0xaef079, 0xb1497c, 0xf46b65, 0xf7cd7a, 0x1276a18, 0x1280b49, 0x5c47b8, 0, 0x5d417e
  33.461 Warning Logger.cpp:522: Symbols.size() == 13, usedSize == 9
#0  0x0000000000aef079 in Logging::flush() at /tmp/factorio-build-alkzzo/src/Util/Logging.cpp:69
#1  0x0000000000b1497c in Logging::logAndAbortOrThrow(char const*, unsigned int, LogLevel, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) at /tmp/factorio-build-alkzzo/src/Util/Logging.cpp:103
#2  0x0000000000f46b65 in Logging::logAndAbortOrThrow(char const*, unsigned int, LogLevel, char const*, ...) at /tmp/factorio-build-alkzzo/src/Util/Logging.cpp:93
#3  0x0000000000f7cd7a in HardwareInfo::clampWindowSize(short&, short&, unsigned int) at /tmp/factorio-build-alkzzo/src/Platform/HardwareInfo.cpp:112
#4  0x0000000001276a18 in HardwareInfo::clampWindowSize(short&, short&, unsigned int) at /tmp/factorio-build-alkzzo/src/Platform/HardwareInfo.cpp:109
#5  0x0000000001280b49 in SDLWindow::SDLWindow(GraphicsInterface::Type, WindowPositionData) at /tmp/factorio-build-alkzzo/src/Graphics/SDLWindow.cpp:150
#6  0x00000000005c47b8 in SDLWindow::SDLWindow(GraphicsInterface::Type, short, short, bool) at /tmp/factorio-build-alkzzo/src/Graphics/SDLWindow.cpp:104
#7  (nil) in GlobalContext::loadGraphics(std::optional<WindowPositionData>) at /tmp/factorio-build-alkzzo/src/GlobalContext.cpp:902
#8  0x00000000005d417e in GlobalContext::init(bool, bool, bool, std::optional<WindowPositionData>) at /tmp/factorio-build-alkzzo/src/GlobalContext.cpp:447
#9  (nil) in MainLoop::run(Filesystem::Path const&, Filesystem::Path const&, bool, bool, std::function<void ()>, Filesystem::Path const&, MainLoop::HeavyMode) at /tmp/factorio-build-alkzzo/src/MainLoop.cpp:272 (discriminator 2)
#10 0x00007fae3d98a534 in main at /tmp/factorio-build-alkzzo/src/Main.cpp:1123
#11 0x00007fae3dcf1f10 in ?? at ??:0
#12 (nil) in _start at ??:?
Stack trace logging done
  33.461 Error SDLWindow.cpp:117: SDL couldn't be initialized. SDL_Error: No available video device
Logger::writeStacktrace skipped.
  33.461 Error Util.cpp:97: Unexpected error occurred. If you're running the latest version of the game you can help us solve the problem by posting the contents of the log file on the Factorio forums.
Please also include the save file(s), any mods you may be using, and any steps you know of to reproduce the crash.
No protocol specified
  33.463 Error MessageDialog.cpp:53: Unable to show message dialog. SDL Error: [No message system available]

Code: Select all

Linux pop-os 5.8.0-7625-generic #26~1604441477~20.10~d41e407-Ubuntu SMP Wed Nov 4 01:25:00 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Please make it possible to store and run factorio outside home-directory.

Edit: Added ls:

Code: Select all

ll /usr/games/factorio_folder/bin/x64/
insgesamt 196364
drwxrwxr-x 2 games games      4096 Nov 15 16:16 ./
drwxrwxr-x 3 games games      4096 Nov 15 16:16 ../
-rwsr-xr-x 1 games games 201062888 Aug 13 11:36 factorio*

scooter010
Inserter
Inserter
Posts: 22
Joined: Tue Apr 30, 2019 6:09 am
Contact:

Re: Linux trying to install factorio to /usr/games

Post by scooter010 »

I think, a problem could be the setuid bit itself. It prohibits factorio from accessing ~/.factorio folder. User games has no home-directory.

So, factorio just have to be able to start without writing in it's binary-folders and have to store all user related data (including log-in) and plugins in ~/.factorio.

If factorio is inside /usr/games it doesn't need a .lock file, because just root can access that directory.

If factorio would like to perform an update, it needs some kind of helper binary with root setuid (sudo passwort needed) to do the inplace upgrade.

Post Reply

Return to “Technical Help”

Who is online

Users browsing this forum: 5thHorseman