Sunday, May 31, 2009

Slackpkg



slackpkg is a Slackware tool for installing or upgrading packages through a network. If you did only base Slackware installation consisting slackpkg, you can complete remaining packages through network. Latest Slackware stable version 12.2 is shipped with slackpkg in main tree.

Before using slackpkg, you need to choose a suitable mirror for your location and distribution editing /etc/slackpkg/mirrors file. Open /etc/slackpkg/mirrors file as root, uncomment the right mirror for you and save file.

Executing following commands as root updates entire system.

# slackpkg update
# slackpkg install-new
# slackpkg upgrade-all

For more information read slackpkg documentation page.

Slackware Package Management



Slackware Linux Essentials, Chapter 18
Slackware Linux Basics, Chapter 17

Good bye *.tgz, Welcome *.txz!

Fri May  8 18:49:03 CDT 2009
Hello folks! This batch of updates includes the newly released KDE 4.2.3,
but more noticeably it marks the first departure from the use of gzip for
compressing Slackware packages. Instead, we will be using xz, based on
the LZMA compression algorithm. xz offers better compression than even
bzip2, but still offers good extraction performance (about 3 times better
than bzip2 and not much slower than gzip in our testing). Since support
for bzip2 has long been requested, support for bzip2 and the original lzma
format has also been added (why not?), but this is purely in the interest
of completeness -- we think most people will probably want to use either
the original .tgz or the new .txz compression wrappers. The actual
Slackware package format (which consists of the layout within the package
envelope) has not changed, but this is the first support within Slackware's
package tools for using alternate compression algorithms.
Some people have asked why we don't pick a single extension, such as
.slk. While there's certainly a case to be made for that idea, the tools
would still need to support .tgz to handle older packages. Sticking with
".tgz" for everything makes no sense. Using extensions that reflect the
compression format used by the package envelope seems to be the most
transparent approach, and the one that best follows tradition.
As an example of the compression improvement with .txz, have a look
at the kernel-source package:
Before: kernel-source-2.6.29.2_smp-noarch-1.tgz (73808508 bytes)
After: kernel-source-2.6.29.2_smp-noarch-1.txz (49150104 bytes)
The size of the main package tree in /slackware has been reduced from
1.9GB to 1.4GB by converting most packages to .txz.
Most of the packages have been converted from .tgz to .txz, but we
will continue to make the gzip, pkgtools, slackpkg, tar, and xz packages
in .tgz format for the foreseeable future.
Enjoy! And thanks to Lasse Collin for the great work on xz. :-)

Source:ftp://ftp.slackware.com/pub/slackware/slackware-current/ChangeLog.txt

Changing LILO Boot Screen Resolution

It is possible to change size of LILO console fonts when booting Slackware. You can set VGA text mode by simply editing /etc/lilo.conf file.

Open lilo.conf file as root with your favorite text editor.

# nano /etc/lilo.conf

Comment default vga mode with "#" in the "LILO global section" and add folowing uncommented line to the "LILO global section".

vga = x

Decimal x values (VGA Modes) listed in below table. Replace x with a suitable decimal number from the table and save lilo.conf file.

Finally execute following commands as root.

# lilo
# reboot

Here is a sample part of lilo.conf file

...

# Append any additional kernel parameters:
append=" vt.default_utf8=1"
prompt
timeout = 50
vga = 795
# VESA framebuffer console @ 1024x768x256
# vga = 773
...



Slackware the oldest surviving Linux distribution!

Slackware is the oldest Linux distribution that is still actively maintained and supported. It was released in 1993, shortly after the the release of its parent SLS (Softlanding Linux System).

This is a cladogram of GNU/Linux distributions, placed on a timeline.


Image Source: http://futurist.se/gldt/

SlackBuilds.org



The SlackBuilds.org project is maintained by a small group of people, but we want the scripts in our repository to be representative of the entire Slackware user community. There's no way that the few of us can possibly write scripts for all of the extra applications that users want to have, so we depend on YOU to help us out. If there's some application that you use, and we don't have it in our repository already, please consider writing a build script for it and submitting it to us for possible inclusion - see the Submissions page.

One of the frequent criticisms of Slackware is the lack of official packages available. While the official package set provides a good, stable, and flexible operating system (and is quite adequate for many individuals), the fact remains that many users want/need quite a few additional applications in order for it to meet their needs. There are a few well-known third party package repositories, but many users justifiably do not want to install untrusted packages on their systems. For those users, the traditional solution has been to download the source code for desired applications and compile them manually. This works, but introduces another set of problems associated with managing those applications; version updates and such require more of the admin's time than precompiled packages, and lack of notes will often mean that the admin forgot which configure flags were used earlier (as well as any other special issues encountered).

In our opinion, the best solution to this problem is for the admin to automate the compile process using a SlackBuild script. Patrick Volkerding, the maintainer of Slackware, uses SlackBuild scripts to compile the official packages, so it makes sense for us to use the same idea for extra applications we want to add.

Our goal is to have the largest collection of SlackBuild scripts available while still ensuring that they are of the highest quality - we test every submission prior to inclusion in the repository. We do not now nor will we ever provide precompiled packages for any of the applications for which we have SlackBuild scripts - instead, we want the system administrator (that's you) to be responsible for building the packages.


SlackBuild Usage HOWTO

Caveat

All of our scripts are written for usage on the latest stable release of Slackware; if you're trying them on older versions of Slackware, you should read this page referenced in our FAQ.

Step 1 - Download

Download the SlackBuild archive of the application you wish to build and extract it in your build environment. For example, after extracting the chemtool.tar.gz archive, you should have the following directory tree:

./chemtool
|-- README
|-- chemtool.info
|-- chemtool.SlackBuild
|-- chemtool.desktop
|-- chemtool.png
|-- slack-desc

Anonymous ftp access is available via ftp://ftp.slackbuilds.org if that's more convenient for you.

Next, download the source of the application from the address listed in the chemtool.info file and place it in the chemtool directory listed above. There is also a direct link to the source tarball on each application's page within our repository.

Step 2 - Edit SlackBuild script if necessary

If the version of chemtool is newer than what is specified in the SlackBuild script, you will need to change the script accordingly. Using your preferred editor, open the chemtool.SlackBuild script and find the line which starts with "VERSION"

VERSION=1.6.7

Change this line to reflect the current version of the chemtool source.

  • If a newer version of some application does not compile correctly with a simple change of the "VERSION" string, let us know by following the instructions on reporting SlackBuild Bugs.

Step 3 - Execute the SlackBuild Script (as root)

If necessary, make the script executable with chmod and then run the script:

chmod +x chemtool.SlackBuild
./chemtool.SlackBuild

Step 4 - Install the Package

Assuming everything happened according to plan (the compile finished without errors), the finished package should be in the directory declared as "OUTPUT" in the SlackBuild script (this defaults to the /tmp directory). Use installpkg to install it; you'll probably want to move it to some other location for safekeeping after it's installed.

Other Resources

For more information on using, editing, and creating SlackBuild scripts, have a look at these and other tutorials at SlackWiki.org.

Source: http://www.slackbuilds.org/howto/

Adding Users to Sudoers File

Users can execute commands that are usually restricted to the root account using sudo program. The sudo configuration file is /etc/sudoers.

Open /etc/sudoers file with your favorite text editor as root, then remove comment character, #, in front of line "%wheel ALL=(ALL) ALL" and save.

# visudo

or

# nano /etc/sudoers


...
# Uncomment to allow people in group wheel to run all commands
# %wheel ALL=(ALL) ALL

...

Change above line as in below and save file.
...
# Uncomment to allow people in group wheel to run all commands %wheel ALL=(ALL) ALL
...

You need to add your user name to group wheel also.


# gpasswd -a user wheel

(Replace user with your user name)

Now you can execute some privileged commands using sudo as user without becoming root with su. For example it is possible to edit system file inittab as user executing below command.

# sudo nano /etc/inittab

Picture source: http://xkcd.com/149/

Slackware Runlevels

Slackware Linux uses runlevel 1 for maintenance, as on other Linux distributions; runlevels 2, 3 and 5 identically configured for a console (with all services active); and runlevel 4 adds the X Window System.


Source: http://en.wikipedia.org/wiki/Runlevel#Slackware_Linux

To change runlevel, we need to edit inittab file as root.

# nano /etc/inittab
...
# These are the default runlevels in Slackware:
# 0 = halt
# 1 = single user mode
# 2 = unused (but configured the same as runlevel 3)
# 3 = multiuser mode (default Slackware runlevel)
# 4 = X11 with KDM/GDM/XDM (session managers)
# 5 = unused (but configured the same as runlevel 3)
# 6 = reboot

# Default runlevel. (Do not set to 0 or 6)
id:3:initdefault:

...

For graphical login, replace "id:3:initdefault:" with "id:4:initdefault:".

Adding Users to Groups

Users must be added to cdrom, audio, video, scanner, plugdev and power groups. To achieve this run below command as root for each group.

# gpasswd -a user group

For example;

# gpasswd -a ertan plugdev

adds user ertan to group plugdev.

Manually editing /etc/group file as root, one can add one or more users to a specified group also.

# nano /etc/group

...

audio:x:17:root,user1,user2
video:x:18:root,user1,user2
cdrom:x:19:root,user1,user2

...


* It is seen that user1 and user2 are the members of audio,video and cdrom groups.

Sound Configuration

Slackware shipped with ALSA (Advanced Linux Sound Architecture) package.
Be sure /etc/rc.d/rc.alsa is executable, then run alsaconf utility as root to configure your sound card.

# alsaconf



Start ALSA service by:

#
/etc/rc.d/rc.alsa start

Adjust volume levels using command line mixer alsamixer.

$ alsamixer



Run alsactl store as root to store volume levels for next boots.

# alsactl store

Creating User Accounts

Run adduser utility as root for adding new users to system.

# adduser user_name

Replace user_name with desired user name.

To delete an existing user, run userdel utility as root.

# userdel user_name

Adding "-r" option to userdel, user's home directory removed also.

Saturday, May 30, 2009

X Configuration

/etc/X11/xorg.conf is the file where X11 configuration is stored. X11 provides tools (X -configure, xorgsetup, xorgconf and xorgcfg) for configuring X on Slackware. X- configure is preferred for inexperienced users, because it automatically generates a configuration file. Other tools require to enter manually.

Below command will generate xorg.conf.new file located in home directory of root (I assume that you did not started X and you are logged in as root).

# X -configure

Rename it as xorg.conf

# mv /root/xorg.conf.new /root/xorg.conf

Copy renamed X configuration file xorg.conf to /etc/X11

# cp /root/xorg.conf /etc/X11

Type startx to start X.

# startx

Now KDE will start by default.

Sample xorg.conf file: /etc/X11/xorg.conf

(Nvidia 7300 GT Graphics Card, LG L1952T LCD Monitor)

Slackware has xwmconfig tool by which you can change your default desktop environment and window manager. Full installation of Slackware consists of KDE, XFCE, BlackBox, WindowMaker, FVWM and TWM. To change default window manager or desktop environment, execute folowing command as user.

$ xwmconfig


Slackware configuration after installation

After successfull installation of Slackware, first boot takes the user to a terminal login. During the installation only root account is created. After logging in as root, a series of configuration should be carried out.
These are:

1. X configuration
2. Creating user accounts
3. Sound configuration
4. Adding users to groups
5. Changing runlevel
6. Adding users to sudoers file
7. Locale settings

How to install Slackware?

Just have a look at Slackware Linux Essentials Chapter 3.

Why do I use GNU/Linux?

GNU/Linux is a free reimplementation of UNIX, in other words it is differentiated form of UNIX operating system. Slackware is a GNU/Linux distribution. Most of the packages in GNU/Linux systems published under free sofware license and this means that Slackware uses open source software packages which are available and redistributable in source and binary form.

Most hardware vendors such as "Intel", "AMD", "NVIDIA", "ATI" and "Ralink" provide support for GNU/Linux systems. You can install and use any hardware on market on GNU/Linux systems. For example, graphics cards, audio cards, printers and scanners can be easily installed on GNU/Linux systems. Linux is the kernel of GNU/Linux operating system and Linux kernel is updated frequently to support for new hardware by developers.

GNU/Linux systems provide a developed localization support. After installing related packages, it is possible to configure language, date-time format, currency unit and locale character support settings for all countries.

GNU/Linux systems also provide different desktop environmens such that KDE, GNOME and XFCE. These are the most popular advanced desktop environments. One and more desktop environments can be installed on a GNU/Linux operating system and you can easily change session among these desktop environments.

You can obtain the open source software for your basic and advanced needs in the GNU/Linux world. These sofware packages licensed under free software licenses and freely developed under these licenses. The most popular free software license is GPL (General Public License). GNU/Linux is also licensed under GPL. Most of the software licensed under GPL are free of charge. There are also software packages developed for Microsoft Windows under GPL and sofware packages developed for GNU/Linux usually have Microsoft Windows versions, so that spirit of the free software injected to Microsoft Windows users.

It is possible to use commercial software programs on GNU/Linux. Most of the commercial software producers also release UNIX version of the software programs. As an example, The Mathworks Matlab can be installed on a variety of operating systems including UNIX. Software programs developed for UNIX can be installed on GNU/Linux operating systems. It is also possible to find free clones of these commercial software packages in the GNU/Linux world, for instance "Scilab" and "Octave" are the successful free clones of Matlab.

I use Slackware, because it meets my software needs by the open source software packages and supports all hardware that I can have.

Slackware64 -current made public! (2009-05-1)

[tap tap tap]... Is this thing on? ;-)

Ready or not, Slackware has now gone 64-bit with an official x86_64 port being maintained in-sync with the regular x86 -current branch. DVDs will be available for purchase from the Slackware store when Slackware 13.0 is released. Many thanks go out to the Slackware team for their help with this branch and a special thank you to Eric Hameleers who did the real heavy lifting re-compiling everything for this architecture, testing, re-testing, and staying in-sync with -current.

We've been developing and testing Slackware64 for quite a while. Most of the team is already using Slackware64 on their personal machines, and things are working well enough that it is time to let the community check our work.

We'd like to thank the unofficial 64 bit projects for taking up the slack for us for so long so that we could take our time getting everything just right. Without those alternatives, we would have been pressured to get things out before they were really ready.

As always -- have fun!

Pat and the Slackware crew