Robert's Linux Notes
Back to Fisher Family Home Page

Gentoo Specific Stuff
Suse Specific Stuff
APT Commands
Clean Out Your World File

Services – starting in Gentoo

To see (mount) the fat32 drive
My fstab....
My Printing

To mount Shares from Windows PC’s

Mounting Windows Partitions
To fix things using the Gentoo Boot CD
System recovery with Knoppix
Updating kernel
Bootup with Splash Theme
Removing old kernel source trees
KDE SMB ioslave
SCP

Sitecopy
Imagemagick
Album
MythTV
Various Linux Stuff
VmWare HowTo
Software RAID mirror
Mepis 7 Multimedia
Thunderbird
 
To Do before upgrading or changing distro:-
Save fstab, smb.conf
Save /home
Save packages which are possibly not in new version (e.g. konq-kim, kde-pwmanager, kompozer)
Export bookmarks, addressbook and calendar
Check (and maybe save) password.pwm, cron.daily and cron.hourly stuff, VMWare image folder
Take note of sound / kmix settings

Stuff I do/install after fresh Mepis 7 install

Set up fstab

Set Regional settings, logon settings. menu.lst

Install Acroread, Kompozer, kmymoney, pwm; konq-kim, sitecopy, kweather, openoffice, msttfonts, libdvdcss2 (allows dvd playing), w32codecs (allows windows media playing), libarts1-xine (allows sound previews in kde), mozplugger (some flash videos), myspell-en-gb (english for openoffice), kde-i18n-engb (english for kde)


My PC - "Beast"
(Parts from Dragon - 28/6/07)
Intel Core 2 Duo 6600 2.4GHz 4M cache 1066MHz LGA775
Gigabyte GA-P35-DS3R mobo
2x 1Gb DDR2 800 (6400) DIMM
Albatron 6800GE 256Mb DDR TV Out Nvidia Graphics card
200Gb Western Digital SATA drive *8.9m/s *7200 RPM * 8Mb cache
200Gb Seagate Barracuda SATA Drive *7200 RPM * 8Mb cache
LG GSA-H30NS 18x Dual layer DVD-RW SATA drive
Acer AL1916W  1440 x 900 19" diagonal (Wide Screen)

Below is the spec before upgrade.
Intel P4 3.0 Ghz, 800Mhz FSB 512kb cache
Asus P4P800-E Deluxe/WiFi Socket 478
2x 512Mb 184pin, DDR400/PC3200 DDR Ram
128Mb Albatron FX5200EP 64bit, DDR, TV Out/DVI Nvidia graphics


Running Mepis Linux (and nothing else)
modprobe sk98lin - for NIC on this mobo


To see (mount) the fat32 drive

do the following in a console window…


create an empty directory eg /mnt/win or /C

type in….

mount /dev/hdxn /mnt/win -t vfat

where hdxn is your windows partition

hda is the first drive

hdb is the second etc

hda1 is the primary partition

hda5 is the first logical partition

hda6 is the second logical partition

To permanently mount………

add into the /etc/fstab file the line (I used)

/dev/hda2 /home/robert/storage vfat defaults,umask=000 0 0


Understanding fstab

http://doc.gwos.org/index.php/Understanding_fstab


My (Mepis) fstab....
# Pluggable devices are handled by uDev, they are not in fstab
/dev/sda1 / ext3 defaults,noatime 1 1
/dev/sda2 swap swap sw,pri=1 0 0
none /proc proc defaults 0 0
none /proc/bus/usb usbfs devmode=0666 0 0
none /dev/pts devpts mode=0622 0 0
none /sys sysfs defaults 0 0
/dev/md0 /home ext3 defaults,noatime 1 2
/dev/sdb2 /mnt/bak ext3 defaults,noatime 0 1
# Dynamic entries below
/dev/cdrom /media/cdrom udf,iso9660 noauto,users,exec,ro 0 0
/dev/scd0 /media/cdrom udf,iso9660 noauto,users,exec,ro 0 0

To mount Shares from Windows PC’s

Create directory e.g /share

To mount.... type...

smbmount //winsys/winshare some-mount-point

Example for me (X = win pc, C = Share name)
smbmount //X/C /share

To unmount (my example)...

smbumount –t smbfs /share


Mounting smbfs Shares Permanently

http://www.justlinux.com/nhf/Filesystems/Mounting_smbfs_Shares_Permanently.html

And some notes I found useful to access Vista shares.....

Using a text editor, create a plain text file containing two lines:

username=windows_username
password=windows_password

Substitute your actual Windows username and password for the italicized text. Save the file in your home folder as .smbpasswd (don’t forget the dot at the beginning of the filename, which makes the file hidden). Finally, change the permissions on the file so only you can open and change it by issuing the following command in a Terminal window:

chmod 600 .smbpasswd

3. On the Linux machine, open /etc/fstab in a text editor. (On Ubuntu, I used the command sudo gedit /etc/fstab. You can use another editor if you prefer.)

4. At the end of the file, add a new line containing the following:

//vista_pc_name/share_name   mount_folder_name smbfs credentials=/home/linux_username/.smbpasswd,uid=linux_username,gid=users  0 0

Use the UNC path for the Windows share, and replace mount_folder_name with the full path of the folder you created in Step 1 (in this example, /mnt/vista_public). Substitute your Linux username for the values in red. These credentials will be passed to the Vista machine. (Note: there’s no space after the comma and before the uid and gid.) [Update: Thanks to Jeremy Allison in the comments of the previous post for pointing out that smbfs is deprecated and no longer maintained. You can safely substitute cifs for smbfs in the fstab entry.] 



Gentoo Specific Stuff:-

Gentoo /etc/make.conf file

GENTOO_MIRRORS="ftp://linux.jetstreamgames.co.nz/dist/gentoo ftp://debian.co.nz/Gentoo http://gentoo.recoil.net.nz/gentoo"
(203.96.92.91 = linux.jetstreamgames.co.nz
219.88.241.110 = debian.co.nz
219.88.255.180 = gentoo.recoil.net.nz)

SYNC="rsync://gentoo.recoil.net.nz/gentoo-portage"

Local Rsync Mirror HOWTO

http://gentoo-wiki.com/HOWTO_Local_Rsync_Mirror


Services – starting in Gentoo

For example:-
/etc/init.d/samba start
/etc/init.d/samba restart
/etc/init.d/samba stop

If services are "locked up" try....
/etc/init.d/samba zap

To show services..
rc-update show


Gentoo – Java and Mozilla

Here is how I got it working:

1. Unmerge Openmotif and Lesstif if you have them installed
2. Emerge Mozilla
3. Emerge Blackdown-jdk(you can do Sun's version to but it takes about 3 hours to \
compile), make sure it's installing version 1.4.1.
4. Type 'java-config --list-available-vms' (look for Blackdown 1.4.1)
5. Type 'java-config --set-system-vm=blackdown-jdk-1.4.1'
6. Reinstall Openmotif or Lesstif if you had them installed.
7. Type 'env-update'
Runs like champ.


My printing using CUPS, Gentoo and HP DeskJet 1220C

emerge cups
rc-update add cupsd default
emerge foomatic
emerge hpijs
/etc/init.d/cupsd start
grep HP-DeskJet_1220C /usr/share/foomatic/db/source/printer/*
grep printer/HP-DeskJet_1220C /usr/share/foomatic/db/source/driver/*
foomatic-configure -s cups -p HP-DeskJet_1220C -c lpd://surfish/DeskJet -n DeskJet -d hpijs

To cancel a cups job with the command line
cancel queuename-job number
e.g.
cancel Deskjet-629

(used when, for as yet unknown reason, cannot delete job using browser)

Searching for packages:-
Either
emerge -s packagename
or
netcat -v packagename
Emerge
The following will keep a system up to date:-
emerge --sync && emerge -uDpv world
Optional: emerge -uDvf world && emerge -uDv world
emerge -uDv world
emerge -pv depclean
emerge -v depclean
revdep-rebuild -pv
revdep-rebuild -v
dispatch-conf
That basically updates the portage tree, tells me what's involved in updating everything, updates everything, tells me what packages are no longer necessary, removes them, tells me what packages have been broken by an upgrade or removal, and recompiles them. Then dispatch-conf updates my config files for me with minimal intervention.

When a new version of Gentoo is released you can also do something like...
ls -l /etc/make.profile
rm /etc/make.profile
ln -s /usr/portage/profiles/default-linux/x86/2006.0/ /etc/make.profile


To fix things using the Gentoo Boot CD:
....then fix whatever and reboot

Updating the Kernel (works for me)
cd /usr/src
cp linux/.config /usr/src/linux-2.6.9-gentoo-r12  (- to location of new kernel)
cd
ls -l /usr/src/linux
rm /usr/src/linux && ln -s /usr/src/linux-2.6.9-gentoo-r12/ /usr/src/linux
(- linux-2.6.9-gentoo-r12 represents the name of the new kernel)
ls -l /usr/src/linux (- to check the symlink)
cd /usr/src/linux
make oldconfig
make menuconfig (only if manual changes are wanted or needed)
make && make modules_install
mount /boot/
cp arch/i386/boot/bzImage /boot/kernel-2.6.9-gentoo-r12 (- or whatever name you give it)

Edit /boot/grub/grub.conf to point to the new kernel
Reboot

module-rebuild list
module-rebuild rebuild

(If using nvidia module) run
eselect opengl list
and maybe
eselect opengl set nvidia

reboot

Bootup with the Gentoo 2005.0 logo

When you boot from the 2005.0 LiveCD you see an awesome Gentoo bootlogo and progress-bar -- and you wish you could impress your friends with it during your usual bootup? Here we go:

Note: splashutils only work on x86 and amd64 architectures perfectly at the moment. Support for ppc is in progress.

First of all, we need to emerge splashutils and splash-themes-livecd:

Code Listing 5.1: emerge splashutils and splash-themes-livecd

# emerge splash-themes-livecd
splashutils is a dependency of splash-themes-livecd

Now we have to create an initial boot-disk. You are free to change the resolution to your choice, but choose one that is available as a config file in /etc/splash/livecd-2005.0/:

Code Listing 5.2: Creation of an initrd with the 2005.0-splash

Be sure that /boot is mounted before you call the command
# splash_geninitramfs -v -g /boot/splash-livecd-2005.0-1024x768 \
-r 1024x768 livecd-2005.0

Check your kernel-config to make sure that "Initial RAM disk (initrd) support" is built in. You can find the option in "Device Drivers" --> "Block devices" --> "RAM disk support". Furthermore check that you are using an appropriate framebuffer for your video-card ("Graphics Support") or stick with the VESA-framebuffer. Usually splashutils should do the checks during the emerge-progress, but we want to be sure. Now tell your bootloader that it should load the initrd with the 2005.0-splash:

Code Listing 5.3: Configure the bootloader

# nano -w /boot/grub/menu.lst
First change your kernel-boot-line to something like this (depends on
your used framebuffer and further kernel-parameters):
kernel /boot/kernel-2.6.11-r6 root=/dev/hda3 video=vesafb:1024x768-32@72
splash=silent,theme:livecd-2005.0 quiet CONSOLE=/dev/tty1
You must use more than 8bpp (in this example it is 32,
specified by 1024x768-32@72).

Add the following line to your kernel-config:

initrd /boot/splash-livecd-2005.0-1024x768

Now we have that nice bootup-splash installed. Finally we want a permanent Gentoo statusbar at the bottom of our terminal-session, like on the LiveCD. Therefore we have to change the default theme in /etc/splash:

Code Listing 5.4: Change the default splash

# cd /etc/splash

# rm default
# ln -s livecd-2005.0 default

This splash should be started after bootup has finished:

Code Listing 5.5: Add splash to the default runlevel

# rc-update add splash default
      

If you want to finetune the splash-theme, you should have a look at /etc/conf.d/splash. Happy Gentooing!

Thanks to Michael Januszewski for his work on splashutils and Nicholas D. Wolfwood for the 2005.0-theme.



SpamAssassin and Evolution setup:-
http://forums.gentoo.org/viewtopic.php?t=26006

NTP setup in Gentoo
http://forums.gentoo.org/viewtopic.php?t=41099

giFT set up on Gentoo
http://forums.gentoo.org/viewtopic.php?t=130787&highlight=emerge+giftfasttra

Clean out your world file

http://forums.gentoo.org/viewtopic.php?t=142475&postdays=0&postorder=asc&highlight=cleaning+file&start=0


OK, here's a rough idea of how to use it: (dep script)
Maybe once a week or so (no more than one in five times the script writer uses "emerge -Duav world"),
I use "emerge -uUav world" or "emerge -DuUav world"
run "dep -s".

Look at what it wants to unmerge if anything, check it makes sense, if so let it unmerge it.
Then run emerge -Duav world again in case any mistakes have been made.
Then run "dep -w" to clean the world file.
Then do a revdep-rebuild.

Mounting Windows Partitions

I found this at http://forums.gentoo.org/viewtopic.php?t=29285

Symptoms:

Cannot mount a Windows (tm) partition, or just root can access a mounted partition.

Solution:

Step 1 Build a kernel with support to your Windows (tm) file systems

There are two main types of Windows (tm) partitions: NTFS and FAT-based. The first step is to compile the file system support for these in your kernel or as modules.

In the kernel configuration menus, go to File Systems and enable:

Code:

...
<*> DOS FAT fs support
<*> MSDOS fs support
...
<*> VFAT (Windows-95) fs support
...
<*> NTFS file system support (read only)
...


Compile also the Native Language Support (usually ISO 8859-1) in Native Language Support.


It is very important not enabling write support for NTFS, as it is DANGEROUS. These are recommended settings, if you are sure you do not need some of these, feel free not to select them. You can also build them as modules. Compile and install your new kernel and modules, reboot your computer and you are ready for the next step.


Step 2 Setting your /etc/fstab

Considering that your Windows (tm) partition is on /dev/hda1 and it is a FAT32 partition, the basic configuration for your /etc/fstab should be:

Code:

/dev/hda1   /mnt/c   vfat   defaults   0 0


where /dev/hda1 is the partition, /mnt/c the mountpoint where the partition will be available after mounting, vfat is the file system type, defaults is the option to be passed to mount, and 0 0 is related to file system integrity test (no test with 0 0). This will allow only root to enter, read or write /mnt/c or its contents. If you want to allow only a given user/group to access it, use the options uid and gid:

Code:

/dev/hda1   /mnt/c   vfat   defaults,uid=510,gid=610 0 0


will mount /mnt/c for the user with user id 510, and will set the group id for 610. But the default group permission is read-only, so users of the same group cannot enter the directory (because it is not set executable).

icon_exclaim.gif Options like "defaults,uid=510,..." are only separated by ",". A space or a tab will give a message like:

Quote:

[mntent]: line 16 in /etc/fstab is bad
mount: can't find /mnt/c in /etc/fstab or /etc/mtab


You can change permissions using the parameter umask. But be aware that it must be the bitmask of permissions that are not present for the mountpoint. It is an octal number, formed like this:

icon_arrow.gif first digit: permissions for everybody
icon_arrow.gif second digit: group permissions
icon_arrow.gif third digit: user permissions

The modes are as follows (the first column is the mode octal number):

Quote:

M | R W X
--------------------
0 | * * *
1 | * * -
2 | * - *
3 | * - -
4 | - * *
5 | - - *
6 | - * -
7 | - - -


For example, if you want that everybody be able to read, write, and execute every file in your /mnt/c, you should specify the mask 000:


Code:

/dev/hda1   /mnt/c   vfat   defaults,umask=000    0 0


If you want that only users from group 610 be able to read, write, and execute:

Code:

/dev/hda1   /mnt/c   vfat   defaults,gid=610,umask=707    0 0


If you want that only users from group 610 be able to read, and execute (not write):

Code:

/dev/hda1   /mnt/c   vfat   defaults,gid=610,umask=727    0 0


If you have a NTFS partition, change vfat to ntfs and add ro (read-only) to the option line:

Code:

/dev/hda1   /mnt/c   ntfs   defaults,ro      0 0


Evolution

The files needed (for backup) are in the evolution/local directory



Sitecopy
man page.......
http://www.lyra.org/sitecopy/cygwin/man-sitecopy.html#lbAB

(or simply - man sitecopy)

.sitecopyrc.....
site mysite
  server fisherfamily.orconhosting.net.nz
  username *******
  password *******
  local /home/robert/Shared/robert/my_web
  remote ~/fisherfamily.orcon.net.nz/htdocs/

Maintenance
sitecopy --update sitename (or for the above)....
sitecopy --update mysite


http://www.imagemagick.org/

To resize...
# convert -sample 80x40 input.jpg output.jpg
for multiple files....
mkdir new
for n in *; do convert -sample blabla $n new/$n; done
where that asterisk stands for any shell glob pattern you wish to use to
match the files to be converted (you can also use more than one pattern,
space-separated).

For example.....
mkdir new
for n in *jpg; do convert -sample 80x40 $n new/$n; done

or
for n in *jpg; do convert -sample 400x400 $n new/$n; done

Someone else suggested.....
for x in *.jpg; do convert -sample 80x40 $x ${x/.jpg/640x480.jpg}; done

To rotate...
convert -rotate -90 dscf0010.jpg 10.jpg


Album
http://marginalhacks.com/Hacks/album/

To create captions file -
ls > captions.txt
you get a file with the names of all the pics in the directory, then edit it
with your captions. do it with the browser viewing the pics, and a xterm
editing the file open at the same time.


WGET
try wget, it is a commandline tool, but don't be scared! It is very robust.
example:
wget http://www.microsoft.com/win2k.iso
if it stops part way through
wget -c http://www.microsoft.com/win2k.iso
-c = continue.
It will dump the file in your current directory.

I often cut and paste the file's URL into a terminal window to save a lot of retyping.

KDE SMB ioslave (http://docs.kde.org/en/HEAD/kdebase/kioslave/smb.html)

The smb ioslave enables you to browse the shares of a Windows® (or Samba) network.

To see the workgroups, enter smb:/.

smb:/a_workgroup will list the hosts in this workgroup.

To see the shares of a host, enter smb://the_host or smb:/a_workgroup/the_host.

To access a share directly enter smb://the_host/the_share or smb:/a_workgroup/the_host/the_share

The smb ioslave is a wrapper around the command line tool smbclient, which is part of the Samba package. This means you need to have Samba installed to use this ioslave.

To be able to authenticate to Windows® NT Domain Controllers, you need at least Samba 2.0. To access the shares of Windows® 2000 machines, you need at least Samba 2.0.7. To be able to write to Windows shares, you need at least Samba 2.2.4 or the patch from http://lisa-home.sourceforge.net/smbclientpatch.html.

You can set your default user name and password in the KControl in Network->Windows Shares. This is especially useful if you are a member of a Windows® NT domain. There you can also set your workgroup name, but in most cases this is not required.

This ioslave is tested and developed using mainly Samba 2.0.7, but other versions of Samba should work too.


Linux for Newbies: A Series for Beginners
http://www.northernjourney.com/opensource/newbies/

SCP

To copy a file from where you are working to a remote machine, the command is

$> scp <file> <username>@<remotehost>:{<directory>}

where <directory> is optional. If the directory is not given after the colon, the file will be saved in your home directory
The statement
$> scp foo.java blair@foo.clarku.edu:java
will save the file foo.java to my directory java/ on the machine foo.clarku.edu.

To retrieve a file from a remote machine, the order is reversed:

$> scp blair@foo.clarku.edu:java/foo.java ./java

will bring foo.java from the java directory on foo and save it to the java directory where I am giving the scp command. To save to the home directory the ./<dirname> is just a . /
Use -r for recursive copies e.g.
scp -r /localfile user@othercomputer:/otherfolder

System recovery with Knoppix
http://www-106.ibm.com/developerworks/linux/library/l-knopx.html?ca=dgr-lnxw


Various Linux Commands:-

cat /proc/bus/usb/devices
cat /proc/pci
cat /proc/modules
cat /proc/cpuinfo
cat /proc/ioports
cat /proc/sys/dev/cdrom/info
cat /proc/scsi/scsi

Link to Gentoo forum topic

To Display Messages as they occur

tail -f /var/log/messages


To find Default Gateway:-

route -n

netstat -rn


To Mount an iso image to see files....

mount -o loop -t iso9660 <isofilename> <mountpoint>


To see pci devices...
cat /proc/pci

To see Drives...
dmesg | grep hd
To find files or folders....
locate name
For case insensitvity use -i (locate -i filename)
locate name | less (e.g. locate icon | less)
locate name | most (e.g. locate icon | most)
locate name | grep another_name | most (e.g. locate icons | grep mozilla | most)
or
qpkg -l mozilla|grep icons|less

OR -  finding files with specific text......
find <dir> | xargs (z)grep <text> (
e.g. find /etc | xargs grep GENTOO_MIRRORS=)
(the z is used for zipped files)

devfs manual....
http://www.atnf.csiro.au/people/rgooch/linux/docs/devfs.html

updatedb &
& puts process in background, fg brings it back to foreground

cfdisk - for formatting and partitioning
Hit <ctrl><alt><backspace> to kill the X server.

Text editor as root
open shell
su -c 'kwrite file.ext'

To send messages to other PC's
smbclient -M computername

History
Command Meaning
$ history display a list of recent commands you have entered; the commands on this list are numbered
$ !! repeat the previous command
$ !n (where n is a number from your history list) repeat the command numbered n in your history list
$ !string (where string is a series of characters) repeat the most recent command in your history whose first characters match string


To redirect a list to a file

ls -a -R > ~/listname

or for ftp remote files I use:-
ls [remote directory] [local file]
or
ls [remote directory] ~/listname

Red Hat 8.0 for KDE Users (and Newbies)
http://www.osnews.com/story.php?news_id=1890

To add info to bash prompt, add the following line to end of ~/.bashrc file:-
PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]'

You could also edit the .bashrc in /etc/skel so when new users are added and
it uses that directory as the template, they get the new prompt.

Knoppix - changing root password
Open Konsole
Type su > Enter
Type passwd > Enter

Racer - http://www.racer.nl/

NZ Mirrors - http://www.wlug.org.nz/NewZealandLinuxMirrors


Macromedia Flash Player 6 for x86 Linux
http://macromedia.rediris.es/site_ri.html

Creating executable script file
create a text file with
#!/bin/bash
as the first line then just add the command-line stuff you want.
Then when you are finished do:
chmod +x filename
to make it executable

then hey presto you have a script ready to run.

Configuring X - tutorial
http://www-106.ibm.com/developerworks/edu/os-dw-linuxxwin-i.html


Backups with Linux and Rsync

http://www.mikerubel.org/computers/rsync_snapshots/

XDMCP (X Display Manager Control Protocol) and Cygwin
It will allow you to run a Linux desktop on one machine, and display it on another X Server (another Linux box or Cygwin XFree86).
Install Cygwin XFree86 (or Xorg) and edit startxdmcp.bat:

SET REMOTE_HOST=<the address of the remote linux box>

Edit kdmrc and enable XDMCP:

[Xdmcp]
Enable=true

Edit Xaccess and uncomment the following lines:
(to look like these...)

* #Any host can get a login window.
* CHOOSER BROADCAST #Any indirect host can get a chooser
* CHOOSER %hostlist #

I'm not sure what those lines mean or what security implications they may
cause.

Restart kdm with /etc/init.d/kdm restart

Run startxdmcp.bat on the Windows PC. It will start an X server on your
Windows PC and display a login prompt from your linux box. Once logged in
you will have your normal Linux desktop. The only things that are different
are that you can't use things like Alt-Tab, Alt-F4, Ctrl-Alt-Del and maybe a
few others.

GNU Info

Use the GNU Info system for wider and deeper explanations of commands.
For example, if you put the line:-
info:/tar
( Note that there is no trailing slash   '/'  on the end of the line )
into the Konqueror web browser, it will present you with a very detailed
tutorial and explanation of the use of the 'tar'  utility.

There is a short-cut into the info system. It is the double hash,
i.e putting:-
##tar
into Konqueror serves the same purpose as the info:/tar line.


My Etherboot notes:
3C905b-tpo100
for Etherboot version 5.0.11
NB - You also need to select the Configure button (at Rom-o-matic)
And tick
REQUIRE_VCI_ETHERBOOT

MythTV notes

Auto Start with Gentoo
we have tried two methods successfully but slightly different results.

The first (from link below) allows us to exit mythtv and X.
http://forums.gentoo.org/viewtopic-t-268192-highlight-autologin.html

Simply add: (USER = mythtv in my case)
su USER -c 'source /etc/profile;startx'
to /etc/conf.d/local.start
and add
mythfrontend
to ~/.xinitrc

The second method restarts X and mythfrontend when trying to escape.
(May be OK for inexperienced users so they do not accidentally turn it off)

Change /etc/inittab as follows:-

# TERMINALS
c1:12345:respawn:/sbin/agetty 38400 tty1 linux
c2:2345:respawn:/sbin/agetty 38400 tty2 linux
c3:2345:respawn:/sbin/agetty 38400 tty3 linux
c4:2345:respawn:/sbin/agetty 38400 tty4 linux
c5:2345:respawn:/sbin/agetty 38400 tty5 linux
c6:2345:respawn:/sbin/agetty 38400 tty6 linux
#comment out line above and uncomment line below for startx auto
#also have mythfrontend in /home/mythtv/.xinitrc
#c6:2345:respawn:/usr/bin/openvt -fwc 2 -- /bin/su - mythtv -c /usr/bin/startx
>& /dev/null
#c7:12345:respawn:/sbin/mingetty --autologin=mythtv tty7


Linux for Newbies: A Series for Beginners
http://www.northernjourney.com/opensource/newbies/

Screen
http://www.kuro5hin.org/story/2004/3/9/16838/14935

SuSE - YaST Online Update

To get over problem where YOU does not work the second time, alter the file
/etc/sysconfig/onlineupdate

#next line changed by Robert
YAST2_LOADFTPSERVER="no"

SuSE - LTSP howto
http://www.novell.com/coolsolutions/nnlsmag/features/a_ltsp_on_sles9_nls.html

Create your own Fortune files

In a plain text editor, write your quotes, separating each one with a percent
sign on its own line. For example:

Now is the time for all good men to come to the aid of their country.
%
You can lead a horse to water but you can't make it drink.
%
He who laughs last laughs loudest

Assuming you save this file as "myquotes," as root issue the command strfile
myquotes. That will create "myquotes.dat" and you will be able to randomly
select one of your quotes with the command fortune /path/to/myquotes.

Cron Howto
http://www.tech-geeks.org/contrib/mdrone/cron-howto.html

My cron notes (for vixie-cron)
gpasswd -a robert cron
nano -w /etc/cron.allow
nano -w /etc/cron.deny

crontab -u robert -e (as root)


File permissions
http://www.cae.wisc.edu/site/public/?title=linpermissions

Linux command library
http://linux.about.com/library/cmd/blcmdl.htm
http://www.mediacollege.com/linux/command/


UDev
Finding USB devices
use cat /proc/partitions

DHCP server for LTSP
Add
deny unknown-clients;
to /etc/dhcp/dhcpd.conf
so DHCP server does not overide IPCop DHCP server

KDE menu without mouse - Alt + F1

KDE Calendar and Contact files = std.vcf and srd.ics

Xrandr  (use to resize screen)
http://www.xfree86.org/4.4.0/xrandr.1.html#toc

xrandr -q   - to see options available e.g.
robert@beast ~ $ xrandr -q
 SZ:    Pixels          Physical       Refresh
*0   1280 x 1024   ( 332mm x 271mm )  *75
 1   1024 x 768    ( 332mm x 271mm )   75
 2    800 x 600    ( 332mm x 271mm )   75

then for example
xrandr -s 1

QEMU howtos

This is what I did (after some failures) on Mepis
Create the image....
qemu-img create -f qcow /home/robert/qemu/winxppro.img 6G
Install windows....
qemu -hda /home/robert/qemu/winxppro.img -cdrom /dev/cdrom -boot d -m 768 -localtime
I got a validation problem which was fixed with SP2 so I used the command below to boot into Safe Mode and then install SP2 after first creating an SP2 iso.
To create the iso....
mkisofs -o sp2.iso WindowsXP-KB835935-SP2-ENU.exe
(Press F8 straight after pressing "Enter" with the command below)
qemu -hda /home/robert/qemu/winxppro.img  -cdrom /home/robert/qemu/sp2.iso -boot c -m 768 -localtime
To run it....
qemu -hda /home/robert/qemu/winxppro.img -boot c -m 768 -localtime

https://help.ubuntu.com/community/WindowsXPUnderQemuHowTo
http://www.ubuntuforums.org/showthread.php?t=187413
http://gentoo-wiki.com/Windows
http://ubuntuforums.org/showthread.php?t=39513
http://wiki.archlinux.org/index.php/Qemu
http://www.linux.com/article.pl?sid=05/10/24/1845248

dict/words

Use for helping with Crosswords-
e.g.
robert@beast ~ $ grep '^re.dy$' /usr/share/dict/words
ready
reddy
reedy

Common New Zealand Internet Service Provider Settings

http://www.siliconlogic.co.nz/isps.htm

SSH on different port (normally 22)
For example - ssh ipcop -p 222

Wireless help - iwlist
http://linuxcommand.org/man_pages/iwlist8.html

"Starting sshd at boot time in Mepis"

--------------------------------------

To ensure that the Mepis ssh daemon starts at boot time do the following:

1) update-rc.d -f ssh remove
2) update-rc.d ssh defaults


Suse Specific stuff

My Sources:-

(Can be found in - /var/lib/zypp/db/sources/ )

http://ftp.iinet.net.au/pub/suse/Suse/update/10.2
ftp://mirrors.kernel.org/opensuse/distribution/10.2/repo/non-oss
ftp://mirrors.kernel.org/opensuse/distribution/10.2/repo/oss
http://ftp.riken.jp/Linux/suse/suse/update/10.2
ftp://ftp.gwdg.de/pub/linux/misc/suser-guru/rpm/10.2
http://mirror.pacific.net.au/linux/packman/suse/10.2
http://packman.iu-bremen.de/suse/10.2


osd_cat - On Screen Display

See Tux Magazine - Issue 14

For my email notification..

echo "New mail has arrived for Robert."  | osd_cat -d 8 -p middle -A center -f -*-courier-*-*-*-*-*-240


Festival

echo "I'm sorry Dave, I'm afraid I can't do that" | festival --tts
or
festival --tts atextfile.txt

Converting .rpm to .deb with alien

#1) open a konsole window
#2) type "su -"
#3) provide root password
#4) type "alien -d -v /path_to_where_rpm_file_is_saved/name_of_rmp_file.rpm" 

You have to run alien as root, otherwise you will be prompted that you have to do so. The "-d" option tells alien that it will convert the rpm file to a deb file (extension .deb). The "-v" option tells alien to display output as to what happens during the conversion of the rpm file to a deb file. The "-v" option is well, optional. If you do not supply it, you will be informed at the end of the conversion that it has completed.
#5) upon file conversion completed, type "exit" to exit root account and yet "exit" again to exit the konsole window.
#6) navigate to where the deb file was created. It should be located in the /home/user_name path. It will display the logo of Debian and have a similar name to the original rpm file. (In my case it was placed in /root/)
#7) click on the deb file. KPackage will open showing details of the deb file. If this does not happen, use "dpkg -i name_of_deb_file.deb" from within a konsole window. I think that is the correct syntax but I rarely use konsole window to install packages that way so, I am not sure about the corectness of the syntax.
#8) from within KPackage, click on Install to proceed with the installation.
#9) when prompted, supply the root password.


Converting_from_or_to_Debian

http://gentoo-wiki.com/TIP_Converting_from_or_to_Debian


Webcam on Mepis - Logitech Quickcam Chat for Skype

I've installed the gspca1 drivers pack (from this page, direct download for kernel up from 2.6.11) using the gspca_build script provided.

http://www.mepislovers.org/forums/showthread.php?t=1416


How to create Image (ISO) files from CD/DVD

Assuming that /dev/cdrom is the location of CD/DVD-ROM
sudo umount /dev/cdrom
readcd dev=/dev/cdrom f=file.iso

 To test pop3 use telnet:

   telnet pop3.xtra.co.nz 110
   user xxxx
   pass yyyy
   list
   quit

Sound (MP3) previews in Konqueror on Mepis
Needs both libxine-extracodecs and libarts1-xine

To set up my USB Portable Hard drive enclosure.
Create ntfs partion with
cfdisk /dev/sdc

Format ntfs partition with
mkfs.ntfs /dev/sdc1 -L portable (portable = volume name)

Mount drive (writable) with
mount -t ntfs-3g /dev/sdc1 /mnt/usbdrive/ -o force
(Having first created folder /mnt/usbdrive)
or for my pocket drive.....
mount -t ntfs-3g /dev/sdc5 /mnt/usbpocket/ -o force

My bak backup......
root@beast:~# rsync -urC --delete /mnt/bak/ /mnt/usbpocket/bak/


Public Keys (for Mepis 7 - Debian Etch)

Virtualbox
The innotek public key for apt-secure can be downloaded here. You can add this key with
apt-key add innotek.asc

Opera
gpg --keyserver subkeys.pgp.net --recv-key 6A423791
gpg --fingerprint 6A423791
gpg --armor --export 6A423791| apt-key add -

Power switch shutdown in KDE

- as root, edit /etc/powersave/events
- find the line EVENT_BUTTON_POWER="" and change to
EVENT_BUTTON_POWER="wm_shutdown"
- save file
- restart powersave (as root: /etc/init.d/powersaved restart)

The powersave daemon takes care of acpi events. The wm_shutdown action
will kick off a KDE shutdown process, with the advantage of it asking you
to save open files before shutdown and nicely closing the KDE session.

Mepis Multimedia howto....

http://www.sblinux.org/pages/mepis-media01.html

To see default gateway....

$ /sbin/route -n

From a terminal you can use either 'route -n' or 'ip route show'

netstat -rn

Firefox 3 Scroll wheel problem
my fix was to add a line to xorg.conf

Section "InputDevice"
Identifier "PS/2 Mouse"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "false"
Option "Emulate3Timeout" "70"
Option "ZAxisMapping" "4 5"
Option "ButtonMapping" "1 2 3 4 5"
Option "Buttons" "5"
EndSection

To open Thunderbird hyperlinks in Firefox...
1. Open Preferences, goto the Advanced tab and choose Config Editor.
2. Right-Click > New > String
3. network.protocol-handler.app.http
4. /usr/bin/firefox

Do it again adding an "s" to the first string for https and you should be good to go.