Ticket #203 (closed feature request: duplicate)

Opened 4 years ago

Last modified 3 years ago

Easy way to specify dpi

Reported by: Luc_j_Bourhis@… Owned by: jeremyhu@…
Priority: Nice to Have Milestone: 2.3.2
Component: xserver Version:
Keywords: Cc: luc_j_bourhis@…

Description

The following patch of startx would do

/usr/X11/bin> diff -u ~/Desktop/startx.orig startx --- startx.orig 2008-11-27 15:03:07.000000000 +0100 +++ startx 2008-11-28 00:08:11.000000000 +0100 @@ -109,6 +109,11 @@

defaultserverargs="$defaultserverargs -nolisten tcp"

fi

+user_defined_dpi=defaults read org.x.X11 dpi +if [ xperl -e "print $user_defined_dpi =~ /^\d+$/" = x1 ] ; then + defaultserverargs="$defaultserverargs -dpi $user_defined_dpi" +fi +

for ((d=0; ; d++)) ; do

-e /tmp/.X$d-lock ?
break

done

Change History

comment:1 Changed 4 years ago by Luc_j_Bourhis@…

/usr/X11/bin> diff -u ~/Desktop/startx.orig startx --- /Users/luc/Desktop/startx.orig 2008-11-27 15:03:07.000000000 +0100 +++ startx 2008-11-28 00:08:11.000000000 +0100 @@ -109,6 +109,11 @@

defaultserverargs="$defaultserverargs -nolisten tcp"

fi oops! sorry, the eol did not make it. Another try:

+user_defined_dpi=defaults read org.x.X11 dpi +if [ xperl -e "print $user_defined_dpi =~ /^\d+$/" = x1 ] ; then + defaultserverargs="$defaultserverargs -dpi $user_defined_dpi" +fi +

for ((d=0; ; d++)) ; do

-e /tmp/.X$d-lock ?
break

done

comment:2 Changed 4 years ago by Luc_j_Bourhis@…

Got it right this time! Sorry again…

/usr/X11/bin> diff -u ~/Desktop/startx.orig startx 
--- /Users/luc/Desktop/startx.orig	2008-11-27 15:03:07.000000000 +0100
+++ startx	2008-11-28 00:08:11.000000000 +0100
@@ -109,6 +109,11 @@
     defaultserverargs="$defaultserverargs -nolisten tcp"
 fi
 
+user_defined_dpi=`defaults read org.x.X11 dpi`
+if [ x`perl -e "print $user_defined_dpi =~ /^\d+$/"` = x1 ] ; then
+    defaultserverargs="$defaultserverargs -dpi $user_defined_dpi"
+fi
+
 for ((d=0; ; d++)) ; do
     [[ -e /tmp/.X$d-lock ]] || break
 done

comment:3 Changed 4 years ago by jeremyhu@…

  • Status changed from new to closed
  • Resolution set to duplicate

Yeah, I'd rather not do that... I'd rather fix up the whole display issue to use the actual DPI from the display... so dupeing this since that's already an issue.

Note: See TracTickets for help on using tickets.