LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-14-2006, 08:14 PM   #1
arobinson74
Member
 
Registered: Nov 2002
Location: Lone Tree, CO
Distribution: Xubuntu Gutsy
Posts: 174

Rep: Reputation: 30
How to stop DPI from changing on resolution change


I am running slackware inside of a virtual machine (vmware workstation 5.5) and running xfce on X. My home monitor is a 20" LCD at 1600x1200. I have set my DisplaySize in my xorg.conf to end up with 96 dpi with these settings. The problem occurs when changing resolutions.

Sometimes, I want to use my VM in a smaller window:
when running from x11vnc my laptop is 1400x1050
when on windows and linux at the same time, I like to run around 1280x1024 to be able to see both well

The problem is that when I change my resolution while X is running using "xrandr" or the display applet in xfce, the DPI changes to try to reflect my monitor size. I don't want this, I want the DPI to ALWAYS be 96 regardless of the resolution. That way on my laptop over vncviewer and when shrinking my vmware application window, my fonts will be readable (right now, if I set the resolution to 1400x1050 for example on my laptop the fonts are too small).

Is there any way to permanently fix the DPI and stop the font scaling by screen dimensions?
 
Old 01-15-2006, 11:57 PM   #2
arobinson74
Member
 
Registered: Nov 2002
Location: Lone Tree, CO
Distribution: Xubuntu Gutsy
Posts: 174

Original Poster
Rep: Reputation: 30
Just some more information. I started X (defaults to 1600x1200), then changed my resolution to 1152x864:
Code:
xdpyinfo | grep "resolution"
  resolution:    69x69 dots per inch
xdpyinfo | grep "dimensions"
  dimensions:    1152x864
Section from xorg.conf:
Code:
Section "Monitor"
    Identifier "vmware"
    VendorName "VMware, Inc"
    HorizSync 1-10000
    VertRefresh 1-10000
    #DisplaySize 542 406
    DisplaySize 474 356
EndSection
The display size seems to be ignored, as it should be 96 dpi at the given display size and resolution from what I saw on other posts, but it is 69 at this resolution and 1600 was still 96.

Any help appreciated
 
Old 04-29-2006, 02:29 PM   #3
ibex
Member
 
Registered: Apr 2006
Distribution: SUSE-10.1-32bit
Posts: 123

Rep: Reputation: 15
Hi man,

have you found any solution to this problem?
I am having exactly the same issues with my dpi
and VNC viewer. I would like to fix that at 96dpi.

Your advice much appreciated
 
Old 04-29-2006, 04:41 PM   #4
arobinson74
Member
 
Registered: Nov 2002
Location: Lone Tree, CO
Distribution: Xubuntu Gutsy
Posts: 174

Original Poster
Rep: Reputation: 30
Yes I did:

You must set the DPI explicitly in your window manager. I am using XFCE, so I looked at the .xinitrc file in my user directory and saw that it was pulling settings from "$HOME/.config/xfce" as the 'BASEDIR' and font information from "$BASEDIR/Xft.xrdb"

So I modified the ~/.config/xfce/Xft.xrdb. I now have the following:
Xft.antialias: 1
Xft.hinting: 1
Xft.hintstyle: hintfull
Xft.rgba: rgb
Xft.dpi: 96

The key is the last line. This tells XFCE to always use 96 DPI. Now whatever resolution I use, 96 DPI will always be used.
 
Old 04-30-2006, 04:24 AM   #5
ibex
Member
 
Registered: Apr 2006
Distribution: SUSE-10.1-32bit
Posts: 123

Rep: Reputation: 15
That's a big success for you then.
Well done.

In my case, I use SUSE.10.1.beta9
with KDE and I cannot locate any files
and directories like the ones you mention.
There should be something similar though.

All the best
 
Old 04-30-2006, 05:27 AM   #6
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
If you have an nvidia card you can put this in driver section:

Code:
Option   "UseEdidDpi"   "FALSE"
Option   "DPI"   "96 x 96"
 
Old 08-03-2006, 12:40 AM   #7
DrCR
LQ Newbie
 
Registered: Aug 2006
Distribution: Slackware14, VectorLinux5.9SOHO
Posts: 21

Rep: Reputation: 0
Quote:
Originally Posted by ibex
That's a big success for you then.
Well done.

In my case, I use SUSE.10.1.beta9
with KDE and I cannot locate any files
and directories like the ones you mention.
There should be something similar though.
Check out this link for SuSE help.
Optimal Use of MS TrueType Core Fonts for a KDE Desktop on SuSE
en.opensuse . org/Optimal_Use_of_Fonts_on_SuSE

FYI it was founded on this link:
Optimal Use of Fonts on Linux
avi.alkalay . net/linux/docs/font-howto/Font.html

Sorry about the goofy links...the forum software settings are preventing from linking them properly.


Quote:
Originally Posted by dive
If you have an nvidia card you can put this in driver section:

Code:
Option   "UseEdidDpi"   "FALSE"
Option   "DPI"   "96 x 96"
Worked like a charm for me. Thanks! In my case I just wanted to get back to the 81x81 VectorLinux setting I had before Nvidia driver 1.0-8762 changed it to 75x75.

Code:
Section "Device"

### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
### [arg]: arg optional
#Option     "ShadowFB"                  # [<bool>]
#Option     "DefaultRefresh"            # [<bool>]
    Identifier     "Card0"
    Driver         "nvidia"
    VendorName     "nVidia Corporation"
    BoardName      "Unknown Board"
    Option      "UseEditDpi"      "FALSE"
    Option      "DPI"     "85x85"
EndSection
DrCR

_____________
A8N5X, 3500+ VeniceE4, 2z512MB Corsair XMS, MSI NX7600GT-VT2D256E

Last edited by DrCR; 08-03-2006 at 12:56 AM.
 
Old 10-21-2006, 06:38 PM   #8
noend
LQ Newbie
 
Registered: Sep 2005
Posts: 3

Rep: Reputation: 0
You can also avoid the use of the NVIDIA driver options by adding "-dpi 96" into the /etc/X11/xinit/xserverrc

My current xserverrc config is:

exec /usr/bin/X11/X -dpi 96 -nolisten tcp
 
Old 03-07-2007, 08:06 PM   #9
DrCR
LQ Newbie
 
Registered: Aug 2006
Distribution: Slackware14, VectorLinux5.9SOHO
Posts: 21

Rep: Reputation: 0
Quote:
Originally Posted by ibex
That's a big success for you then.
Well done.

In my case, I use SUSE.10.1.beta9
with KDE and I cannot locate any files
and directories like the ones you mention.
There should be something similar though.
Did you ever figure find it? I posted the Nvidia solution I'm using above, but I'd like to learn a non-Nvidia solution for then the need arises on a non-Nvidia vided rig.

Thanks,
DrCR

_____________

Last edited by DrCR; 03-07-2007 at 08:08 PM.
 
Old 03-15-2007, 05:22 AM   #10
pannet1
Member
 
Registered: May 2005
Location: India
Distribution: Fedora Core 7
Posts: 47

Rep: Reputation: 15
hai every one i am anable to change in XFree86 under lfs
 
  


Reply

Tags
dpi, kde, linux, settings, source



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing the dpi budhusa Linux - General 5 11-13-2006 01:27 PM
X Resolution - DPI shooters Linux - General 1 12-18-2005 11:14 PM
Changing screen resolution to 1024x768..refresh rate cannot change too stays 60hz Niceman2005 Linux - General 4 11-03-2005 10:00 AM
change X resolution to 91 dpi, system boots gdm justa_bassplayr Debian 5 12-07-2004 12:27 PM
Can I have more than 75 dpi screen resolution in Linux? J_Szucs Linux - Software 2 11-21-2001 03:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration