“Slackware is one of the oldest Linux distributions out there. And over the years, it has consistently kept pace with the changes.”
linuxhelp.blogspot.com
Tag Archives: linux
Changing default permissions
Change the default permissions for your installation by editing the value for umask in /etc/profiles and /etc/login.defs.
lists.ubuntu.com
Setting the time zone
Set the local time zone with the following command:
user@ubuntu:~$ sudo tzconfig
Redirecting mail for the local root user
This post has been updated.
Thoughts on moving from Debian to Ubuntu Server
“If Canonical keeps its update schedule and support commitments along with the legendary Debian robustness, we may have a keeper.” Staff at Advosys Consulting are considering Ubuntu for entirely practical reasons.
www.advosys.ca
Public/private key authentication with SSH
SSH is a protocol that enables secure logins to your computer over a network. SSH supports the use of public/private key pairs for user authentication. Private keys are kept locally, while public keys are stored on the remote machine.
On the Local Machine
Use the command ssh-keygen -t dsa to generate a key pair for the local user. Use an appropriate passphrase to secure your private key (don’t be tempted to use an empty passphrase).
Set the permissions for the private key file with the following command:
user@ubuntu:~$ chmod 600 ~/.ssh/id_dsa
On the Remote Machine
Get the necessary packages with the following command:
user@ubuntu:~$ sudo apt-get install ssh
Copy the public key file ~/.ssh/id_dsa.pub from the local to the remote machine.
On the remote machine, move and rename the file with the following command:
user@ubuntu:~$ mv id_dsa.pub .ssh/authorized_keys2
Set the permissions for the file with the following command:
user@ubuntu:~$ chmod 600 ~/.ssh/authorized_keys2
Add the user user to the group ssh:
user@ubuntu:~$ sudo adduser user ssh
Get the file sshd_config and move it to /etc/ssh/:
user@ubuntu:~# sudo wget "http://edafe.org/wp-content/uploads/2006/09/sshd_config"
user@ubuntu:~# sudo mv sshd_config /etc/ssh/
The downloaded file contains the following changes from the Ubuntu default configuration:
LogLevel VERBOSE
AllowGroups ssh
LoginGraceTime 20
PermitRootLogin no
MaxAuthTries 1
RSAAuthentication no
PasswordAuthentication no
X11 Forwarding no
TCPKeepAlive yes
ClientAliveInterval 15
ClientAliveCountMax 3
MaxStartups 3
UsePAM no
Setting these options makes root logins impossible. Only users belonging to the group ssh may establish a connection. Access to the remote machine is strictly tied to the private key and the passphrase used to encrypt it.
Next, restart the SSH server on the remote machine with the following command:
user@ubuntu:~$ sudo /etc/init.d/ssh restart
You should now be able to log into the remote machine using the private key stored on the local machine:
user@ubuntu:~$ ssh remote.machine
Enter passphrase for key '/home/user/.ssh/id_dsa':
The book SSH The Secure Shell by Daniel Barrett, Richard Silverman and Robert Byrnes is useful as a reference text and has information on other clever stuff you can do with SSH.
www.ibm.com/developerworks/linux/
Bash guide for beginners
“This is a practical guide which tries to give real-life instead of theoretical examples.” By making her book available for online reading, Machtelt Garrels introduces you to the wonders of task automation under Linux.
www.tldp.org
Open Source Ubuntu
“Ubuntu has been the most popular distro of Linux since 2005, and since I made the switch last year those tearful evenings in front of the computer screen have become a distant memory.” Becky Hogges describes how Ubuntu has put a smile back on her face.
www.opendemocracy.net
GNU Bash reference manual
“This manual is the definitive reference for GNU Bash, the standard GNU command-line interpreter. It covers the current major release of Bash (2.x).” Written by Chet Ramey and Brian Fox, the original developers of GNU Bash, the book is also available for online reading.
www.network-theory.co.uk
Ubuntu Dapper: ready for the long haul
“Overall, I’ve found Ubuntu 6.06 LTS to be a solid operating system. It’s easy to use, has a great selection of software available, and generally ‘just works’.” Joe Brockmeier reviews Ubuntu 6.06 Long Term Support.
www.linux.com
OOo off the wall
OpenOffice.org is a multi-platform application. These articles, written by Bruce Byfield for Linux Journal, are also applicable to OpenOffice.org installations on other platforms.
Setting up page styles in OOo Writer, Bullet proof templates, Style is everything, right?, Fonts of wisdom, Building characters, Shooting the sun, Paragraph styles, Part II, It’s numbering, but not as we know it, Getting in the frame, The outlining and the ecstasy, Macros and add-ons, Floating windows, My objects all sublime, ToCs, indexes and bibliographies in OOo Writer, Fielding questions Part 1 Part 2 Part 3 Part 4, Tabling the notion Part 1 Part 2, Recovering hidden treasures, Back to school with bibliographies, Adding AutoText to your work flow, Domesticating Autocorrect, Master documents, Find and replace, That’s your version-document control in OOo Writer, Paragraph and page spacing, Automating the creation of slide shows, Using master slides, Extensions for OOo Draw, Template collections, New add-ons for OOo Writer, Text flow in OOo Writer, Basic arithmetic and statistic functions, Creating business cards, Rounding off numbers, Pivot tables by another name, Writer’s tools, Extensions for OOo Impress’s tools, Manipulating lists in OpenOffice.org Calc
Filesystem Hierarchy Standard
The Filesystem Hierarchy Standard (FHS) consists of a set of requirements and guidelines for file and directory placement under UNIX-like operating systems. Use this reference to maintain compliance of your Linux system with the FHS.
www.pathname.com
VDR
VDR stands for Video Disk Recorder, the outstanding software project by Klaus Schmidinger. VDR turns a PC equipped with suitable hardware into a digital receiver and timer-controlled video disk recorder. Its features include time-shifting and on-disk editing of the recordings. Support for the different types of DVB standard is dependent on the hardware employed to receive the broadcast signal(s). This means that, given the right kind of receiver card(s), VDR will work with cable, satellite and terrestial television.
www.tvdr.de
Building the Freeview VDR
These instructions are intended to help you build a system that will receive both digital terrestial and satellite transmissions. Personally, I use a setup that enables me to watch and record broadcasts on Freeview, the terrestial service here in the United Kingdom, and Astra 19.2° East, a satellite transmitting to the whole of Europe. Some of the most frequently asked questions about the Freeview VDR are answered on a separate page.
In addition to an aerial and a satellite dish, you require a PC equipped with a large enough hard drive to store your recordings. Keep in mind that a one hour recording will take up approximately 1.5 GB of disk space.
You also need one DVB-S card of the type TechnoTrend Premium S, one DVB-T card of the type TechnoTrend Budget T and the ATI Remote Wonder remote control. You should also have a working broadband connection accessed from behind a router/firewall.
Installing Slackware
Slackware Linux is ideal for the purpose: It is easy to install and very dependable. Download the file slackware-10.2-install-d1.iso from one of the Slackware mirrors and burn the ISO image to disk. Alternatively, you can help support Slackware and the effort that goes into it by ordering your set of CDs from The Slackware Store.
Install Slackware with: a) a swap partition that is equal in size to that of the installed RAM, b) a root partition of 3 GB, and c) a /video partition taking up all of the remaining disk space. Select the software sets a, ap, d, k, l and n for installation. Configure a network interface with access to the internet. Set the system time to synchronise with NTP.
Add the user vdr, with the default group video and a home directrory located at /etc/vdr. Finish by changing the owner and group of /video:
darkstar:~# chown -R vdr.video /video/
Installing the Drivers
The Linux driver for the DVB-S card requires that the file Sc_main.mc, which is distributed as part of the TechnoTrend driver for Windows, be located in /usr/lib/DVB/driver/frontends.
Start by downloading the driver for the TechnoTrend Premium S card and unzipping the archive file:
darkstar:~# lftp -c "get http://www.technotrend.de/new/217g/tt_Premium_217g.zip"
darkstar:~# unzip tt_Premium_217g.zip
Use the following set of commands to place a copy of SC_MAIN.MC in /usr/lib/DVB/driver/frontends:
darkstar:~# mkdir -p /usr/lib/DVB/driver/frontends
darkstar:~# cp software/OEM/HE/App/boot/SC_MAIN.MC /usr/lib/DVB/driver/frontends/Sc_main.mc
If you are using the TechnoTrend Budget T card, download the required firmware and place a copy in /etc/dvb:
darkstar:~# lftp -c "get http://www.edafe.org/vdr/firmware/tda1004x.mc"
darkstar:~# mkdir /etc/dvb
darkstar:~# cp tda1004x.mc /etc/dvb/
Continue by downloading the Linux-DVB driver source and unpacking the tarball:
darkstar:~# lftp -c "get http://linuxtv.org/downloads/linuxtv-dvb-1.0.1.tar.gz"
darkstar:~# tar -zxvf linuxtv-dvb-1.0.1.tar.gz
Move the resulting directory to /usr/local/src/, renaming it to DVB:
darkstar:~# mv linuxtv-dvb-1.0.1 /usr/local/src/DVB
Change to the DVB directory, build the drivers and then run the makedev.napi script:
darkstar:~# cd /usr/local/src/DVB/
darkstar:/usr/local/src/DVB# make
darkstar:/usr/local/src/DVB# driver/makedev.napi
Change to the driver directory and run the command make insmod while observing the TV-output of your DVB-S card:
darkstar:/usr/local/src/DVB# cd driver/
darkstar:/usr/local/src/DVB/driver# make insmod
If the driver installed successfully, this message will appear and then fade:
(C) 2001 Convergence integrated media
Scanning for Satellite Channels
Check the dvb-s directory to see what configuration files are available and determine which one to use:
darkstar:~# ls /usr/local/src/DVB/apps/scan/dvb-s/
Run the following set of commands, replacing Astra-19.E as necessary:
darkstar:~# cd /usr/local/src/DVB/apps/scan/
darkstar:/usr/local/src/DVB/apps/scan# ./scan -o vdr dvb-s/Astra-19.E > /etc/vdr/sat.conf
Scanning for Terrestial Channels
Download the source for Winfried Köhler’s w_scan application and unpack the tarball:
darkstar:/usr/local/src/DVB/apps/scan# cd ~
darkstar:~# lftp -c "get http://free.pages.at/wirbel4vdr/w_scan/w_scan-20060729.tar.bz2"
darkstar:~# tar -xjf w_scan-20060729.tar.bz2
Move the resulting directory to /usr/local/src/, renaming it to WSCAN:
darkstar:~# mv w_scan-20060729 /usr/local/src/WSCAN
Use the pre-compiled version of w_scan that is included in the tarball to scan for available DVB-T channels:
darkstar:~# /usr/local/src/WSCAN/w_scan -o2 ›› /etc/vdr/ter.conf
Generating Channels.conf
Employ cat to create a single channels.conf file:
darkstar:~# cd /etc/vdr/
darkstar:/etc/vdr/# cat sat.conf ter.conf › channels.conf
If you are only using a single input source, rename either sat.conf or ter.conf to channels.conf.
Installing VDR
Continue by downloading the VDR source and unpacking the contents of the tarball:
darkstar:/usr/local/src/DVB/apps/scan# cd ~
darkstar:~# lftp -c "get ftp://ftp.cadsoft.de/vdr/vdr-1.2.6.tar.bz2"
darkstar:~# tar -xjf vdr-1.2.6.tar.bz2
Move the resulting directory to /usr/local/src/, renaming it to VDR:
darkstar:~# mv vdr-1.2.6 /usr/local/src/VDR
Change to the VDR directory and copy the configuration files to /etc/vdr/:
darkstar:~# cd /usr/local/src/VDR/
darkstar:/usr/local/src/VDR# cp keymacros.conf sources.conf svdrphosts.conf svdrpsend.pl /etc/vdr/
darkstar:/usr/local/src/VDR# chown vdr.video /etc/vdr/*
Build the VDR application with support for Linux Infrared Remote Control:
darkstar:/usr/local/src/VDR# make REMOTE=LIRC VFAT=1 NO_KBD=1
Download this version of runvdr, preconfigured to work with your installation:
darkstar:/usr/local/src/VDR# lftp -c "get http://www.edafe.org/vdr/sh/runvdr"
darkstar:/usr/local/src/VDR# chmod +x runvdr
Download rc.vdr and move it to /etc/rc.d/:
darkstar:/usr/local/src/VDR# cd ~
darkstar:~# lftp -c "get http://www.edafe.org/vdr/sh/rc.vdr"
darkstar:~# chmod +x rc.vdr
darkstar:~# mv rc.vdr /etc/rc.d/
Add the following lines to the end of /etc/rc.d/rc.local for VDR to start at boot:
# Starting VDR
if [ -x /etc/rc.d/rc.vdr ]; then
echo "Starting VDR"
/etc/rc.d/rc.vdr &
fi
Restart your computer and observe the TV-output of your DVB-S card. You should now be viewing the first channel listed in your channels.conf file.
Installing LIRC
Connect the USB receiver for the ATI Remote Wonder to your VDR. Download lircd.conf, preconfigured with the settings for the ATI Remote Wonder, and place it into /etc/.
darkstar:~# lftp -c "get http://www.edafe.org/vdr/conf/lircd.conf"
darkstar:~# mv lircd.conf /etc/
Continue by downloading LIRC source and unpacking the contents of the tarball:
darkstar:~# lftp -c "get http://www.edafe.org/vdr/tar/lirc-0.7.2.tar.bz2"
darkstar:~# tar -xjf lirc-0.7.2.tar.bz2
Move the resulting directory to /usr/local/src/, renaming it to LIRC:
darkstar:~# mv lirc-0.7.2 /usr/local/src/LIRC
Change to the LIRC directory and launch the LIRC installer with:
darkstar:~# cd /usr/local/src/LIRC/
darkstar:/usr/local/src/LIRC# ./setup.sh && make install
Choose the following options:
1 Driver configuration > 8 USB devices > 1 ATI RF Remote
2 Software configuration > no selection
3 Save configuration & run configure
Set the permissions for the device /dev/lircd with:
darkstar:/usr/local/src/LIRC# chmod 666 /dev/lircd
Add the following lines to /etc/rc.d/rc.local, before the entry for VDR, to start LIRC at boot:
# Starting LIRC daemon
if [ -x /usr/local/sbin/lircd ]; then
echo "Starting LIRC"
/usr/local/sbin/lircd
fi
Restart your computer and observe the TV-output of your DVB-S card. You should now see the following message:
Learning Remote Control Keys (LIRC)
Phase 1: Detecting RC code Type
Press any key on the RC unit
Follow the instructions of the OSD to define the keys for the remote control.
Documentation
VDR Wiki
In English and German
Online reference covering many aspects of the VDR. Useful if you want to further expand the functionality of your Freeview VDR or learn about other options for setup.
www.vdr-wiki.de
Help
VDR Portal
In English and German
Interact with other VDR users to help with your questions.
www.vdrportal.de
CLI magic: daily aliases
“GNU programs are rife with additional options. Some of these options are so useful you may want to create an alias.” Keith Winston manages to save a lot of time working at the shell.
www.linux.com
An old hacker slaps up Slackware
“Slackware is not for everyone. But it is a distribution that nearly everyone should try some day, for several reasons.” Joe Barr has used many different Linux distributions over the years. Until recently, he has never tried Slackware.
www.linux.com
Slackware 10.2 tips
“Writing a tips article is tricky. Veteran users want incredibly good tips. New users want tips that bring accessibility and understanding to Slackware. Find that balance here.”
www.dualisanoob.com
What is the X window system?
“Most people today run one of the desktop environments, KDE or GNOME. But if you look underneath, you’ll find the X Window System managing the display and you’ll find a window manager sitting between X and the desktop.” Ellen Siever sees through the X Window.
www.linuxdevcenter.com
Securing Linux
RAID-1
Slackware Linux 101
Joe Brockmeier explains how Slackware initialises services, what the various runlevels are and how to add or remove services from the default install.
www.ibm.com