LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 01-01-2009, 01:08 PM   #1
JosephS
Member
 
Registered: Jun 2007
Distribution: Debian Squeeze, CrunchBang Waldorf
Posts: 516

Rep: Reputation: 38
Want to set dpi


I'm trying to set the dpi to 96.
screen size 1280 x 1024
Using 19" CRT monitor
Using Slackware 12.2

This is what I started with
bash-3.1$ xdpyinfo | grep resolution
resolution: 90x96 dots per inch

I started X with
startx -- -dpi 96
and I got the following resolution:
xdpyinfo | grep resolution:
resolution: 77x82 dots per inch

Shouldn't it set the resolution to 96 x96?

Thanks.
 
Old 01-01-2009, 02:19 PM   #2
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,410

Rep: Reputation: 1122Reputation: 1122Reputation: 1122Reputation: 1122Reputation: 1122Reputation: 1122Reputation: 1122Reputation: 1122Reputation: 1122
Well, it somehow depends on the driver you've set up in /etc/X11/xorg.conf beeing or not able to display 1280x1024 for your graphic card.

So, could you please tell us:
1) What is you graphic card. An extract of the relevant line in the output of "lspci -v", typed as root, will help.
2) Which driver do you use when under X. It's indicated in the "Graphics device section" of /etc/X11/xorg.conf

Last edited by Didier Spaier; 01-01-2009 at 02:21 PM. Reason: Typo
 
Old 01-01-2009, 02:42 PM   #3
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,014

Rep: Reputation: 146Reputation: 146
Quote:
Originally Posted by JosephS View Post
I'm trying to set the dpi to 96.
screen size 1280 x 1024
Using 19" CRT monitor
Using Slackware 12.2

This is what I started with
bash-3.1$ xdpyinfo | grep resolution
resolution: 90x96 dots per inch

I started X with
startx -- -dpi 96
and I got the following resolution:
xdpyinfo | grep resolution:
resolution: 77x82 dots per inch

Shouldn't it set the resolution to 96 x96?

Thanks.
Strange. But I usually set the resolution in "xorg.conf" in the Monitor section using the DisplaySize entry. See man xorg.conf.
 
Old 01-01-2009, 04:27 PM   #4
todders
Member
 
Registered: Nov 2006
Location: watford
Distribution: Slackware 13 64Bit Multi-Lib KDE4.2.4
Posts: 83

Rep: Reputation: 18
something like DisplaySize 339 271 in your xorg.conf under the monitor section should do the trick,there a few ways of achieving the dpi but like Didier Spaier stated we need exact details of graphics card and driver used in x.
 
Old 01-01-2009, 10:40 PM   #5
chess
Member
 
Registered: Mar 2002
Location: 127.0.0.1
Distribution: Slackware, OpenBSD, FreeBSD
Posts: 728

Rep: Reputation: 168Reputation: 168
http://www.linuxquestions.org/questi...s-in-x-462034/
 
Old 01-01-2009, 11:39 PM   #6
JosephS
Member
 
Registered: Jun 2007
Distribution: Debian Squeeze, CrunchBang Waldorf
Posts: 516

Original Poster
Rep: Reputation: 38
graphics card:
lspci -v
Quote:
01:00.0 VGA compatible controller: nVidia Corporation NV6 [Vanta/Vanta LT] (rev 15) (prog-if 00 [VGA controller])
Subsystem: nVidia Corporation Unknown device 0072
Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 11
Memory at fd000000 (32-bit, non-prefetchable) [size=16M]
Memory at f6000000 (32-bit, prefetchable) [size=32M]
[virtual] Expansion ROM at f5e00000 [disabled] [size=64K]
Capabilities: [60] Power Management version 1
Capabilities: [44] AGP version 2.0
Kernel modules: nvidiafb, rivafb
Driver:
/etc/X11/xorg.conf
Quote:
Section "Device"
Identifier "Card0"
Driver "nv"
VendorName "nVidia Corporation"
BoardName "NV6 [Vanta/Vanta LT]"
BusID "PCI:1:0:0"
EndSection
When choosing screen size (eg 1280 x 1024 etc.) or dpi does it matter what the size of monitor is?



Thanks.
 
Old 01-02-2009, 03:49 AM   #7
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,410

Rep: Reputation: 1122Reputation: 1122Reputation: 1122Reputation: 1122Reputation: 1122Reputation: 1122Reputation: 1122Reputation: 1122Reputation: 1122
My I suggest you use the drivers provided by Nvidia. To do that you can either :
- get it directly from their website. Follow their instuctions.
- or make yourself Slackware packages, using the slackbuils provided @ http://slackbuilds.org/ which can be considered "cleaner". If you prefer doing so, remember to take the SlackBuilds for your Slackware version and don't take the legacy ones. Again, follow instructions on the website.

Either way, once installed you'll be able to tune everything using their nvdidia-<something> utilities.
 
Old 01-02-2009, 03:56 AM   #8
SqdnGuns
Member
 
Registered: Aug 2005
Location: Fountain Valley, CA / Thailand
Distribution: Slackware64 14.0
Posts: 981

Rep: Reputation: 88
Quote:
Originally Posted by Didier Spaier View Post
- or make yourself Slackware packages, using the slackbuils provided @ http://slackbuilds.org/ which can be considered "cleaner". If you prefer doing so, remember to take the SlackBuilds for your Slackware version and don't take the legacy ones. Again, follow instructions on the website.
FYI............if you happen to be using the latest 2.6.28 kernel, the SlackBuild for the kernel will not work. I have reported it already and it is in queue to be updated.
 
Old 01-02-2009, 04:17 AM   #9
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,410

Rep: Reputation: 1122Reputation: 1122Reputation: 1122Reputation: 1122Reputation: 1122Reputation: 1122Reputation: 1122Reputation: 1122Reputation: 1122
Quote:
Originally Posted by SqdnGuns View Post
FYI............if you happen to be using the latest 2.6.28 kernel, the SlackBuild for the kernel will not work. I have reported it already and it is in queue to be updated.
SlackBuilds available @ slackbuilds.org are provided for stable releases (not for -current) and for the kernels provided with it.

They *can* work if theses conditions are not met, but there is no guarantee.

Last edited by Didier Spaier; 01-02-2009 at 05:13 AM. Reason: Typo
 
Old 01-02-2009, 05:02 AM   #10
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,014

Rep: Reputation: 146Reputation: 146
Quote:
Originally Posted by JosephS View Post
When choosing screen size (eg 1280 x 1024 etc.) or dpi does it matter what the size of monitor is?
See posts #3 and #4 in this thread.
 
Old 01-02-2009, 08:23 AM   #11
Franklin
Senior Member
 
Registered: Oct 2002
Distribution: Slackware, WinXP, Windows 7
Posts: 1,253

Rep: Reputation: 55
If you want to use the startx script to set dpi you should edit the script directly.

Open /usr/bin/startx as root and edit the file as follows:

Code:
#!/bin/sh

# $Xorg: startx.cpp,v 1.3 2000/08/17 19:54:29 cpqbld Exp $
#
# This is just a sample implementation of a slightly less primitive
# interface than xinit.  It looks for user .xinitrc and .xserverrc
# files, then system xinitrc and xserverrc files, else lets xinit choose
# its default.  The system xinitrc should probably do things like check
# for .Xresources files and merge them in, startup up a window manager,
# and pop a clock and serveral xterms.
#
# Site administrators are STRONGLY urged to write nicer versions.
#
# $XFree86: xc/programs/xinit/startx.cpp,v 3.16tsi Exp $


userclientrc=$HOME/.xinitrc
sysclientrc=/usr/lib/X11/xinit/xinitrc


userserverrc=$HOME/.xserverrc
sysserverrc=/usr/lib/X11/xinit/xserverrc
defaultclient=xterm
defaultserver=/usr/bin/X
defaultclientargs=""
defaultserverargs="-dpi 108"            <<<< EDIT THIS LINE FOR DPI SETTING    
clientargs=""
serverargs=""

enable_xauth=1
The defaultserverargs line is where you enter the dpi setting. I use dpi 108 in this example.

HTH
 
Old 01-07-2009, 07:41 PM   #12
JosephS
Member
 
Registered: Jun 2007
Distribution: Debian Squeeze, CrunchBang Waldorf
Posts: 516

Original Poster
Rep: Reputation: 38
I had t use the /nvidia-legacy71-driver and kernel for my video card.

Iset the display size in the monitor section:
DisplaySize 339 271

Now I can get the following dpi:
Code:
bash-3.1$ xdpyinfo | grep resolution
resolution: 95x96 dots per inch

Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How do I set the DPI? JosephS Linux - Desktop 1 12-30-2008 09:48 PM
Wine DPI was set all the way up now can't get it down. Herr Wolf Linux - Software 3 05-02-2008 09:25 PM
Cannot figure out how to set DPI correctly!!! rngetter Ubuntu 3 03-09-2008 01:22 AM
The dpi parameter: where is it set? grautu Debian 1 01-10-2006 11:44 AM
Mandrake 9.1: How to set screen DPI? tredegar Linux - Newbie 3 10-08-2003 03:27 AM


All times are GMT -5. The time now is 07:17 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration