PRC Recording Studio PRC Recording Studio PRC Recording Studio
Genealogy of my kin

Replacing Windows with Linux

OK, so the title is overly dramatic.

I'm tired of the instability of Windows. I'm trying Linux. I've been running several Linux servers for years, but this is different. I'm replacing my desktop and laptop Windows machines.

These are notes and random technical tips.

       

Distros

To start with, you have to decide which "distro" to use. Distro is the geeky buzzword for distribution. In reality, you don't run Linux, you run the linux kernel with a near random collection of GNU and other open source utilites and tools. The selection of, and packaging together of the tools is a "distro."

My main distro is Ubuntu, at least for desktops. I used to use Mandriva, but Ubuntu is the cool new thing.

mail

Setting up mail was a lot harder than setting up Apache.

Postfix

So I decided to install postfix instead. Smart people I know, like Chris Madsen, say it is tons better.

Here are some random notes on my effort to get postfix working:

  • Make sure that shorewall allows access to port 25.
  • Make sure that the hostname and domain fields in the main.cf are correct:
       myhostname = mail.pfarrell.com
       mydomain = pfarrell.com
     
  • make sure that the inet_interfaces is set properly.
    inet_interfaces = all
    
  • You have to create the aliases.db from your aliases text file. So make the text file look like you want, and then do:
    cd /etc/postfix
    newaliases
    
  • Sometimes postfix will whine about the file aliases.db which is installed by default into /etc/postfix but sometimes is looked for as if the filespec was just /etc/aliases.db It is not clear why this is a problem, I just made a softlink from /etc/aliases.db to /etc/postfix/aliases.db
  • Sometimes it can help to check that the system is listening to the proper ports. Use
    netstat -a
    

reading mail

mail
The classic way to read mail on a *nix system is to fire up a shell and use the mail program. But Mandrake doesn't install it by defailt. To install what old timers expect as mail, you have to tell mcc to install the 'mailx' package.
modern mail clients
Most folks these days use a GUI mail client. Windows folks use Outlook, or Outlook Express or Eudora or even Mozilla Thunderbird.

Before you can talk about modern mail clients, you need at least a semi-modern mail delivery daemon. So first I had mcc install popa3d. It has all the usual security problems of any POP3 server, most seriously passing arround passwords in the clear.

Other setup things

Kernel versions

In theory, the kernel is independant from the rest of the distribution. In reality, the distro folks usually have only a select few kernels available for each distro version.

To see which kernel version you are currently running, do:

   uname -a
Another way to get similar information is:
   cat /proc/version

Browser integration

For unknown reasons, Windows does a better job of setting up the connection between tools like email readers and browsers. There is a magic program for Gnome that tells the system what program to use. To make sure that the proper browser and email clients are fired up by default, open a shell and do:

/usr/bin/gnome-default-applications-properties
Which is intuitively obvious to the most naïve observer.

Java for Firefox

First, install Firefox and Java. Then put a link to the plugin, something like:

# ln -s /usr/java/jre1.5.0_02/plugin/i386/ns7/libjavaplugin_oji /usr/lib/mozilla/plugins/libjavaplugin_oji
All one line, watch for wrap, and modify according to your java path. For some reason, java prefers a link to the original location rather than a copy of the plugin.

DVDs

I'm a rookie at burning DVDs. So far, here is a hint. Here's a howto on backing up DVDs using DVD Shrink with wine in MDK10.1 http://mandrake.vmlinuz.ca/bin/view/Main/WinE . Once you have the VIDEO-TS and AUDIO_TS files just open a new Video DVD project in k3b and drag-n-drop and burn

NFS mounting from Knoppix to Mandrake

The normal NFS mounts seem to hang. So try this:
 mount -o vers=3,tcp,nolock,intr cokebox:/home/userid foo
As documented in http://www.nslu2-linux.org/wiki/Unslung/Unfs3

sensors

The "sensors" package is very cool. It lets you monitor CPU temperatures, fan speeds, etc. You can use MCC to install the needed files, modules and programs, but you need to have a bunch of stuff configured at the kernal level. So do a:
  sensors-detect

Security links

Apache 2

The main thing to watch is that the command expects a full path,not one relative to the docoroot of the virtual host.

Startup Scripts

 On Mon, 11 Apr 2005 00:18:34 -0400, Pat Farrell wrote:
 >> I have no problem with "thar be dragons"
 >> but I explicitly want to have _my_ scripts
 >> run, preferably before all the GUI login
 >> stuff gets kicked off, as
 >> I don't want something like a .bashrc
 >> for the user

Please read http://www.catb.org/~esr/faqs/smart-questions.html

If you have no problem with a script running as the last thing after boot then adding a call to it at bottom of /etc/rc.d/rc.local will work.

If you want it to execute only during different runlevels and/or it has to do something after one script but before another startup script, and/or it also needs to do something during shutdown, then I would suggest doing a

cp /etc/init.d/network $HOME/my_script and start hacking away on my_script

Do change header verbage where applicable. Do not delete everything in the header, just the verbage which relates to your script.

When you are through testing my_script, you

 cp $HOME/my_script /etc/init.d/
 chkconfig --add my_script
 service my_script start	# and see if it does OK.
 service my_script stop		# and see if it does OK.

Final comment. If it has to run between two scropts, the script name matters IF the scripts are running with the same numbers. For instance if network startup fails, I want a retry. My script is named network_ck because as you can see with


 $ ls -1 /etc/rc.d/rc3.d

 S01udev
 S05harddrake
 S10network
 S10network_ck
 S10shorewall
 S11portmap
 S12syslog
 S14nfslock
 
I wanted my network_ck to run after network and before shorewall (firewall) executed.

IP forwarding

touch /var/lock/subsys/local

echo 1 >/proc/sys/net/ipv4/ip_forward

KDE stuff

With Mandrake, you can use either KDE or Gnome. I have no clue why anyone would care, I sure don't. But the default is KDE.

on the console, KDE has a nice star icon to start its equivalent to the startup menu. I have no idea how to get that when you ssh in with an Xwindow. But the key KDE program is kcontrol. (Which is also know as Configure your Desktop).

UseNet readers

Lots of good comments and links

login choices

I like to generate users, so that each system, daemon, etc. has its own with limited access and unique names for the logs. This means that when KDE starts, it shows too many users in the startup menu. You control this with "kcontrol":
  • System -> Configuration -> KDE -> System -> Login Manager
  • Hmmm, there is a tab that says Users
  • Hmmm, Show lists is selected (at least on your system)... Then what is this "Select users and groups" under which is "Hidden Users" I wonder if this would work...

Web authoring

In my day job, we use MacroMedia's Dreamweaver. It is nice. It is also expensive, $750 or so, and it wants Windoze. For now, I've been using 'vi' but that is pretty rough. So I'm looking for alternatives.

Copyright © 2004-2008 Farrell and Associates.