Hi,
I'm using Firefox on the sandbox but I'm wondering if there's any way to specify a DPI for the window manager or X for that sandbox session. For example, when Firefox loads, the fonts on its UI elements are WAY smaller than my out-of-sandbox Firefox (and the rest of the system for that matter).
Regards, Jorge
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 06/01/2011 08:56 PM, Jorge Fábregas wrote:
Hi,
I'm using Firefox on the sandbox but I'm wondering if there's any way to specify a DPI for the window manager or X for that sandbox session. For example, when Firefox loads, the fonts on its UI elements are WAY smaller than my out-of-sandbox Firefox (and the rest of the system for that matter).
Regards, Jorge -- selinux mailing list selinux@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/selinux
Have you tried to suck in some of the desktop, like the fontconfig directory.
sandbox -i .fontconfig -X -t sandbox_web_t firefox
Not sure if the fonts come from a different directory then their.
On 06/02/2011 08:47 AM, Daniel J Walsh wrote:
sandbox -i .fontconfig -X -t sandbox_web_t firefox
Thanks Daniel. I had no idea about the -i switch. It didn't work with ~/.fontconfig/ though. I kept looking around inside the actual "sandbox" (python script) to see where the actual call to "X" is performed. I then found:
/usr/share/sandbox/sandboxX.sh
...and added "-dpi 96" as another argument for the Xephyr line there and it worked! Now when I load Firefox in the sandbox it matches my system DPI (96) and looks exactly like the Firefox out of the sandbox. Great!
Regards, Jorge
On 06/03/2011 02:58 AM, Jorge Fábregas wrote:
On 06/02/2011 08:47 AM, Daniel J Walsh wrote:
sandbox -i .fontconfig -X -t sandbox_web_t firefox
Thanks Daniel. I had no idea about the -i switch. It didn't work with ~/.fontconfig/ though. I kept looking around inside the actual "sandbox" (python script) to see where the actual call to "X" is performed. I then found:
/usr/share/sandbox/sandboxX.sh
...and added "-dpi 96" as another argument for the Xephyr line there and it worked! Now when I load Firefox in the sandbox it matches my system DPI (96) and looks exactly like the Firefox out of the sandbox. Great!
Thanks for this tip!
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 06/02/2011 08:58 PM, Jorge Fábregas wrote:
On 06/02/2011 08:47 AM, Daniel J Walsh wrote:
sandbox -i .fontconfig -X -t sandbox_web_t firefox
Thanks Daniel. I had no idea about the -i switch. It didn't work with ~/.fontconfig/ though. I kept looking around inside the actual "sandbox" (python script) to see where the actual call to "X" is performed. I then found:
/usr/share/sandbox/sandboxX.sh
..and added "-dpi 96" as another argument for the Xephyr line there and it worked! Now when I load Firefox in the sandbox it matches my system DPI (96) and looks exactly like the Firefox out of the sandbox. Great!
Regards, Jorge -- selinux mailing list selinux@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/selinux
Now for a bonus point, add an option to sandbox that passes that option to Xephyr. Patches accepted.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
On 06/03/2011 05:17 PM, Daniel J Walsh wrote:
Now for a bonus point, add an option to sandbox that passes that option to Xephyr. Patches accepted.
Is dpi 96 default? If that is the case, what about hardcoding -dpi 96?
On 06/06/2011 07:05 PM, Christoph A. wrote:
Is dpi 96 default? If that is the case, what about hardcoding -dpi 96?
Hi,
No. It is totally dependent on your monitor. Mine has 96 pixels per inch (ppi). Usually the desktop environments (GNOME, KDE etc...) will set this value accordingly.
The ideal thing for the sandbox command would be to figure out this value and pass it along to Xephyr. I almost got it on this file:
/usr/share/sandbox/sandboxX.sh
...which is a bash shell script. I added a new variable at the beginning:
systemdpi=`xrdb -query | grep dpi | /bin/cut -f 2`
...which will capture the current dpi (96 in my case).
And then on the Xelphyr call....I added: -dpi $systemdpi
...but somehow xrdb doesn't work at this point of the flow. I revereted back to hardcoding the value.
Anyway, I don't think many people are concerned about this issue.
Regards, Jorge
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 06/06/2011 08:14 PM, Jorge Fábregas wrote:
On 06/06/2011 07:05 PM, Christoph A. wrote:
Is dpi 96 default? If that is the case, what about hardcoding -dpi 96?
Hi,
No. It is totally dependent on your monitor. Mine has 96 pixels per inch (ppi). Usually the desktop environments (GNOME, KDE etc...) will set this value accordingly.
The ideal thing for the sandbox command would be to figure out this value and pass it along to Xephyr. I almost got it on this file:
/usr/share/sandbox/sandboxX.sh
..which is a bash shell script. I added a new variable at the beginning:
systemdpi=`xrdb -query | grep dpi | /bin/cut -f 2`
..which will capture the current dpi (96 in my case).
And then on the Xelphyr call....I added: -dpi $systemdpi
..but somehow xrdb doesn't work at this point of the flow. I revereted back to hardcoding the value.
Anyway, I don't think many people are concerned about this issue.
Regards, Jorge -- selinux mailing list selinux@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/selinux
These are the files I will check into Rawhide today. See if they work for you.
On 06/07/2011 08:31 AM, Daniel J Walsh wrote:
These are the files I will check into Rawhide today. See if they work for you.
Hey that works perfectly!! I see how you incorporated the xrdb line into sandbox and then pass the parameter along to sandboxX.sh. I wish I knew some python! (I plan to eventually).
Thanks Daniel!
selinux@lists.fedoraproject.org