Archive for the ‘comand line’ 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.

DVD Playback on Debian Lenny

Debian 5 (Lenny)
Linux kernel: 2.6.26-2-686
Gnome: 2.22.3

I’m looking for commercial dvd playback on my Debian lenny desktop. Let’s see if this works.
First thing is to add the Debian Multimedia repositories to the sources.list
Open a terminal window and type this:

$ sudo nano /etc/apt/sources.list

At the end of the sources list, add this:
deb http://www.debian-multimedia.org lenny main
Mine looks like this.
sources_list_dvd

Now to install the keyring. Open a terminal window and type this:
$wget http://www.debian-multimedia.org/pool/main/d/debian-multimedia-keyring/debian-multimedia-keyring_2008.10.16_all.deb
The above command is one long command with no spaces. This wordpress page puts it on 2 lines…….it’s only one command.
Now type this:
$ sudo dpkg -i debian-multimedia-keyring_2008.10.16_all.deb
And now this:
$ sudo apt-get update

Now you can keep your terminal open and Type:
$ sudo apt-get install gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly gstreamer0.10-lame libdvdcss2
Once again, that is one long command. Or, if you would rather install these through synaptic, You can close the terminal and add these through the synaptic GUI program. They both will work.

gstreamer0.10-plugins-bad
gstreamer0.10-plugins-ugly
gstreamer0.10-lame
libdvdcss2

The install went good, no errors……until.
The Debian update manager(GUI) gave me a smart upgrade option because of some new dependencies for some new applications or newer versions of existing dependencies. I opted for the smart upgrade.
During the smart upgrade I got a notification that the mplayer.conf file would be replaced with a new conf file. I was asked if I wanted to keep the old one or write the new one. I choose to write the new one.
Try a few dvd’s
It works. Nice. Well…It didn’t work on a new release (Transformers 2), but It did work on dvd’s that were a little bit older. Probably encryption issues.

I also added:
$ sudo apt-get install w32codecs
and
$ sudo apt-get install vlc
Just for good measure.

COMMAND LINE ADVENTURES: Linphone

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

For some reason I wanted to make a VoIP call with my base lenny install since I got the sound working a few days ago. I decide on Linphone because it’s in the repo’s. Let’s install the command line version.

$ sudo aptitude install linphone-nox

Ok, let’s run it.

$ linphonec
I get a warning that video is disabled but… I already knew that.

linphone1

OK, so now were ready to make a test call. This is an echo test from somewhere in Australia.

linphonec> call sip:*318613@ekiga.net

You should hear a womans voice explaining what’s going on. You should also be able to hear yourself when you speak into your mic. For some reason everything was muted in alsamixer. I had to unmute the sound and mic.

The configuration file is located at:
home/user_name/.linphonec
It’s a hidden file.
I’m not sure how to configure this yet but I’ll update this post as I get it.

That’s it. Yer good…..Call someone.

Also check out the man page.
$ man linphonec

COMMAND LINE ADVENTURES: Debian Lenny Sound Install

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

I decided that I want to stream online radio stations through my Debian Lenny server (No GUI).I say server loosely because I have openssh-server installed. I use it for irssi and bashpodder. But now it will stream online music. Lets get started.

First thing I did was install mplayer:
$ sudo aptitude install mplayer
Since sound was not installed during the base install, I have to install sound…. or alsa should I say. This is the short story.
alsa install:
$ sudo aptitude install alsa-base alsa-utils
Those 2 packages should do it. I logged in as root and ran:
# alsaconf
Looks like the on-board sound is not even detected. I had an old PCI sound card laying around, so I shut it down, installed the card and reboot. Again, as root I ran:
# alsaconf
Went through the configuration screens where I picked my card and alsa configured the driver.
Rebooted.
Now to test this out, I tried to connect to a radio station with mplayer:
$ mplayer http://citadelcc-wls-am.wm.llnwd.net/citadelcc_WLS_AM
Nothing. I know this works because I can listen to this on my other full Debian install. Something must not be configured right. I run alsamixer:
$ alsamixer.
This is what I see.
alsamixer1

Great, it looks like the master volume/volumes are all the way down. So I turn them up. I use my left and right arrow keys to make my selection. Then the up and down keys to raise or lower the volumes.
alsamixer2
Hit Escape and try my station again:
$ mplayer http://citadelcc-wls-am.wm.llnwd.net/citadelcc_WLS_AM
Damn it! Still no sound. Open alsamixer again:
$ alsamixer
I notice the little “MM” in the boxes under each component. I arrow over to the master volume and hit the M key. The “MM” was replaced with “00”. The “MM” means muted. Well I finally came up with this configuration. The Master volume and PCM unmuted.
alsamixer3
So now I run:
mplayer http://citadelcc-wls-am.wm.llnwd.net/citadelcc_WLS_AM
and I hear voices……and the radio. 😉

COMMAND LINE ADVENTURES: Debian Lenny Static IP Address

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

Back to my Debian Lenny Base install. I will mostly be accessing this box via ssh, so it needs a static ip address. How the hell do I do that? This box has no GUI. After a few days of searching the inter-webs, I wrote down what I thought I needed to do. I did all of this via ssh, all except the reboot part that is. This is what happened.

I just want to see what my ip address is now:
$ sudo ifconfig
Nice! I’ll use it. 192.168.1.68

The file you need is located at
etc/network/interfaces.

Alright, lets open that file:
$ sudo nano etc/network/interfaces

You should be looking at something like this:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

Now I changed mine to look like this:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
#The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 192.168.1.68
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

Made the changes and saved.
I’m still not sure what a few of these address’s are. The network and broadcast address’s. I lined them up the best I could compairing my files with other examples on the net….and it worked. I saw on a few sites that you can apply these without rebooting with this command:
$ sudo etc/init.d/networking restart
It didn’t work for me. I had to reboot the machine. Everything came back up fine with the correct assigned ip address.
Have fun! Damn it!

Text to Speech under Linux

This was accomplished with a little nudge in the right direction from a Mr Dave Yates…and a few beers.

Parties involved: Linux Mint 5(Ubuntu Hardy), Packages: festival, festvox-kallpc16k.  And some Blue Moon Spring Ale.

Install the above packages. In a text editor, I use gedit, write your text. Save your text. I applied a txt extension to it. Without the txt, festival didn’t find it. Go figure. From the command line type:
text2wave yourfile.txt -o newname.wave. Not sure what the -o is for.  So lets say my text file name is oatmeal.txt. I want to name the wave(sound) file beer.wave. So the command would be
text2wave oatmeal.txt -o beer.wave. The -o is an option meaning save file to wave form. That should land that wave file in your home directory. That should do it.

: