Linux Blog

Video Card Failure.

Filed under: Linux Hardware — TheLinuxBlog.com at 11:59 pm on Thursday, November 29, 2007

Linux Blog - Video Card

At the moment I am a little unhappy with my Linux Box. It was making funny sounds (more than normal) the other night so I decided to turn it off. When I turned it back on, it was making even more racket. Turns out that my video card has been toasted, literally. The picture on the left shows the damage. Its pretty evident that the fan stopped spinning and burned up.

So much for my 128MB GeForce FX 5200.

I have an older GeForce laying around somewhere but I’ll have to use the legacy drivers. Until I find the card don’t fear I’ll be continuing to blog on my laptop. Which isn’t the best machine to use, but it will get the job done. Also from this experience I have thought of an blog post to write: dealing with hardware failure.

My Linux Laptop – Toshiba Portege 4010

Filed under: Linux Hardware — TheLinuxBlog.com at 9:48 am on Monday, November 26, 2007

Linux Blog - Toshiba Portege 4010 Linux LaptopAlong with my desktop I also have a laptop that is in dire need of an upgrade. It is a Toshiba Portege 4010. Although its age and its specifications (or lack of) it is still a decent ultra portable laptop. The battery life is great (4-6 hours) and its very light weight. Here are the specs:

CPU: 933MHz Pentium M
Ram: 512MB Shared
HD: 100GB Seagate 5400RPM
Media: CD-RW/DVD Combo Drive.
Network: Integrated 10/100 & Orinoco B Wifi.

I like its slim line style and cool features like the SD Card Reader, Firewire, Infrared and Toshiba Select Bay. But unfortunately I’ve not been able to get the SD Card or Infrared to work. The video card is also lacking, its a Trident Cyberblade and it doesn’t have very good support. I have to run X in VESA frame buffer mode which isn’t as bad as it sounds but without tweaking it is unable to play DVD’s.

The Toshiba ACPI extras work really well in conjunction with fnfxd. Brightness, Volume, Screen Change and Lock Screen are the only short cuts I set up. The system also suspends to disk & ram with no problems.

I also run Slackware 12 on my laptop and have trimmed it down to boot Linux faster and provide better battery life. It boots to login in about 30 seconds. The picture above is a picture I took in the kitchen. The desktop is XFCE from Slackware-current, click on the image to view more photos of my Toshiba Portege 4010.

My Linux Desktop Machine

Filed under: Linux Hardware — TheLinuxBlog.com at 8:39 am on Saturday, November 24, 2007

Maybe its just me but I find it interesting to look at other peoples computer stuff so I’m going to take the time to write some blog posts about my hardware.

First in my lineup is my Desktop. This is by no means a new computer but runs very well.
CPU: AMD Athlon XP 2500+
Motherboard: MSI KT400
Memory: 512MB DDR 333
Hard Drive: 160GB Maxtor
Video Card: NVIDIA GeForce FX5200
Ethernet: ADMtek NC100 Network Everywhere 10/100
Media Devices: CD-RW, Floppy, ATA133 Hard Drive Bay
Monitor: LG 19″ Flat Panel. DVI, VGA, 1280×1024. 4ms 1400:1
Keyboard/Mouse: Generic Staples $10 special and a unknown brand painted laser mouse.

Every device is supported by the 2.6 kernel and Linux runs very well on it. The motherboard uses a VIA chip set and a C-Media audio device. The CPU is
actually 1875.733 MHz with a 512KB cache. According to cat /proc/cpuinfo it has a bogomips rating of 3754.8

Now comes the sensitive part, my distro of choice. For some this is a sour topic but I’ll just say that it doesn’t really matter to me. I run windows on it before and most Linux distributions out perform it out of the box (after installing video drivers.) I choose to run Slackware 12 on it because of the simplicity. It took a little while to configure it how I like but it turned out pretty well. I use slackpkg to keep it current.

I’ll be sure to post some pictures of the setup some time.

Thats about all I have to say about my desktop, if you have any questions or would like any additional information just give me an e-mail at: owen @ thelinuxblog.com

New Hardware Category Added

Filed under: Linux Hardware,The Linux Blog News — TheLinuxBlog.com at 6:45 pm on Friday, November 23, 2007

I’ve added a new category to The Linux Blog. It is called: “Linux hardware” Any posts I make that include a specific device or device setup will be found in this category. It will also be used to post news about upcoming devices, devices I wish I had and anything else related to hardware.
Now I have to do a pitch: If any readers have questions, cool new hardware, hardware to review or would like a showcase in The Linux Blog about their hardware please send an e-mail to me: owen @ thelinuxblog.com

Thats all for now folks!

Making your scripts user and sysadmin friendly

Filed under: Shell Script Sundays — TheLinuxBlog.com at 11:08 pm on Sunday, November 18, 2007

When designing a shell script it is important to make them easy to use but also to make it easily automated for deployment. One example of this that comes to mind is the NVIDIA installer. It has command line options to allow for deployment but also gives a nice interface for the end user.

To implement this “dialog” can be used for the user interface and “getopts” can be used for the command line options. The script may look something like:

#help function
help () {
echo "Linux Blog - getopts and dialog example";
echo "Usage:";
echo -e "\t -h shows this help";
echo -e "\t -a [y/n][other] ANSWER (Yes, No or Other)";
}
 
#show dialog to get the answers
showDialog () {
dialog --yesno "Do you want to enter y?" 5 50 && \
ANS="Yes was entered using dialog" ||\
ANS="No was entered using dialog"
showAnswer;
}
 
#actually show the answer
showAnswer() {
echo $ANS;
}
 
#check answer for command line processing
checkAns() {
if [ "${OPT1}" == "y" ]
then
ANS="Yes sent by getopts";
elif [ "${OPT1}" == "n" ]
then
ANS="No was sent getopts";
else
ANS="This: $OPT1 was sent by getopts";
fi
#call showAnswer
showAnswer;
}
 
#get the options
while getopts "a:h" ARG;
do case "${ARG}" in
a) OPT1="${OPTARG}";;
h) HELP="TRUE";;
esac;
done
 
#see if help was entered
if [ "${HELP}" ]
then
#display help and quit
help;
exit;
fi
#if the options are empty
if [ -z "${OPT1}" ]
then
showDialog;
else
checkAns;
fi

Keep this getopts and dialog post in mind next time your shell scripting. It will take a little extra time to implement but the result will be a user and sysadmin friendly script.

A Windows Box, A Linux Box, Two Monitors Sharing One Keyboard and Mouse.

Filed under: Quick Linux Tutorials — TheLinuxBlog.com at 7:15 pm on Wednesday, November 7, 2007

If you read my first 60 second tutorial on using one keyboard and mouse on multiple computers you would know that using two linux boxes with one keyboard and mouse is easy. This blog will show you how to do the same thing but with a Linux box and a Windows box.

So lets get started.

The program to use this time is actually a hack of the x2x program. It is called x2vnc and you guessed it, it connects an X keyboard and mouse to a VNC client.

On your Windows desktop download and install the RealVNC server from http://www.realvnc.com/cgi-bin/download.cgi
Make sure that the vnc server is running (You should see a white icon in the tray.)
Find the ip of your Windows box (windows key + r > cmd > ipconfig)

At your linux box do the following:

Download, Compile and install x2vnc:

owen@linux-blog-lappy:~$ wget http://fredrik.hubbe.net/x2vnc/x2vnc-1.7.2.tar.gz
owen@linux-blog-lappy:~$ tar xvzf x2vnc-1.7.2.tar.gz & cd x2vnc-1.7.2/
owen@linux-blog-lappy:~/x2vnc-1.7.2$ ./configure && make && sudo make_install

Launching x2vnc. Once installed The syntax for x2vnc is very simular to that of x2x.

x2vnc [options] host:display

It will either be North, South, East or West. If your windows box is on your right use east.

owen@linux-blog-lappy:~$ x2vnc -east 192.168.X.X:0

Thats all there is to it. You should be able to mouse over the right of your screen and see your mouse cursor on your windows box.

Snippet: Keeping SSH Running

Filed under: Quick Linux Tutorials,Shell Script Sundays — TheLinuxBlog.com at 12:53 am on Sunday, November 4, 2007

I wrote a post not so long back called Bringing The Internet Up After Failure that explained how I was restarting my network services after the internet went down.

Shortly after this I was remotely working when I thought it would be a good idea to restart my SSHD to enable X11 forwarding. After running the script that normally restarts the service I tried to reconnect. Unfortunately the service never restarted after being stopped. This is not a good situation for any one to be in so I added something like this to my cron along at the end of my network services script:

ps ax | grep \usr\/sbin\/sshd | grep Ss && echo "SSHD Running" || echo "Starting SSH"; sudo /etc/rc.d/rc.sshd start

The only difference between the version I am running and the version above is that I don’t echo anything out. All the command does is use the ps command and grep for usr/sbin/sshd then grep for the STAT field of sS. I do this because sshd shows up in the process list as shown below:

owen@the-linux-blog$ ps ax | grep sshd
3463 pts/0    R+     0:00 grep sshd

The rest is self explanitory, it echo’s “SSHD Running” or sudo starts the SSHD.

If SSHD ever terminates on me or those of us who run this snippet we will be able to rightfully regain access to our systems, Hurray!