-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This patch looks good to me. acked. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk5WtQMACgkQrlYvE4MpobNsSgCgqBw/W8Kr3odmul1X4PKapxb9 8/4An3yRiFmw0o0ZQoUAHwd+EPZZOX6f =RII3 -----END PGP SIGNATURE-----
>From 57dd697a13b155662a65a9f3d8a45f22460d2463 Mon Sep 17 00:00:00 2001 From: Dan Walsh <dwalsh@xxxxxxxxxx> Date: Tue, 7 Jun 2011 08:34:04 -0400 Subject: [PATCH 60/77] policycoreutils: sandbox: pass DPI from the desktop Fix sandbox to pass DPI from the desktop to the sandbox program. Signed-off-by: Eric Paris <eparis@xxxxxxxxxx> --- policycoreutils/sandbox/sandbox | 4 ++-- policycoreutils/sandbox/sandboxX.sh | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/policycoreutils/sandbox/sandbox b/policycoreutils/sandbox/sandbox index 06593e1..4069f43 100644 --- a/policycoreutils/sandbox/sandbox +++ b/policycoreutils/sandbox/sandbox @@ -324,7 +324,7 @@ sandbox [-h] [-c] [-l level ] [-[X|M] [-H homedir] [-T tempdir]] [-I includefile if self.__options.X_ind: self.setype = DEFAULT_X_TYPE - + self.dpi=commands.getoutput("xrdb -query | grep dpi | /bin/cut -f 2") if self.__options.setype: self.setype = self.__options.setype @@ -413,7 +413,7 @@ sandbox [-h] [-c] [-l level ] [-[X|M] [-H homedir] [-T tempdir]] [-I includefile self.__setup_sandboxrc(self.__options.wm) - cmds += [ "--", SANDBOXSH, self.__options.windowsize ] + cmds += [ "--", SANDBOXSH, self.__options.windowsize, self.dpi ] else: cmds += [ "--" ] + self.__paths return subprocess.Popen(cmds).wait() diff --git a/policycoreutils/sandbox/sandboxX.sh b/policycoreutils/sandbox/sandboxX.sh index e501b03..ec7f855 100644 --- a/policycoreutils/sandbox/sandboxX.sh +++ b/policycoreutils/sandbox/sandboxX.sh @@ -1,10 +1,11 @@ #!/bin/bash context=`id -Z | secon -t -l -P` export TITLE="Sandbox $context -- `grep ^#TITLE: ~/.sandboxrc | /usr/bin/cut -b8-80`" -[ $# -eq 1 ] && export SCREENSIZE="$1" || export SCREENSIZE="1000x700" +[ -z $1 ] && export SCREENSIZE="1000x700" || export SCREENSIZE="$1" +[ -z $2 ] && export DPI="96" || export DPI="$2" trap "exit 0" HUP -(/usr/bin/Xephyr -title "$TITLE" -terminate -screen $SCREENSIZE -displayfd 5 5>&1 2>/dev/null) | while read D; do +(/usr/bin/Xephyr -title "$TITLE" -terminate -screen $SCREENSIZE -dpi $DPI -displayfd 5 5>&1 2>/dev/null) | while read D; do export DISPLAY=:$D cat > ~/seremote << __EOF #!/bin/sh -- 1.7.6