There is a game I want to run (I am on debian 4.9) but it is kind of sketch so I want to run it in some kind of emulator so it thinks it's the only thing on my machine so it can't delete my files or upload them to somewhere. If it's mining bitcoin or putting me in a botnet or whatever I don't care really as long as it only does that when the game is running. (When I close it it stops and it doesn't start except when I start it.)

I was thinking of just setting all my read permissions to me only and running it under another user, but I'd also like to be able to use my computer and files like normal while it is running, so this isn't really a great solution.

Also ideally I don't want this to lag out the game too much. How do I do this?

  • Create a second user account for this game
    – roaima
    May 1 '20 at 7:08
  • Please specify whether or not this game is computation intensive relative to your hardware.
    – agc
    May 1 '20 at 7:24

There are multiple solutions to this, but I think the most appropriate would be Linux Containers. It is more lightweight than a VM, and should have very little performance impact. I know you're using Debian, but this page on the Arch Wiki will likely be very helpful.

  • Unfortunately, relying on containers for security is still riskier than using VMs. May 1 '20 at 7:17
  • @StephenKitt When configured properly, they should provide enough of a security advantage to be sufficient. But the main reason I recommended them over VMs is because the OP mentioned that they wanted to run a game. Graphics in a VM would likely take a much bigger hit to performance than they would in a container. May 1 '20 at 7:20
  • I agree there would be a large performance impact, but I’m just saying I wouldn’t run a hostile workload in a container. May 1 '20 at 7:42
  • @StephenKitt that's fair. I suppose it's a trade off; you'd have to weigh the hostility against the performance requirements. May 1 '20 at 7:46

For minimal config hassle without the overhead of a full emulator, consider firejail. For example, this runs somegame and saves a separate reusable overlay file system foobar, which is the only thing somegame can read or write data to:

firejail --overlay-named foobar somegame 

If there's no need to reuse the overlay, (so that somegame forgets everything each time its run), shorten the above command to:

firejail --overlay somegame

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.