Continuing with Slackware
March 27, 2008
Here, I intend to put across how to use Slackware for almost everything we do normally using Windows. Assuming that Slackware 11 or Slackware 12 is installed all you see initially is a login prompt. Here you login into the system as root (or as another user if you have already created one) with the corresponding password. To use the GUI which is usually KDE or GNOME type at the prompt
startx
This will load the X window system for use. If you want a GUI login as in case of most of the linux distro’s like debian and ubuntu then you need to edit the /etc/inittabb file as follows: Find a line in the file which says -
# Default runlevel. (Do not set to 0 or 6)id:3:initdefault:
then edit this line to
id:4:initdefault:
Now reboot the system. The GUI login for your system is configured.
Creating users: It is recommended that we login to the system as a user rather than as ‘root’. To create a user all you need to do is go to the console or terminal program and issue this command (being the ‘root’)
useradd –m
This will create a new user with the name and create a home directory for the new user. The command <pre>adduser</pre> can also be used to create a user. However it will not create a home directory for the user. Creating a home directory for a user is essential if the new user wants to use the X windows system. The password to the new user can be added with the command
passwd
new password: *** re-enter password: *** Having created a user, we need to configure the X windows system for the user to use the GUI. This can be done as follows. Assuming we have logged in as the user created type at the prompt
su
to switch user to root. It will ask for a password which is root’s password.
password: *****
-root’s password. It will return a hash prompt which is usually for the root. Now issue the command <pre>.xwmconfig</pre> This returns a menu listing all the desktop environments. Select a desktop environment you need (like KDE or GNOME) and hit enter. The prompt is returned. Now type
exit
to revert back to the user. That is it, GUI is configured for the user. One of the first things you will realise while using X window systems is that the scroll wheel of the optical mouse does not work. This can be set right in a number of ways but I prefer editing a file ‘xorg.conf’ in /etc/X11 directory. All you need to do is to find a section in the file called ‘mouse’ under the main heading ‘Input devices’ and add these three lines
option “Protocol” IMPS/2
option “Buttons” “5” option “ZAxisMapping” “4 5” Restart X and mouse will be configured to scroll.
Mounting Volumes: Normally most of us will have first used windows and then migrated to Linux. We obviously would like to access drives from windows in our Linux system. This can be done by modifying a file called ’fstab’ in /etc directory. Initially find out the names of the drives on your windows system. This can be done by issuing the command cfdisk in the terminal. You will get a table listing all the drives present on your hard disk along with their names (which will be ‘sda’ or ‘sdb’ if you have multiple hard disks). Determine the names of the volumes you want to mount. Now edit the ‘fstab’ file by including entries for new volumes. Ex: Suppose the name of the volume is window is sda1 and belongs to file system FAT32 you need to add an entry in the ‘fstab’ file as
/dev/sda1 /windows/c vfat defaults 1 0
The second column (/windows/c) is called the mount point. It indicates where in your file system that particular volume is mounted. Edit the file similarly to mount all volumes. On Slackware 11 there is no auto mount feature for USB pendrives we use. To use it, create a directory in /mnt as
mkdir /mnt/pendrive
After you connect the pen drive to the USB port, execute the command fdisk -l. The last line in it’s output will refer to the newly connected USB drive. Look at that entry about where the drive is installed. It will usually be /dev/sdb. To mount it, issue this command.
mount /dev/sdb /mnt/pendrive
The name of the USB drive (mentioned as sda) varies from system to system. If you are using slackware 12 then no problems at all. It has an auto mount feature for USB drives.
Configuring sound: The sound settings will not be configured implicitly when Slackware is installed. It has to be done manually through
alsaconf
This searches for sound hardware and installs it. If you are using 4 channel speakers you need to set the sound settings for the same. This can be done through <pre>alsamixer</pre>. This is a graphical menu through which you can browse and set the channels easily. Sometimes a sound card may not be detected at all. This means that the sound driver was not installed properly during Slackware installation. To set this right put in CD1 (of Slackware 11) or the dvd (of Slackware 12) and issue this command at terminal
upgradepkg –reinstall /mnt/cdrom/slackware/l/alsa-driver-/.0.11_2.4.33.3-i486-/.tgz
Run alsaconfig after this to configure.
Installing applications: On a Linux system we install applications from the source i.e. , when you download or get an application for the Linux system all you get is the source codes for that application. You need to compile it on your system thereby allowing it to configure itself for your hardware to get optimal performance. Usually on Slackware, the set up files come as .tar.gz or .tar.bz2 files. You will need to extract them through these commands
tar –xzvf “filename”.tar.gz
tar –xjvf “filename”.tar.bz2
Now browse to the folder created using cd and issue
./configure
After the prompt is returned issue
make
This process usually takes a lot of time. After this is done issue
make install
After this is done the installation is complete.
For daily use on Slackware you can use these programs CD/DVD-burning: k3b (comes inbuilt in slack12) Movie downloads: ktorrent (needs to be installed separately) Video players: mplayer (needs to be installed separately) Audio players: amarok. The best way to install packages is to use the package manager. Now, many may be aware of the package managers available for other linux distro’s (like for Fedora there is yum and for Ubuntu there is synaptic package manager). There exists a package manager for Slackware too. All the applications for Slackware can be downloaded from www.linuxpackages.net. The applications have the extension .tgz. All you have to do is to download the application (which is in .tgz format) and install it through the command
installpkg filename.tgz
This automatically installs all files in the specific system directories. This way you will be spared from changing the PATH variables and other similar changes you have to usually make. One useful application you can install is the SLAPTGET. This application manages all the packages of Slackware. If you have this package installed then you can directly search for any applications you want from the terminal. Like for example if you want to installa a new media player, say mplayer, all you need to do is issue the following command on the terminal
slaptget --install mplayer
If the application is not already downloaded use can use
slaptget --download mplayer
For those who are not very comfortable with using the terminal, there exists a front end for the Slackware package manager called <pre>xpkgtool</pre> which can be downloaded in the .tgz format and installed as explained above.
HAPPY ‘SLACK’ING !!