Slackware now ships with a 2.6.x kernel that may already support all of your hardware sufficiently. While it suggested that you compile your own kernel, you may be able to get by without doing so.
It is suggested that you compile a kernel, but you can skip this step for now, then come back to it if you find the default kernel is missing something you need. If you just installed Slackware, you can probably get the kernel using the links text based web browser. The rest of this document assumes that your hardware is now supported by your kernel, and will focus on configuring the system to use the hardware.
Run alsaconf. Follow the prompts and, provided your kernel is configured correctly with sound modules, select your sound card from the list. Answer yes about modifying modules.conf. Set mixer volumes by running alsamixer and using the arrow keys. Press escape to quit when the volumes are at appropriate levels. Store the mixer settings with alsactl store.
After going through this section you will have a (hopefully) working graphical user interface. It is common to use a tool like xorgconfig to get a quick start, then edit the /etc/X11/xorg.conf file with a text editor to tweak it. Run xorgconfig and press enter to get past the initial welcome message.
Select the protocol that your mouse uses, probably either PS/2 or IMPS/2 (scroll mouse). Answer about Emulate3Buttons, where a yes indicates that pressing both the left and right buttons on the mouse sends a middle click. If you are using a scroll mouse, clicking the wheel will provide the third button. The default mouse device, /dev/mouse will usually be ok, however some mice (especially USB) will use /dev/input/mice.
Most likely, you are using a Generic 101-key keyboard with the U.S. English layout, and wish to use the ‘us’ variant. XKB options are for keyboards with built in unix features, so you probably want to say no to that question.
The safe initial choice for the monitor will be number 7, 1024x768 at 70Hz, with a 50-90 vertical sync range. Give a friendly name for your monitor that will be used in the configuration file.
When asked, select to view the video card database. Look through the list carefully as xorgconfig is not friendly about going backwards through the list. The most popular cards are listed at the top, and if you want to try something guaranteed to work select 0, VESA. Specifying the video RAM for the card is only important to some drivers, so you can probably safely choose any of the RAM amounts. This does affect the later resolution choices, but you’ll probably want to change those in the xorg.conf file later anyway. If you wish to change the suggested resolutions for any of the given color depths do so. However, if you do xorgconfig will ask whether you wish to have a virtual screen larger than the physical screen; probably not as this would involve moving the mouse to the edge of the screen and pushing the view around just to see other portions of the desktop. Finally, select the default color depth you with to use. Depths of 16 and 24 bit are common choices, but be aware that some drivers will not work with 24 bit color.
X Setup Complete¶
All done! Select ‘y’ to write the configuration file to /etc/X11/xorg.conf. You can start your graphical user interface now with startx. Now that you have a working xorg.conf file, back it up to /etc/X11/xorg.conf.bak before you begin editing it to tweak your settings.
NVIDIA Driver Installation¶
If you have an NVIDIA video card, you will almost certainly want to install the driver provided by NVIDIA. Using Firefox or links or another browser, go to http://nvidia.com and select the ‘Download Drivers’ link. From there, choose ‘Linux, FreeBSD, and Solaris Drivers’. In the page listing all of the different versions, choose the ‘Linux IA32’ version. Even if you have a 64-bit processor, you must use the 32-bit (IA32) version of the NVIDIA driver with Slackware (Slackware is a 32-bit distribution).
Note that older cards need to use the 7xxx series (RIVA and some GeForce2s) or the 9xxx series(Up to GeForce4s and some Quadros) legacy drivers. If your card is not supported by the driver you download, it will not install.
Once the driver is downloaded, exit X11 and change to the directory containing the file. I will use NVIDIA-Linux-version.run to refer to this file. Change the file’s permissions so that it can be executed, then run it:
chmod +x NVIDIA-Linux-version.run ./NVIDIA-Linux-version.run
Answer the questions presented by just pressing enter. The driver installation will compile the driver and offer to update your X configuration, and usually selecting yes will give you a good working configuration. If you choose to not have your configuration automatically modified, you will need to edit /etc/X11/xorg.conf and change the ‘Driver’ entry in your graphics card’s ‘Device’ section to ‘nvidia’.
Once you’re able to get into X11, open a terminal and run the glxgears command. Your FPS should be in the thousands, if not tens of thousands. Also, running glxinfo | grep direct should report ‘direct rendering: Yes’.
Note that any time you recompile your kernel the NVIDIA driver must be reinstalled using the run file. It’s a good idea to keep the run file in root’s home directory or a similar place.
Adding a Second USB Mouse (Laptops)¶
In your /etc/X11/xorg.conf file, there will be a section for your mouse like this:
Section "InputDevice" Identifier "Mouse1" Driver "mouse" Option "Protocol" "IMPS/2" Option "Device" "/dev/input/mice" Option "ZAxisMapping" "4 5" EndSecton
Below that, create a section like the one listed below. If your USB mouse is a scroll mouse the new section should look pretty much exactly like below.
Section "InputDevice" Identifier "Mouse2" Driver "mouse" Option "Protocol" "IMPS/2" Option "Device" "/dev/input/mice" Option "ZAxisMapping" "4 5" EndSecton
Then, look for your ServerLayout section and add Mouse2 to it like this:
Section ServerLayout Identifier "SimpleLayout" Screen "Screen 1" 0 0 InputDevice "Mouse1" "CorePointer" InputDevice "Mouse2" "SendCoreEvents" InputDevice "Keyboard1" "CoreKeyboard" EndSection
Managing software with the package tools¶
Like other distributions, Slackware has a package management system. Some Linux distros use RPM (Redhat, SuSE), others use DPKG (Debian, Ubuntu). Slackware uses, appropriately enough, Slackware Packages and the extension on these files is tgz. They are simple tarballs and can be decompressed with the standard tar zxf command. The package system does not provide dependency resolution, and instead takes the straightforward approach of simply adding and removing files from your system. File collisions, where multiple packages use the same file, are handled gracefully.
To install a Slackware package, first get one from the Slackware website, installation media, or another site such as http://linuxpackages.net that has third party software. Then run installpkg filename.tgz. When removing or viewing packages, I prefer to use the interactive interface pkgtool, but there is a removepkg command available too.
If at any time you want to re-run some configuration script that Slackware provides (xwmconfig, for example), there is a handy place to access all of them. This way you don’t have to remember so many Slackware-specific commands. Simply run pkgtool and select Setup.
I can only offer instructions for setting up networked HP JetDirect printers, but the process should be similar for USB or parallel port printers. First, start the cups service:
Then open a web browser on your local system such as Firefox and enter http://localhost:631 in the address bar. This will take you to the CUPS administration page. Select ‘Add Printer’, then give it at least a name. On the next page, choose the appropriate ‘Device’. For networked Jetdirect printing choose ‘AppSocket/HP JetDirect’. The ‘Device URI’ for JetDirect will be the IP address plus :9100 at the end: ‘socket:192.168.0.x:9100’. Finally, select the Make and Model, optionally providing a modle description, or PPD, file that you got from the web.
At some point the web system will force you to authenticate. You will need to provide the username root and root’s password to actually add the printer. Once set up, test out printing with an application or by using the CUPS site area for managing printers.
Create a User¶
You shouldn’t regularly use your system and the root user. The single biggest reason that Linux is more secure than other operating systems is that the software is resistant to “privilege escalation” attacks. This is where a program is circumvented and allows a regular user to do things they ought not be able to do. If you run as the root user all of the time, then this protection means nothing.
The command to add a user is adduser. This interactive program will walk you through providing a username and password, as well as lots of optional information. By default, the user is very restricted so that you can be confident a local user won’t harm your system. However, for your own personal user you probably want to add more privileges. When asked for ‘Additional groups’, enter ‘sys, disk, cdrom, audio, video, scanner, plugdev, power’ to give that user the kinds of privileges you would expect to have on your own computer.
Set up the user’s environment¶
TODO: edit .bash_profile
Set Up Sudo¶
Run visudo, copy the root ALL=(ALL) ALL, replacing root with your username. Use sudo cmd to run cmd as root when logged into your regular user account.