You are not logged in.

#1 2010-02-11 22:43:37

ih23
Member
Registered: 2010-02-11
Posts: 19

[SOLVED]Setting Display Resolution on WMs

I've figure out how to set up my 1360x768 screen resolution on GNOME (I configured xorg.conf) but I don't know how to configure the settings on twm, I've also tried OpenBox and fvwm2. X and the WM starts fine but in the wrong display size. Any help?

Last edited by ih23 (2010-02-12 20:11:42)

Offline

#2 2010-02-12 12:00:28

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: [SOLVED]Setting Display Resolution on WMs

Let's see your xorg.conf file.


Knute

Offline

#3 2010-02-12 13:34:48

bema
Member
Registered: 2010-02-12
Posts: 26

Re: [SOLVED]Setting Display Resolution on WMs

Try something like `xrandr --output DVI1 --mode 1660x768` for an output called DVI1 (depending on your system) or `xrandr --output DVI1 --auto` could work if that's your screen's native resolution.

Offline

#4 2010-02-12 14:04:02

jdarnold
Member
From: Medford MA USA
Registered: 2009-12-15
Posts: 485
Website

Re: [SOLVED]Setting Display Resolution on WMs

And what display card are you using? If nvidia, have you tried the nvidia-settings program?

Offline

#5 2010-02-12 14:14:28

Cyrusm
Member
From: Bozeman, MT
Registered: 2007-11-15
Posts: 1,053

Re: [SOLVED]Setting Display Resolution on WMs

plus one for xrandr, it's probably the handiest and most robust display utility out there.

you can figure out the name of your video card outputs and some other handy information with

xrandr -q

Hofstadter's Law:
           It always takes longer than you expect, even when you take into account Hofstadter's Law.

Offline

#6 2010-02-12 15:45:21

ih23
Member
Registered: 2010-02-11
Posts: 19

Re: [SOLVED]Setting Display Resolution on WMs

I tried "xrandr --output DVI1 --mode 1660x768" and "... --auto" and got back "warning: output DVI1 not found; ignoring".

I have an intel chipset for graphics. Here is my xorg.conf file:

Section "ServerLayout"
    Identifier     "X.org Configured"
    Screen      0  "Screen0" 0 0
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
    ModulePath   "/usr/lib/xorg/modules"
    FontPath     "/usr/share/fonts/misc"
    FontPath     "/usr/share/fonts/100dpi:unscaled"
    FontPath     "/usr/share/fonts/75dpi:unscaled"
    FontPath     "/usr/share/fonts/TTF"
    FontPath     "/usr/share/fonts/Type1"
EndSection

Section "Module"
    Load  "glx"
    Load  "dri2"
    Load  "extmod"
    Load  "dbe"
    Load  "dri"
EndSection

Section "InputDevice"
    Identifier  "Keyboard0"
    Driver      "kbd"
EndSection

Section "InputDevice"
    Identifier  "Mouse0"
    Driver      "mouse"
    Option        "Protocol" "auto"
    Option        "Device" "/dev/input/mice"
    Option        "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
    #DisplaySize      400   250    # mm
    Identifier   "Monitor0"
    VendorName   "ACR"
    ModelName    "Acer X183H"
    HorizSync    30.0 - 83.0
    VertRefresh  55.0 - 75.0
    Option      "DPMS"
    Modeline  "1360x768_60.00"  84.72  1360 1424 1568 1776  768 769 772 795  -HSync +Vsync
EndSection

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     "NoAccel"                # [<bool>]
        #Option     "SWcursor"               # [<bool>]
        #Option     "ColorKey"               # <i>
        #Option     "CacheLines"             # <i>
        #Option     "Dac6Bit"                # [<bool>]
        #Option     "DRI"                    # [<bool>]
        #Option     "NoDDC"                  # [<bool>]
        #Option     "ShowCache"              # [<bool>]
        #Option     "XvMCSurfaces"           # <i>
        #Option     "PageFlip"               # [<bool>]
    Identifier  "Card0"
    Driver      "intel"
    VendorName  "Intel Corporation"
    BoardName   "82810E DC-133 (CGC) Chipset Graphics Controller"
    BusID       "PCI:0:1:0"
EndSection

Section "Screen"
    Identifier "Screen0"
    Device     "Card0"
    Monitor    "Monitor0"
    SubSection "Display"
        Viewport   0 0
        Depth     24
        Modes    "1360x768" "1280x1024" "1024x768" "800x600" "640x480"
    EndSubSection
EndSection

Offline

#7 2010-02-12 16:04:45

ih23
Member
Registered: 2010-02-11
Posts: 19

Re: [SOLVED]Setting Display Resolution on WMs

Output for "xrandr -q" is:

Screen 0: minimum 640 x 400, current 1360 x 768, maximum 1400 x 1050
default connected 1360x768+0+0 0mm x 0mm
   1400x1050      60.0  
   1280x1024      75.0     60.0  
   1280x960       60.0  
   1366x768       60.0  
   1360x768       60.0* 
   1152x864       75.0  
   1024x768       75.0     72.0     70.0     60.0  
   832x624        75.0  
   800x600        75.0     72.0     60.0     56.0  
   640x480        75.0     73.0     67.0     60.0  
   720x400        70.0

Is there a file I could edit in twm so that I can set the correct screen resolution?

Last edited by ih23 (2010-02-12 16:06:15)

Offline

#8 2010-02-12 17:03:13

bema
Member
Registered: 2010-02-12
Posts: 26

Re: [SOLVED]Setting Display Resolution on WMs

ih23 wrote:

I tried "xrandr --output DVI1 --mode 1660x768" and "... --auto" and got back "warning: output DVI1 not found; ignoring".

The name of the output may be different for your system, but I do not understand why it does not show up for `xrandr -q`.


According to that page http://www.xfree86.org/current/twm.1.html, ~/.twmrc is some kind of startup file which you can use to set the resolution.

Offline

#9 2010-02-12 17:11:33

jorpheus
Member
Registered: 2008-11-07
Posts: 98

Re: [SOLVED]Setting Display Resolution on WMs

ih23 wrote:

Output for "xrandr -q" is:

Screen 0: minimum 640 x 400, current 1360 x 768, maximum 1400 x 1050
default connected 1360x768+0+0 0mm x 0mm
   1400x1050      60.0  
   1280x1024      75.0     60.0  
   1280x960       60.0  
   1366x768       60.0  
   1360x768       60.0* 
   1152x864       75.0  
   1024x768       75.0     72.0     70.0     60.0  
   832x624        75.0  
   800x600        75.0     72.0     60.0     56.0  
   640x480        75.0     73.0     67.0     60.0  
   720x400        70.0

Is there a file I could edit in twm so that I can set the correct screen resolution?

The resolution you want is higher than the max stated here - therefore, problems. Perhaps try X without xorg.conf (HAL autoconfigure)?

Offline

#10 2010-02-12 17:19:08

ih23
Member
Registered: 2010-02-11
Posts: 19

Re: [SOLVED]Setting Display Resolution on WMs

Oops, I meant 1360x768 not 1660x768.

Last edited by ih23 (2010-02-12 17:19:19)

Offline

#11 2010-02-12 17:22:05

jorpheus
Member
Registered: 2008-11-07
Posts: 98

Re: [SOLVED]Setting Display Resolution on WMs

ih23 wrote:

Oops, I meant 1360x768 not 1660x768.

Silly you tongue

Do:

xrandr -s 1360x768

Offline

#12 2010-02-12 17:42:52

ih23
Member
Registered: 2010-02-11
Posts: 19

Re: [SOLVED]Setting Display Resolution on WMs

I'm on twm right now and "xrandr -s 1360x768' worked! However, I have to enter it after I begin "startx". I'm reviewing the twn man page right now and don't see any section for entering screen resolutions in the .twmrc file. Is there a way to define the setting so when I begin "startx" I don't have to manually set it with "xrandr"?

Offline

#13 2010-02-12 18:03:52

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: [SOLVED]Setting Display Resolution on WMs

You could try putting the xrandr command in your .xinitrc file.

Offline

#14 2010-02-12 18:18:41

ih23
Member
Registered: 2010-02-11
Posts: 19

Re: [SOLVED]Setting Display Resolution on WMs

anonymous_user wrote:

You could try putting the xrandr command in your .xinitrc file.

How should I write the command in the file?

Last edited by ih23 (2010-02-12 18:19:25)

Offline

#15 2010-02-12 18:27:45

hatten
Arch Linux f@h Team Member
From: Sweden, Borlange
Registered: 2009-02-23
Posts: 736

Re: [SOLVED]Setting Display Resolution on WMs

Just put the line before the 'exec whatever' line.

Offline

#16 2010-02-12 18:34:56

kamiheku
Member
Registered: 2009-05-11
Posts: 42

Re: [SOLVED]Setting Display Resolution on WMs

Oh, and don't forget the "&" in the end of the line.

xrandr -s 1360x768 &

"Click clack, clicketyclacketyclick!"
-- IBM Model M

Offline

#17 2010-02-12 18:42:07

hatten
Arch Linux f@h Team Member
From: Sweden, Borlange
Registered: 2009-02-23
Posts: 736

Re: [SOLVED]Setting Display Resolution on WMs

When looking at my .xinitrc i don't have &'s at the end of the lines containing them, what do one need them for?

Offline

#18 2010-02-12 18:48:16

ih23
Member
Registered: 2010-02-11
Posts: 19

Re: [SOLVED]Setting Display Resolution on WMs

Finally smile Thanks for your help guys. I entered the "xrandr" command in my .xinitrc file:

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then

    xrdb -merge $sysresources

fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then

    xrdb -merge "$userresources"

fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

twm &
xrandr -s 1360x768 &
xclock -geometry 50x50-1+1 &
xterm -geometry 80x50+494+51 &
xterm -geometry 80x20+494-0 &
exec xterm -geometry 80x66+0+0 -name login

I copied xinitrc from /etc/X11/xinit/xinitrc to my home directory and just added the "xrandr" line. I also tried replacing "twm &" with other WMs and it worked, I tried openbox, fvwm2, and fluxbox. It opens up all the other little programs too but I'm sure I could just edit that. Again, thanks.

Last edited by ih23 (2010-02-12 18:59:56)

Offline

#19 2010-02-12 18:59:29

ih23
Member
Registered: 2010-02-11
Posts: 19

Re: [SOLVED]Setting Display Resolution on WMs

Well I deleted the beginning lines from my .xinitrc file up to" twm &" and it works fine.

Another question, does twm always have to start with "exec xterm -geometry 80x66+0+0 -name login"? I tried startx without it and it does not work. Is the login xterm always needed in twm?

Offline

#20 2010-02-12 19:08:09

ih23
Member
Registered: 2010-02-11
Posts: 19

Re: [SOLVED]Setting Display Resolution on WMs

Forget the last question, I just figured it out. I basically have my .xinitrc as:

xrandr -s 1360x768 &
exec twm

Which is what I wanted. It works just fine now. SOLVED. big_smile

Offline

#21 2010-02-12 19:24:53

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: [SOLVED]Setting Display Resolution on WMs

^ remember to edit your first post and put [SOLVED] in the title.

Offline

#22 2010-02-12 21:24:02

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: [SOLVED]Setting Display Resolution on WMs

Another suggestion that you can try if you want, is to try commenting out the mode line in the Monitor section of your xorg.conf file.

In order to do that just put the # sign in front of it, and restart X.   It's just a suggestion, because I don't use the mode lines, and don't have any problems.   And if the mode lines are off by even one number.... yikes

But, I'm glad that you found a solution anyway.


Knute

Offline

Board footer

Powered by FluxBB