[GH-ISSUE #1007] pass proper DPI to xpra and xephyr #685

Closed
opened 2026-05-05 06:26:43 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @ibukanov on GitHub (Dec 24, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1007

Neither --x11=xpra nor --x11=xephyr report useful DPI information to applications. For example, under xpra xrandr and xdpyinfo reports:

~> firejail --x11=xpra xrandr -q 2>/dev/null | grep ' connected'
default connected 8192x4096+0+0 0mm x 0mm
~> firejail --x11=xpra xdpyinfo 2>/dev/null | grep 'resolution'
  resolution:    96x96 dots per inch

Under xephyr the situation is slightly better as at least xrandr reports the pixel dimensions matching the size of the xephyr window. Still even there there is no information about the physical size of the pixels:

~> firejail --x11=xephyr xrandr -q 2>/dev/null | grep ' connected'
default connected 1360x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
~> firejail --x11=xephyr xdpyinfo 2>/dev/null | grep 'resolution'
  resolution:    75x75 dots per inch

This results in very tiny fonts and icons on HighDPI applications.

As both xpra and Xephyr accept options to set the DPI it would be nice if firejail set that automatically based on the reported xrandr values for the primary screen.

Originally created by @ibukanov on GitHub (Dec 24, 2016). Original GitHub issue: https://github.com/netblue30/firejail/issues/1007 Neither --x11=xpra nor --x11=xephyr report useful DPI information to applications. For example, under xpra xrandr and xdpyinfo reports: ``` ~> firejail --x11=xpra xrandr -q 2>/dev/null | grep ' connected' default connected 8192x4096+0+0 0mm x 0mm ~> firejail --x11=xpra xdpyinfo 2>/dev/null | grep 'resolution' resolution: 96x96 dots per inch ``` Under xephyr the situation is slightly better as at least xrandr reports the pixel dimensions matching the size of the xephyr window. Still even there there is no information about the physical size of the pixels: ``` ~> firejail --x11=xephyr xrandr -q 2>/dev/null | grep ' connected' default connected 1360x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm ~> firejail --x11=xephyr xdpyinfo 2>/dev/null | grep 'resolution' resolution: 75x75 dots per inch ``` This results in very tiny fonts and icons on HighDPI applications. As both xpra and Xephyr accept options to set the DPI it would be nice if firejail set that automatically based on the reported xrandr values for the primary screen.
gitea-mirror 2026-05-05 06:26:43 -06:00
Author
Owner

@netblue30 commented on GitHub (Dec 27, 2016):

There is already support for xephyr. In a text editor open /etc/firejail/firejail.config and add a xephyr-extra-params statement at the end - you have some examples in the file. I'll do something similar for xpra.

<!-- gh-comment-id:269324120 --> @netblue30 commented on GitHub (Dec 27, 2016): There is already support for xephyr. In a text editor open /etc/firejail/firejail.config and add a xephyr-extra-params statement at the end - you have some examples in the file. I'll do something similar for xpra.
Author
Owner

@Ryujinra commented on GitHub (Jan 26, 2018):

@netblue30 Any update on adding this feature for xpra? I use xpra for X11 forwarding, but without the ability to pass the dpi, fonts are tiny on a HiDPI display. Thanks.

<!-- gh-comment-id:360910420 --> @Ryujinra commented on GitHub (Jan 26, 2018): @netblue30 Any update on adding this feature for xpra? I use xpra for X11 forwarding, but without the ability to pass the dpi, fonts are tiny on a HiDPI display. Thanks.
Author
Owner

@chiraag-nataraj commented on GitHub (Jul 24, 2018):

You should be able to use xpra-extra-params --dpi <blah> to set the DPI for xpra.

<!-- gh-comment-id:407251688 --> @chiraag-nataraj commented on GitHub (Jul 24, 2018): You should be able to use `xpra-extra-params --dpi <blah>` to set the DPI for xpra.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#685
No description provided.