Create a wrapper for wine that runs under another user?
I have created a user called wine to run Wine under for two reasons:
- any malicious activity can only damage
/home/wine - Wine tends to pollute the home folder with heaps of configuration files in
~/.local
However, I wish to create a wrapper for wine so that when run, sets the UID and runs Wine under that user.
So far, my current idea is:
- create a
bashscript,/usr/local/bin/wine(remember that/usr/local/binis before/usr/binin$PATH) - this script will
gksuinto thewineuser, running/usr/bin/wine(with full path, to avoid recursively running this script) with the arguments
This seems a little clunky though. Any other ideas?
What I have so far in /usr/local/bin/wine:
#!/bin/bash
g开发者_如何学编程ksu -D Wine -u wine /usr/bin/wine $@
Edit: the script seems to be launching when opening applications, however Wine prints Cannot find file on stdout.
Your best bet is to use setuid.
加载中,请稍侯......
精彩评论