-
Notifications
You must be signed in to change notification settings - Fork 594
Commons of opengl-game-wrapper.sh #4071
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
c823aa4
to
185167d
Compare
I'm unsure whether we should add profiles for all the GAME-wrappers or not. Explanation: Fedora (and maybe more) installs a .desktop that uses $ cat /usr/bin/opengl-game-wrapper.sh
#!/usr/bin/bash
. /usr/share/opengl-games-utils/opengl-game-functions.sh
GAME=`basename $0 | sed 's/-wrapper.*//'`
checkDriOK $GAME
exec $GAME "$@"
$ cat /usr/share/opengl-games-utils/opengl-game-functions.sh
# check if DRI is available, true if it is, false otherwise
function hasDri ()
{
if [ "`glxinfo | grep "direct rendering: " | head -n 1 | cut -d " " -f 3`" != Yes ] ||
glxinfo | grep -qE "OpenGL renderer string: Software Rasterizer|OpenGL renderer string: Gallium .* on llvmpipe"; then
return 1
else
return 0
fi
}
# check if DRI is available, show an error and exit if it isn't
function checkDriOK ()
{
if ! hasDri; then
zenity --error --text="Your system currently is not capable of hardware \
accelerated 3D. Therefore $1 cannot run.
Usually the cause of this error is that there are no Free Software drivers \
for your graphics card, please contact your graphics card manufacturer and \
kindly ask them to provide Free Software support for your card."
exit 1;
fi
} On the one hand it makes sense to have this check inside that sandbox. On the other hand it requires a shell which can weaken the sandbox. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Only one nitpick.
Always difficult IMO weighing pro's and con's in such a context. How about adding a comment? I mean, keep the sandbox as tight as possible (no shell) and inform users on how to proceed if they want that? As you can probably tell, I don't have any experience with (sandboxing) games, so I can't offer anything helpful here I'm afraid. |
24a9cc9
to
4df6485
Compare
…, gl-117, glaxium, pinball alienarena is missing in firecfg.config by intention, I didn't tested any online multiplayer.
[skip ci] - Add allow-opengl-game.inc - Add profiles for alienarena-wrapper, ballbuster-wrapper, colorful-wrapper, etr-wrapper, gl-117-wrapper, glaxium-wrapper, neverball-wrapper, neverputt-wrapper, pinball-wrapper, supertuxkart-wrapper - Use allow-opengl-game.inc in xonotic.profile and the profiles above - xonotic.profile: simplify private-bin by using xonotic*
4df6485
to
41f69f7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Nice work!
Added on commit 41f69f7 ("Commons of opengl-game-wrapper.sh") / PR netblue30#4071. Commands used to search and replace: $ git ls-files -z -- '*.profie' | xargs -0 -I '{}' sh -c "git mv '{}' \"\`printf '%s\n' '{}' | sed 's/.[^.]*$//'\`\""
They are duplicates of their equivalent *.profile files. Added on commit 41f69f7 ("Commons of opengl-game-wrapper.sh") / PR netblue30#4071. Commands used to search and replace (which results in their deletion): $ git ls-files -z -- '*.profie' | xargs -0 -I '{}' sh -c "git mv -f '{}' \"\`printf '%s\n' '{}' | sed 's/.[^.]*$//'\`.profile\""
Added on commit 41f69f7 ("Commons of opengl-game-wrapper.sh") / PR netblue30#4071. Each one is a duplicate of a .profile file that was added on the same commit. Commands used to search and replace (which is what causes their deletion): $ git ls-files -z -- '*.profie' | xargs -0 -I '{}' sh -c "git mv -f '{}' \"\`printf '%s\n' '{}' | sed 's/.[^.]*$//'\`.profile\""
To make it consistent with the other include profiles. See etc/templates/profile.template. With this, all `etc/inc/allow-*` files are listed in profile.template. The explanation is based on a comment by @rusty-snake[1]. Relates to netblue30#4071. This is a follow-up to netblue30#6299. [1] netblue30#4071 (comment)
To make it consistent with the other include profiles. See etc/templates/profile.template. With this, all `etc/inc/allow-*` files are listed in profile.template. The explanation is based on a comment by @rusty-snake[1]. Relates to #4071. This is a follow-up to #6299. [1] #4071 (comment)
Add profiles for alienarena, ballbuster, colorful, gl-117, glaxium, pinball
Commons of opengl-game-wrapper.sh
colorful-wrapper, etr-wrapper, gl-117-wrapper, glaxium-wrapper,
neverball-wrapper, neverputt-wrapper, pinball-wrapper,
supertuxkart-wrapper