Archive for the ‘sudo’ Tag

Ubuntu 9.10, Resolution Issues

Ubuntu 9.10 (Karmic)
Kernel Linux 2.6.31-14-generic
Gnome: 2.28.1

I just installed Linux mint 7 on this machine and had resolution issues. I thought I’d try Ubuntu 9.10 on the same machine. Sadly, Ubuntu produced the same results. But, the fix was easier. Same Hardware. For more in depth details, check out my previous post on Mint 7.

MB: Epox: EP 8RDA3+ Pro
CPU: AMD Athlon XP 2400+ (2Ghz)
Ram: 1.5 Gig
Video Card: Nvidia GeForce 4 Ti 4200

I installed Ubuntu 9.10. At first boot, my best resolution option was 800×600. I’m using a 19″ CRT so I’m only looking for a resolution of 1024×768. I let Ubuntu install the restricted Nvidia driver. Reboot and I’m stuck with a resolution of 640×480. Nice. Display Preferences and the Nvidia X Server settings only gave me the 640×480 option. To fix this, I opened a terminal and ran:
$ sudo nvidia-xconfig
It complained a bit, but it modified my xorg.conf file.
I then opened my xorg.conf file via the terminal:
$ sudo gedit /etc/X11/xorg.conf
Everything seems to be there. I did change the HorizSync & VertRefresh rates because I’m using an old monitor and the default settings would throw my monitor “OUT OF RANGE”. That setting is in the “Monitor” section. It looks like this now:

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "CRT-0"
    HorizSync       30.0 - 68.0
    VertRefresh     50.0 - 85.0
    Option         "DPMS"
EndSection

The HorizSync was something like 30.0 – 110.0 and the VertRefresh was 50.0 – 150.0 . To much for this old monitor. I then rebooted the machine. It booted into a crazy resolution that was too high. I think it was 1280×1024. I could barely see it. But…. it worked. I opened Nvidia X Server settings via the menus. Made the change to 1024×768 and rebooted. No good. Still 1280×1024. I opened the Nvidia X Server settings via the command line with root privileges:
$ sudo nvidia-settings
Then made my changes to 1024×768. This time they stuck.
Now I’m happy with it. Next I installed the extras:
$ sudo apt-get install ubuntu-restricted-extras
Everything installed ok. Now I’m set.

Regarding the Nvidia X Server settings. After you “apply”, don’t forget to hit the “Save to X configuration file” button and merge it with the existing file. Done……almost.
I had to turn off desktop effects. The minimize, maximize and close buttons on the title bar of open applications disappeared with the effects on. Maybe it’s a bug, maybe it’s a feature. I usually turn it off anyway.

Advertisements

Linux Mint 7, Resolution Issues

Linux Mint 7 (Gloria)
Kernel Linux 2.6.28-11-generic
Gnome: 2.26.1

I’ve been running Linux Mint 5 on my laptop since last fall. It’s the release based on Ubuntu 8.04 LTS. On my laptop, I just want everything to work and I don’t care to reinstall every 6 months. So the Long Term Service release is perfect for the laptop. I wanted to take a peak at Linux Mint 7, so I decided to install it on my 2nd (test) desktop. I was less that pleased with it booting into a 800×600 resolution. I was even more displeased after I had Mint install the restricted driver because it left me with a 640×480 desktop resolution and no options to go higher. Nice.This was my fix. The hardware.

MB: Epox: EP 8RDA3+ Pro
CPU: AMD Athlon XP 2400+ (2Ghz)
Ram: 1.5 Gig
Video Card: Nvidia GeForce 4 Ti 4200

Mint said that there was a restricted video driver available so I let Mint install it. Click activate, let Mint do it’s magic, reboot and ……screwed. I am greeted by a 640×480 screen with no options to improve the situation. I remember a few things about the xorg.conf file so lets have a look. Open a terminal and type this:
$ sudo gedit /etc/X11/xorg.conf
This is what the file looked like.

# xorg.conf (X.Org X Window System server configuration file)
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
# Note that some configuration settings that could be done previously
# in this file, now are automatically configured by the server and settings
# here are ignored.
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "Monitor"
    Identifier    "Configured Monitor"
EndSection

Section "Screen"
    Identifier    "Default Screen"
    Monitor        "Configured Monitor"
    Device        "Configured Video Device"
    DefaultDepth    24
    Option    "AddARGBGLXVisuals"    "True"
    EndSection

Section "Module"
    Load    "glx"
EndSection

Section "Device"
    Identifier    "Configured Video Device"
    Driver    "nvidia"
    Option    "NoLogo"    "True"
EndSection

Section "ServerFlags"
    Option    "DontZap"    "False"
EndSection

I am using a 19″ CRT with this machine, so I’m just looking for a resolution of 1024×768. This is all I did to this file:
In the “Monitor section I added HorizSync & VertRefresh.

Section "Monitor"
	Identifier	"Configured Monitor"
	HorizSync      30-68
	VertRefresh    50-85
EndSection


In the “Screen” section I added a “Display” subsection and added a Depth of 24, & the Mode (resolution) I wanted of 1024×768. I’m sure more modes could be added.

Section "Screen"
	Identifier	"Default Screen"
	Monitor		"Configured Monitor"
	Device		"Configured Video Device"
	DefaultDepth	24
	Option	"AddARGBGLXVisuals"	"True"
	SubSection "Display"
		Depth       24
		Modes      "1024x768"
	EndSubSection
EndSection

Now I have a desktop resolution of 1024×768 with desktop effects on. Nice. Not sure why it was such a pain in the ass to get a decent resolution. Maybe my video card is so old that……..nahh. Linux loves old hardware right?………..Right?…….

I’m gonna install Ubuntu 9.10 on this same machine and see what happens.

COMMAND LINE ADVENTURES: Debian Lenny Base Install Setup

Debian 5 (Lenny)
Linux kernel: 2.6.26-2-486

I was given and old Compaq Presario and I wasn’t sure what I should do with it. I mean old. The CPU is a 500mhz AMD K6 and it’s also sporting about 256MB of ram. Nice. First I installed Debian 5 (Lenny) with Gnome, but it was impossibly slow. I even installed the LXDE desktop. Still miserable. Puppy linux ran ok but it wasn’t quit what I was looking for. I’ve always wanted to use the command line more so I figured that this was my chance. What better distro to learn on than Debian. I’ve heard of the irssi, screen and ssh combo but I’ve never done or even seen it. So I figured I’d set up a base install of Debian Lenny, Install irssi and screen and ssh into it from my other machines. That way I can stay logged into IRC at all times. Lets give it a shot.
I used the same net install cd that I have used on the other install. Only thing is, I’m not installing a desktop.
That’s right, no GUI.
First thing I did was install sudo
I need super user rights first.
$ su
# aptitude install sudo
Then I added myself to the sudoers list:
Still with super user rights I typed:
# visudo
Under ROOT ALL=(ALL) ALL
I added myself so it looks like this:
ROOT ALL=(ALL) ALL
user_name ALL=(ALL) ALL
Then ctrl+x and press Y when prompted to save.
Then press enter.

My sources.list looks like this:

deb http://debian.uchicago.edu/debian/ lenny main
deb-src http://debian.uchicago.edu/debian/ lenny main

deb http://security.debian.org/ lenny/updates main
deb-src http://security.debian.org/ lenny/updates main

deb http://volatile.debian.org/debian-volatile lenny/volatile main
deb-src http://volatile.debian.org/debian-volatile lenny/volatile main

I’m still not sure what the volatile repo’s are for.
I’ll leave my sources list as they are for now.

Next I installed a weather utility
$ sudo aptitude install weather-util
the command for my area would be:
$ weather -f -i kvpz -c valparaiso -s in
This gives me the current conditions and a 2 day forcast.
(kvpz is the code for the weather station near me. Find yours here)
Don’t forget to checkout the man page:
$ man weather

Next I installed screen
$ sudo aptitude install screen
It works well with irssi and ssh.
Start screen by typing :
$ screen

Next I installed the IRC Client irssi
$ sudo aptitude install irssi
A solid configurable IRC client. It took me some getting used to.

Next I installed Open SSH Server
$ sudo aptitude install openssh-server
Still trying to figure this whole thing out. I think ssh was installed,
but not the server.
From client to server:
$ ssh -l [username] [ssh server ip]
To end session type: logout

Debian Lenny: Installing the Nvidia Driver the Debian Way

nvidia settings

nvidia settings

Debian 5 (Lenny)
Video Card: Nvidia GeForce 7300 GT
Linux kernel: 2.6.26-2-686
Gnome: 2.22.3

The following was done after I set up Debian. See my previous post.

The Nvidia site says I need the 185.18.31 driver.
I’m installing an older 173.14.09…. driver because that’s what’s available in the repos. You can install the 185.18.31 driver the Nvidia way but that’s much more involved. If I’m unhappy with the 173, I’ll do the 185 by hand.

Using Synaptic Package Manager I installed:
nvidia-kernel-2.6.26-2-686 (version: 173.14.09+3+lenny1)
nvidia-glx (version: 173.14.09-5)
nvidia-kernel-common (version: 20080825+1)
nvidia-xconfig

Then from a terminal I ran:
$ sudo nvidia-xconfig

That produced this:

Using X configuration file: “/etc/X11/xorg.conf”.
VALIDATION ERROR: Data incomplete in file /etc/X11/xorg.conf.
At least one Device section is required.
Backed up file ‘/etc/X11/xorg.conf’ as ‘/etc/X11/xorg.conf.backup’
New X configuration file written to ‘/etc/X11/xorg.conf’

I then rebooted. I got the NVIDIA splash screen during the boot.
Driver install done.

Now from Synaptic Package Manager I installed:
nvidia-settings
Your resolution should be set to auto which is the native resolution of the monitor. With the next command, you should be able to change that.

At a terminal type: $ sudo nvidia-settings to get to the NVIDIA X Server Settings window (GUI) to adjust settings. Everyones happy…. I hope.

Some problems I have had in the past:
A Monitor out of range error is a HorizSync VertRefresh issue.
If this happens, you will find yourself at an unusable
scrambled screen. Type: ctrl-alt-f1
Now fix it. Open etc/X11/nano xorg.conf and make the
adjustments…or you might have installed the wrong driver. Doh!
Adjust your HorizSync VertRefresh to:
HorizSync 31.5 – 57.0
VertRefresh 50.0 – 70.0

Debian Lenny setup

Screenshot
Ok. A fresh install of Debian Lenny. I used the net install. I started the install and let it do it’s thing. It took about an hour and a half with my connection. I went and watched Bourne Supremacy while it was installing. I’m not going to go over the install. There are a bunch of guides and examples on the net Here’s a link to a quick over view. Remember, you do want the base system and desktop environment installed.

Debian 5 (Lenny) Step-by-Step

First thing I want to do is add myself to the sudoers list. This is how.

Add user(me) to sudoers list. In a terminal type:
$ su
Then type in the root password.
Then type:
# visudo
Now you can add a username to the list.
Under: root ALL=(ALL) ALL
Add:Your_username ALL=(ALL) ALL
Now press Ctrl+X and press Y when prompted to save. Then press enter.
Now you should be on the sudo list.

ADDING REPOSITORIES.

In a terminal type:
$ su
Type in root password.
Then navigate to etc/apt
then type:
# nano sources.list

My sources list looked like this:

deb http://ftp.us.debian.org/debian/ lenny main
deb-src http://ftp.us.debian.org/debian/ lenny main
deb http://security.debian.org/ lenny/updates main
deb-src http://security.debian.org/ lenny/updates main
deb http://volatile.debian.org/debian-volatile lenny/volatile main
deb-src http://volatile.debian.org/debian-volatile lenny/volatile main

I changed to to this:

deb http://ftp.us.debian.org/debian/ lenny main contrib non-free
deb-src http://ftp.us.debian.org/debian/ lenny main contrib non-free
deb http://security.debian.org/ lenny/updates main contrib non-free
deb-src http://security.debian.org/ lenny/updates main contrib non-free
deb http://volatile.debian.org/debian-volatile lenny/volatile main contrib non-free
deb-src http://volatile.debian.org/debian-volatile lenny/volatile main contrib non-free

Now press Ctrl+X and press Y when prompted to save. Then press enter.
At a terminal type:
$ sudo apt-get update
Done.

AUTO MOUNT USB STICKS.

In a terminal type:
$ sudo apt-get install ntfs-3g
This will also mount external hard drives formatted as NTFS.
Done

INSTALL FLASHPLAYER PLUGIN

To do this we must add backports. Here’s how.
In a terminal type:
$ su
Type in root password.
Then navigate to etc/apt
then type:
# nano sources.list
Add this to the source list.
deb http://www.backports.org/debian lenny-backports main contrib non-free
Now press Ctrl+X and press Y when prompted to save. Then press enter.
At a terminal type:
$ sudo apt-get update
Now from a terminal type:
$ sudo apt-get install debian-backports-keyring
Press y when asked.
Now the backports work. Lets install flash.
In a terminal Type:
$ sudo apt-get install flashplugin-nonfree
Press Y when prompted.
Done.
Now you are officially a freedom hater. Congratulations.
That’s enough for tonight.