LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 07-03-2004, 03:16 AM   #1
everest
Member
 
Registered: Aug 2003
Posts: 44

Rep: Reputation: 15
How do I change color depth setting from root login?


I have installed Debian Woody 3.0 and during the install I entered 24 for the colour depth of the monitor. Now when I type startx at the login I am informed that the driver won't support 24 and it won't go to GUI as a consequence, so I need to change depth to 16. During the install it was stated that if I wanted to change keyboard settings I could do so by using the command dpkg-reconfigure console-data, but there was no similar command given for changing monitor settings. Is there a similar command I can use?

Also, in a previous install attempt when I typed startx I was informed that settings were probably wrong and a little graphical program came on the screen that enabled me to change settings for monitor, mouse, keyboard - but I can't remember the name of the program and since it doesn't come up this time I can't try it out. Would that program enable me to change depth to 16, and if so, how do I get it onto the screen from the login?

And lastly, on Google I found "you can change the monitor resolution by hand" using the command /etc/X11/XF86Config. Would that enable me to change the depth to 16? (I can't test it out at the moment because in order to go on the internet I had to disconnect the hard drive with Debian on it and connect the hard drive with Windows on it, and when I find an answer to the problem I will switch hard drives again!).
 
Old 07-03-2004, 04:41 AM   #2
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
You can boot and login as root and change that file. Yes, you must be the superuser
(root) to edit that file. This is from a Slackware system, but you'll see something like this:
Code:
# If your card can handle it, a higher default color depth (like 24 or 32)
# is highly recommended.

#   DefaultDepth 8
#   DefaultDepth 16
   DefaultDepth 24
#   DefaultDepth 32
and then comment out (put # in front of the line) DefaultDepth 24
and uncomment (remove the # from the front of the line) DefaultDepth16

Then save the file, and then logout as root, then login as user and issue "startx"
and you should be good to go.

I used to run Debian, but am not sure if that file you need is
/etc/X11/XF86Config
or
/etc/X11/XF86Config-4
but at any rate, you'll find it under /etc/X11/

One of them Debian fellers will probably post soon, anyway...

Edit: are you sure it's the default color depth and not the refresh rate that's the problem?
And, is there some reason you can't have both hard drives attached and dual boot?

Last edited by Bruce Hill; 07-03-2004 at 04:44 AM.
 
Old 07-03-2004, 05:43 AM   #3
sterrenkijker
Member
 
Registered: Mar 2004
Location: the Netherlands
Distribution: Debian Sarge
Posts: 302

Rep: Reputation: 30
The file in Debian is /etc/X11/XF86Config-4. The option must be in the section Screen. If it isn't there you can add it. My section looks like this.

# **********************************************************************

# Any number of screen sections may be present. Each describes
# the configuration of a single screen. A single specific screen section
# may be specified from the X server command line with the "-screen"
# option.
Section "Screen"
Identifier "Screen 1"
Device "RIVA TNT2"
Monitor "My Monitor"
DefaultDepth 24

Subsection "Display"
Depth 8
Modes "1024x768" "800x600" "640x480"
ViewPort 0 0
EndSubsection
Subsection "Display"
Depth 16
Modes "1024x768" "800x600" "640x480"
ViewPort 0 0
 
Old 07-03-2004, 07:12 AM   #4
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
One way to change X settings in Debian is to first use "su" command to become "Super User" and then use "dpkg-reconfigure xserver-xfree86" command.
 
Old 07-03-2004, 08:29 AM   #5
macondo
Senior Member
 
Registered: Jul 2003
Location: Panama
Distribution: Debian Sid
Posts: 1,014

Rep: Reputation: 49
dpkg-reconfigure console-data only configures the keyboard.

for the monitor color depth, mouse, video card, etc, as root:

dpkg-reconfigure xserver-xfree86
 
Old 07-03-2004, 02:57 PM   #6
everest
Member
 
Registered: Aug 2003
Posts: 44

Original Poster
Rep: Reputation: 15
How do I change color depth setting from root login?

Thanks Chinaman, Sterrenkijker, Dead Parrot, and Macondo for your replies. I will check out your advice and report back.

Chinaman asks “are you sure it's the default color depth and not the refresh rate that's the problem?
And, is there some reason you can't have both hard drives attached and dual boot?” You could be right about the refresh rate - I’ll change the depth setting and see if I get another error message. Dual booting - that’s one of my next challenges - I found a good LinuxQuestions forum thread on dual booting called “Installing Win98 on slave drive to pre-existing linux install on primary” started by Eliszka, with advise on how to dual boot which I will study and hopefully successfully implement.

For now though it’s disconnect my Windows drive and connect the Debian drive and put your advice into practice!
 
Old 07-03-2004, 10:07 PM   #7
everest
Member
 
Registered: Aug 2003
Posts: 44

Original Poster
Rep: Reputation: 15
Update

Update. I logged in as root user and typed in /etc/X11/XF86Config-4, but I was told permission was denied so I wasn’t able to follow that route. Why permission was denied I have no idea.

So I typed dpkg-reconfigure xserver-xfree86 and that did work - options were presented for changing keyboard, mouse and monitor settings. I duly changed colour depth from 24 to 16. Now when I type startx I go to one of the graphical interfaces. It is quite a clear picture but there is one major problem. The picture is much too large for the screen - about two or three times too large. It needs squashing down to fit on the screen. No amount of adjusting using dpkg has fixed this problem. I tried using a setting of 800x600 rather than 640x480 but it won’t accept that - it will only accept the lower figure.

Any suggestions as to what to do about this? New driver? New video card perhaps? My video card was probably made several years ago.

Is there a way to change settings such as colour depth and resolution from the graphical interface? I searched in the menus but couldn't find anything.
 
Old 07-03-2004, 10:56 PM   #8
mritch
Member
 
Registered: Nov 2003
Location: austria
Distribution: debian
Posts: 667

Rep: Reputation: 30
you have to use an editor for changing the /etc/X11/Xf86Config-4 file. there may be a few already on your system. nano, vim, emacs, joe,.. just a few. get familiar with one. call the editor followed by the filename to edit files.
if your screen is so totally wrong it could be possible that your settings for the monitor are wrong in the config file. it's section monitor and "HorizSync " and "VertRefresh" are the important values. try to find these values in the manual to your monitor or search the net for that model.
in X you can try to use the program "xvidtune" to adjust some settings. this program is also able to print out the modeline you can then add to your XF86Config-4 so you start up X with the right settings.

documentation for various programs are under /usr/share/doc. there you can find further information ( ..doc/xfree86-common/ as example for X).

sl mritch.
 
Old 07-04-2004, 03:28 PM   #9
macondo
Senior Member
 
Registered: Jul 2003
Location: Panama
Distribution: Debian Sid
Posts: 1,014

Rep: Reputation: 49
ctrl+alt+
press the keys ctrl, alt at the same time and press the + key in the numbers pad to the right of the keyboard to increase the resolution. till it's the correct size.
 
Old 07-05-2004, 04:36 AM   #10
everest
Member
 
Registered: Aug 2003
Posts: 44

Original Poster
Rep: Reputation: 15
Thanks Mritch - I will test your suggestions out in a little while. Meanwhile -
Macondo - I tried your suggestion - yes it worked - reduced the picture to correct size or thereabouts. But there is another problem - when I use startx to go to gui, it seems to be putting up two windows at once, kdm is on top and I am not sure what is underneath it - xdm perhaps, but it's a very unstable situation - when I move the mouse about it deletes patches of the kdm window so I can see patches of the underlying window. And the mouse pointer - it's reluctant to go where I want it to - it takes every opportunity to jump into the bottom left hand corner of the screen where it triggers a lot of unwanted activity. All in all a bit weird. And another thing - the top approx quarter of the screen is often patterned rather than having kdm on it - suggests to me the possibility that the video card doesn't have enough memory to hold the entire picture? (I know nothing about this - just a guess). The only number on the video card that might indicate the size of its memory is 005 AG5. My local computer shop has second hand 10 Mb cards - worth a try do you think? Or maybe even more Mb needed perhaps? (My monitor is about 14 inch. With Windows95 I run it at 800 by 600 and 24 bit true colour but it will run on 480 by 640 and 16 bit.)
Any suggestions?

Signed: "almost there" Everest
 
Old 07-05-2004, 05:31 AM   #11
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
Using the correct horizontal and vertical monitor refresh rates (HSync & VertRefresh) is very important in X configuration. You need to get them right if you want X to behave nicely. If you don't know the right refresh rates, try to find out what refresh rates Windows uses or do a google search.

Also it is possible that your mouse is not configured properly. Install the "mdetect" package and then run "dpkg-reconfigure xserver-xfree86" again. Now you should be given the option to let mdetect auto-configure your mouse.
 
Old 07-05-2004, 11:53 AM   #12
macondo
Senior Member
 
Registered: Jul 2003
Location: Panama
Distribution: Debian Sid
Posts: 1,014

Rep: Reputation: 49
"when I use startx to go to gui, it seems to be putting up two windows at once, kdm is on top and I am not sure what is underneath it - xdm perhaps, but it's a very unstable situation"

if you want kdm, try this:

dpkg-reconfigure kdm

and choose it as your default 'display manager'
*****************

"suggests to me the possibility that the video card doesn't have enough memory to hold the entire picture? (I know nothing about this - just a guess). The only number on the video card that might in..."

I use an STB Riva128 with 4 Mb RAM, it works with a 15 depth color, perfect color. In additon to 'mdetect' as DeadParrot mentioned, install: discover and read-edid (for the monitor) and dpkg-reconfigure xserver-xfree86.

From the startx console do a 'su', become root:

#apt-get install mdetect discover read-edid
#dpkg-reconfigure xserver-xfree86
***************************

Basically, your problem is one of bad installation for lack of knowledge on how to configure X. Do yourself a favor and read this:

The Very Verbose Debian 3.0 Installation Walkthrough
http://osnews.com/story.php?news_id=2016

Read sections 9 and 10 - Installing XFree86

Later on, read the whole article and weep when you realize
how easy it is to install Debian.
 
Old 07-07-2004, 04:20 PM   #13
everest
Member
 
Registered: Aug 2003
Posts: 44

Original Poster
Rep: Reputation: 15
Thanks Dead Parrot and Macondo. I followed your advice about installing hardware detection programs and now Debian automatically detects the video card but says it can't find the relevant module (presumably the one with the relevant driver in it), so I am going to try an install in a different computer box with a different card in it and a different monitor attached, following the instructions in The Very Verbose Debian 3.0 Installation Walkthrough. And I simply must do some reading about Linux so I can learn about such things as the structure of commands and what some of the most useful commands are.
 
  


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
Unable To Change Color Depth linuxadickt Linux - Software 4 05-15-2005 09:51 PM
How can I change the screen color depth in X? Xavius Linux - General 1 01-03-2005 10:48 AM
change color depth in fedora core 2 paperdiesel Linux - Software 1 07-06-2004 10:42 AM
Radeon 7000 RV100 QY unable to change color depth tarheel92x Linux - Hardware 3 10-15-2003 08:01 AM
Setting Color Depth on Suse 8.2 under VMWare maldiv Linux - Software 0 07-23-2003 10:13 AM


All times are GMT -5. The time now is 04:38 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