Tuesday, March 18, 2008

Mode not supported, apt-get, wget through proxy

OS: Debian etch(stable)/lenny(testing), Kernel 2.6.21-1-486 on HCL PIV machine with LCD monitor (15'')


Some times we see a floating window of "Mode not Supported" error on the screen giving some values in Hz, that means your xorg (xfree86 in earlier debian version till 2.4.x kernel) is not configured properly for the kind of hardware on which OS is residing. Here is some workaround for the same (it worked for me, might work for others as well);

"Mode not Supported", "No GUI" Fix:

Step 1:

Install `xdebconfigurator` tool which would diagnose the hardware specification with default values. In my case I had o/p like this;


Detected Xorg server
/usr/sbin/kudzu NOT found!
/usr/sbin/detect NOT found!
VIDEO CARD: Xdebconfigurator Card
VIDEO CARD DEVICE:
VIDEO CARD VENDOR:
VIDEO DRIVER: ati
VIDEO DRIVER SRC: discover
VIDEO MEMORY:
POSSIBLE XSERVER: xorg
XSERVER 3:
XSERVER 4: xfree86
DEBIAN PACKAGE: xserver-xorg
MOUSE DEVICE SRC: hwinfo
MOUSE DEVICE: /dev/input/mice
MOUSE PROTOCOL: ImPS/2
MOUSE WHEEL: 1
KEYBOARD RULES: xorg
MONITOR: Xdebconfigurator Monitor
MONITOR ID:
SUGGESTED METHOD: Simple
MONITOR SIZE: 15 inches (380 mm)
MONITOR HOR SYNC: 28-50
MONITOR VER REFR: 43-75
MONITOR MODES: 1400x1050, 1024x768, 800x600, 640x350, 640x480, 640x400, 512x384, 400x300, 320x240, 320x200
MONITOR MODE: 1024x768 @ 70Hz
MONITOR MODE SRC: default
MONITOR DEFAULT DEPTH: 16

Step 2:

wherein default monitor mode was 1024x768 @ 70Hz with 16 as a default depth value. Unfortunately while installation (even with Live CD) these default values couldn't get reflected into /etc/X11/xorg.conf file so the quite obvious error was "Mode not Supported". The required modifications are done in the xorg.conf using `dpkg-reconfigure -phigh xserver-xorg` command.


Step 3:

After restart we could see the GUI desktop (gnome2) !

Hushhh... what a relief, finally it worked after slogging for it! :-)




But still, there was yet other issue, apt-get & wget through proxy & here's it's work around as well!


"apt-get & wget through proxy" Fix:


proxy setup for "apt-get":

Add following entry in /etc/apt/apt.conf (it it's not there, create it)

(only for restricted users)

Acquire::http::Proxy "http://Workdomain\loginname:password@the.proxy.ip.addr:proxy-port-number";

OR

(for all)

Acquire::http::Proxy "http://the.proxy.ip.addr:proxy-port-number/";


OR

other option (for all)

ACQUIRE {
http::proxy "http://the.proxy.ip.addr:port-number/";
}

Now as a root do `apt-get update` to test it.



proxy setup for "wget" :

In /etc/wgetrc we'll find following code snippet (commented)

# You can set the default proxies for Wget to use for http and ftp.
# They will override the value in the environment.
#http_proxy = http://proxy.yoyodyne.com:18023/
#ftp_proxy = http://proxy.yoyodyne.com:18023/

# If you do not want to use proxy at all, set this to off.
#use_proxy = on


[if you can't find it there by default you can add it there]

Now uncomment and modify related statements as per the need, like;

http_proxy = http://the.proxy.ip.addr:proxy-port-number/
ftp_proxy = http://the.proxy.ip.addr:proxy-port-number/
use_proxy = on


Now add following lines in ~/.bashrc

export http_proxy = http://the.proxy.ip.addr:proxy-port-number/
export ftp_proxy = http://the.proxy.ip.addr:proxy-port-number/

save file, execute `.bashrc` or restart a computer and check whether wget works or not.


Happy Hacking !!