Pass desktop dpi to sandbox Xephyr window
This commit is contained in:
parent
c2ef4a0bea
commit
dc86b007cf
@ -1642,7 +1642,7 @@ index ff0ee7c..0c8a085 100644
|
|||||||
test:
|
test:
|
||||||
@python test_sandbox.py -v
|
@python test_sandbox.py -v
|
||||||
diff --git a/policycoreutils/sandbox/sandbox b/policycoreutils/sandbox/sandbox
|
diff --git a/policycoreutils/sandbox/sandbox b/policycoreutils/sandbox/sandbox
|
||||||
index 48a26c2..29c99ed 100644
|
index 48a26c2..b1e683b 100644
|
||||||
--- a/policycoreutils/sandbox/sandbox
|
--- a/policycoreutils/sandbox/sandbox
|
||||||
+++ b/policycoreutils/sandbox/sandbox
|
+++ b/policycoreutils/sandbox/sandbox
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
@ -1828,7 +1828,7 @@ index 48a26c2..29c99ed 100644
|
|||||||
if self.__options.X_ind:
|
if self.__options.X_ind:
|
||||||
self.setype = DEFAULT_X_TYPE
|
self.setype = DEFAULT_X_TYPE
|
||||||
-
|
-
|
||||||
+
|
+ self.dpi=commands.getoutput("xrdb -query | grep dpi | /bin/cut -f 2")
|
||||||
if self.__options.setype:
|
if self.__options.setype:
|
||||||
self.setype = self.__options.setype
|
self.setype = self.__options.setype
|
||||||
|
|
||||||
@ -1900,7 +1900,7 @@ index 48a26c2..29c99ed 100644
|
|||||||
+
|
+
|
||||||
+ self.__setup_sandboxrc(self.__options.wm)
|
+ self.__setup_sandboxrc(self.__options.wm)
|
||||||
+
|
+
|
||||||
+ cmds += [ "--", SANDBOXSH, self.__options.windowsize ]
|
+ cmds += [ "--", SANDBOXSH, self.__options.windowsize, self.dpi ]
|
||||||
+ else:
|
+ else:
|
||||||
+ cmds += [ "--" ] + self.__paths
|
+ cmds += [ "--" ] + self.__paths
|
||||||
+ return subprocess.Popen(cmds).wait()
|
+ return subprocess.Popen(cmds).wait()
|
||||||
@ -2057,19 +2057,21 @@ index ff8b3ef..8508647 100644
|
|||||||
|
|
||||||
# Source function library.
|
# Source function library.
|
||||||
diff --git a/policycoreutils/sandbox/sandboxX.sh b/policycoreutils/sandbox/sandboxX.sh
|
diff --git a/policycoreutils/sandbox/sandboxX.sh b/policycoreutils/sandbox/sandboxX.sh
|
||||||
index 8338203..e501b03 100644
|
index 8338203..9648100 100644
|
||||||
--- a/policycoreutils/sandbox/sandboxX.sh
|
--- a/policycoreutils/sandbox/sandboxX.sh
|
||||||
+++ b/policycoreutils/sandbox/sandboxX.sh
|
+++ b/policycoreutils/sandbox/sandboxX.sh
|
||||||
@@ -1,13 +1,17 @@
|
@@ -1,13 +1,18 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
context=`id -Z | secon -t -l -P`
|
context=`id -Z | secon -t -l -P`
|
||||||
export TITLE="Sandbox $context -- `grep ^#TITLE: ~/.sandboxrc | /usr/bin/cut -b8-80`"
|
export TITLE="Sandbox $context -- `grep ^#TITLE: ~/.sandboxrc | /usr/bin/cut -b8-80`"
|
||||||
-export SCREENSIZE="1000x700"
|
-export SCREENSIZE="1000x700"
|
||||||
-#export SCREENSIZE=`xdpyinfo | awk '/dimensions/ { print $2 }'`
|
-#export SCREENSIZE=`xdpyinfo | awk '/dimensions/ { print $2 }'`
|
||||||
+[ $# -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
|
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 -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
|
export DISPLAY=:$D
|
||||||
- python -c 'import gtk, os, commands; commands.getstatusoutput("%s/.sandboxrc" % os.environ["HOME"])'
|
- python -c 'import gtk, os, commands; commands.getstatusoutput("%s/.sandboxrc" % os.environ["HOME"])'
|
||||||
+ cat > ~/seremote << __EOF
|
+ cat > ~/seremote << __EOF
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
Summary: SELinux policy core utilities
|
Summary: SELinux policy core utilities
|
||||||
Name: policycoreutils
|
Name: policycoreutils
|
||||||
Version: 2.0.86
|
Version: 2.0.86
|
||||||
Release: 10%{?dist}
|
Release: 11%{?dist}
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
# Based on git repository with tag 20101221
|
# Based on git repository with tag 20101221
|
||||||
@ -331,6 +331,9 @@ fi
|
|||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jun 7 2011 Dan Walsh <dwalsh@redhat.com> 2.0.86-11
|
||||||
|
- Pass desktop dpi to sandbox Xephyr window
|
||||||
|
|
||||||
* Mon Jun 6 2011 Dan Walsh <dwalsh@redhat.com> 2.0.86-10
|
* Mon Jun 6 2011 Dan Walsh <dwalsh@redhat.com> 2.0.86-10
|
||||||
- Allow semodule to pick alternate root for selinux files
|
- Allow semodule to pick alternate root for selinux files
|
||||||
- Add ~/.config/* to restorcond_user.conf, so restorecond will watch for mislabeled files in this directory.
|
- Add ~/.config/* to restorcond_user.conf, so restorecond will watch for mislabeled files in this directory.
|
||||||
|
Loading…
Reference in New Issue
Block a user