[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Questa è una vecchia versione del documento!


DA TRADURRE

work in progress twenty-seven

Configura il tuo nuovo sistema Slackware

Assumiamo che tu abbia letto Guida all' installazione e tu abbia un' installazione pulita di Slackware con di cui sei soddisfatto sulla tua macchina.

La guida per principianti e' fatta per metterti saldamente sulla via di Slackware. Se hai installato Slackware per la prima volta potresti essere scoraggiato dalal vista del cursore lampeggiante alla console di login. Lasciati guidare da questa guida attraverso la configurazione iniziale di un sistema Slackware fresco d' installazione.

Prima di continuare, e' importante realizzare che il gestore di pacchetti di Slackware non effettua nessun controllo delle dipendenze. Se sei nuovo di Slackware, effettuare una installazione full (con la possibile eccezione di KDEI series) puo' prevenire un sacco di problemi in seguito.
La raccomandazione ufficiale 1) e' “Se hai spazio su disco, ti incoraggiamo a fare una installazione full per un miglior risultato”.

Panoramica Post Installazione

Quando Slackware parte per la prima volta dopo aver completato l' installazione ed essersi riavviato, noterai che si avviera' proponendo una console testuale di login - non il login grafico che ti aspetteresti utilizzando altre distribuzioni. Non lasciarti scoraggiare. E' il primo passo di una esperienza d' apprendimento che ti rendera' molto piu' competente su Linux dopo appena poche settimane.

L' installazione non ti offre di creare un account. A questo punto c'e' solamente l' account “root”. Tu dovresti ricordarti la password, che hai impostato alla fine della procedura di installazione. Facendo login come “root' ora - ti ritroverai a una console “#”, il prompt di root.

E adesso quindi? L' utente ”root“ non e' l' account che userai abitualmente. Root serve per la manutenzione e la configurazione del sistema, aggiornamenti dei software e cose del genere.
La prima cosa da fare e' creare un nuovo account utente per te, senza i privilegi di root. Dopodiche' e' ora di cominciare a considerare l' installazione di ”Proprietary Graphics Drivers“ (se possiedi una scheda grafica Nvidia o Ati), impostare una connessione di rete wireless o avviare un ambiente desktop grafico. C'e' molto che puoi fare con Slackware! Cominciamo con le cose basilari.

Creare un Account Utente

La prima cosa di cui avrai bisogno e' di creare il tuo account utente non-root. Ci sono due modi in cui puoi farlo, entrambi dalla console. Il modo raccomandato e' di usare lo script intereattivo di Salckware adduser, quindi:

# adduser

e seguire i vari prompts. Leggi la pagina user management per maggiori dettagli sullo script adduser. Puoi anche utilizzare il programma standard non interattivo di Linux useradd:

# useradd -m -g users -G wheel,floppy,audio,video,cdrom,plugdev,power,netdev,lp,scanner -s /bin/bash slacker

Una volta che hai fatto puoi loggarti con il tuo user account.
Fai logout dall' account root (digita logout dal prompt di root) e poi fai login usando il nuovo account che hai appena creato. Ora arrivano le avventure davvero interessanti!

Configurare il gestore dei pacchetti

Ora che hai una Slackware funzionante, dovresti considerare di spendere un po' di tempo per prenderti cura della buona salute del tuo computer. Il software installato come parte della release di Slackware che stai usando, puo' divenire soggetto a vulnerabilities nel corso del tempo. Quando queste vulnerabilita' sono critiche per la salute del tuo computer, Slackware solitamente pubblica delle versioni patchate di quei pacchetti. Questi pacchetti patchati vengono resi disponibili online (nella directory /patches della release) e annuciati su Slackware Security mailing list.

Hai diverse opzioni al fine di mantenere aggiornata la tua installazione di Slackware. Non e' consigliato rendere il processo di applicare update di sicurezza totalmente automatico, ma e' possibile comunque farlo utilizzando un cron job.

slackpkg

La tua migliore opzione e' di usare slackpkg, che e' un gestore di pacchetti costruito sopra pkgtools che e' quello di Slackware. Prima che tu possa usare slackpkg dovrai definire un mirror online da cui verranno scaricati gli aggiornamenti sul tuo computer.

Puoi trovare in questo file una lista di mirrors disponibile per la tua versione di Slackware:

/etc/slackpkg/mirrors

Apri il file con un editori di testo come nano o vi e decommenta un solo URL di un mirror. Accertati che l' URL riporti il numero di release coincidente con la versione di Slackware che stai usando! Inoltre, scegli un mirror che sia abbastanza vicino geograficamente a te o che sai essere veloce. Quando hai fatto cio', dovrai inizializzare il database di slackpkg lanciando

# slackpkg update gpg
# slackpkg update

Tieni presente che l' aggiornamento dei pacchetti si fa da utente root!

Dovrai aggiornare il database di slackpkg di tanto in tanto, ogni volta che vieni a conoscenza della disponibilita' di nuove patch per la tua distribuzione. Dopo aver aggiornato il database, puoi far si che slackpkg scarichi e installi gli aggiornamenti. Di nuovo, consulta la pagina slackpkg per le linee guida sull' utilizzo di questo tool.

Cercare Pacchetti Aggiornati

Il testo Slackware Essentials ha un capitolo su come stare aggiornati. Sarebbe buona cosa che lo leggessi ora se non lo hai ancora fatto.

  • Un modo per cercare i pacchetti aggiornati (patches) e' di iscriverti alla mailing list Slackware Security e di darsi da fare quando leggi che ci sono nuove patches.
  • Un altro modo e' di impostare uno script che cerchi gli updates una volta al giorno e ti mandi una mail qualora fossero disponibili updates.
    Affinche' questo funzioni devi avere il sendmail configurato (anche se di solito funziona out of the box) e sapere come si crea un cron job. E, ovviamente, avere uno script che faccia il lavoro.
    Un esempio di script del genere e' rsync_slackware_patches.sh, che controlla il Changelog.txt di Slackware per aggiornamenti. Scarica lo script, modificalo per utilizzare il tuo server mirror preferito e rendilo eseguibile affinche' possa essere utilizzato in un cron job:
    # wget http://www.slackware.com/~alien/tools/rsync_slackware_patches.sh -O /usr/local/bin/rsync_slackware_patches.sh
    # chmod +x /usr/local/bin/rsync_slackware_patches.sh

    Lo script utilizza un paio di impostazioni di default che potresti voler cambiare per adeguarlo al tuo ambiente - come ad esempio la directory in cui lo script fara' il download delle patches.
    Semplicemente lancia lo script una volta, e guarda cosa riporta:

    # /usr/local/bin/rsync_slackware_patches.sh
    [rsync_slackware_patches.sh:] Syncing patches for slackware version '13.37'.
    [rsync_slackware_patches.sh:] Target directory /home/ftp/pub/Linux/Slackware/slackware-13.37/patches does not exist!
    [rsync_slackware_patches.sh:] Please create it first, and then re-run this script.                            


    Noterai che dovrai modificare lo script e definire una directory locale (e anche crearla!) da far usare allo script. Quando cio' e' stato fatto, dovresti lanciare lo script una volta - per il primo download dei pacchetti.
    Successivamente puoi usare il cron per lanciare lo script una volta al giorno. Per esempio, imposta lo script per girare alle 05:33 ogni giorno e lascia che controlli gli aggiornamenti alla versione a 64 bit di Slackware-13.37. Apri l' editor del crontab digitando

    crontab -e

    e aggiungi la seguente stringa alla tua cron table:

    33 5 * * *      /usr/local/sbin/rsync_slackware_patches.sh -q -r 13.37 -a x86_64

    Questo comando sara' eseguito silenziosamente (nel senso che non ti arrivera' una mail) nel caso non venissero trovate nuove patches. In ogni caso, quando lo script trova aggiornamenti li scarichera' e ti mandera' una mail con l' output dello script. Riceverai una mail del genere:

    [rsync_slackware_patches.sh:] New patches have arrived for Slackware 13.37 (x86_64)!
    
    .......................................................................
    
    0a1,10
    > Mon Sep 10 20:26:44 UTC 2012
    > patches/packages/seamonkey-2.12.1-x86_64-1_slack13.37.txz:  Upgraded.
    >   This is a bugfix release.
    > patches/packages/seamonkey-solibs-2.12.1-x86_64-1_slack13.37.txz:  Upgraded.
    >   This is a bugfix release.
    > +--------------------------+
    > Sun Sep  9 19:11:35 UTC 2012
    > patches/packages/mozilla-thunderbird-15.0.1-x86_64-1_slack13.37.txz:  Upgraded.
    >   This is a bugfix release.
    > +--------------------------+

    E tu saprai che a quel punto dovrai aggiornare slackpkg e far si che installi le ultime patches. Questo ti fornisce il controllo sui tuoi aggiornamenti (cioe' tu decidi quando aggiornare) pur essendo avvertito automaticamente della disponibilita' di nuove patches (che saranno gia' state scaricate per te).

Configura la Tua Rete

Se hai installato i pacchetti di rete, alla fine dell' installazione di Slackware, ti saranno fatte un paio di semplici domande, come:

  • utilizzi il DHCP;
  • altrimenti, quale IP vuoi usare;
  • qual e' l' hostname del tuo computer;
  • hai un nameserver (DNS) sulla rete?

Le tue risposte a tutte queste domande imposteranno alcuni file di configurazione per la rete.

  • /etc/rc.d/rc.inet1.conf
    Qui e' dove vengono emssi tutti i dettagli per le tue interfacce di rete. Il tool netconfig di Slackware configurera' solamente la tua interfaccia eth0. Se hai ulteriori interfacce di rete puoi modificare il file con un editor di testo come nano o vi e aggiungere i dettagli della tua configurazione. C'e' una pagina di manuale per questo:
    man rc.inet1.conf
  • /etc/resolv.conf

    Qui e' dove vengono aggiunti il tuo dominio di ricerca e il tuo nameserver. Se usi il DHCP, il file verra' aggiornato dal client DHCP. Se usi degli indirizzi IP statici

There is a man page for this:

man rc.inet1.conf
  • /etc/resolv.conf
    This is where your nameserver and domain search list are added. If you use DHCP then the DHCP client will update the file. If you use static IP addresses, then you are supposed to edit the file yourself. There is a man page for this:
    man resolv.conf
  • /etc/HOSTNAME
    This is where your computer's hostname is defined.
  • /etc/hosts
    This is where you will find a definition for your loopback interface which connects that to your hostname. You can add further hostname-to-IP-address mappings in this file if you do not use a DNS server or if you need specific mappings which the DNS server does not provide. There is a man page for this:
    man hosts

If you want to read in more detail about how to configure your network, have a look at this online comprehensive guide to networking in Slackware.

Traditional Network Configuration

Wired Network

To configure your wired network interface eth0, run (as root)

# netconfig

The same script which was run during the installation process.

netconfig only deals with the wired connection for eth0.

On the assumption that you configured your wired connection with netconfig, your network should be connected automatically without the need for any post-installation configuration.

If you didn’t enter your network configuration details during installation, just run netconfig as root; then run

# /etc/rc.d/rc.inet1 eth0_start

and you should have a working network connection instantaneously.

Wireless

Most common wireless hardware is supported by Linux these days. You can search online if your wireless hardware is supported by 3rd parties that have written Linux drivers. If you want to know if your computer recognizes your wireless card, simply run

# iwconfig

as root. If that tool reports ”no wireless extensions“ for all your network interfaces then the kernel does not have a driver for your wireless card and you'll have to find one online.

As with the wired network interfaces, your wireless card is traditionally configured in the file /etc/rc.d/rc.inet1.conf. You can read a lot more about it in this wireless configuration guide. There is also the man page:

# man rc.inet1.conf

You will also need to take steps to include wireless security, whether WEP or WPA2. Unencrypted wireless connections are strongly discouraged. Note that WPA/WPA2 encryption is not configured just in /etc/rc.d/rc.inet1.conf, you will also need to edit /etc/wpa_supplicant.conf and add an encryption key there.

Wireless encryption issues, in particular for WPA, can be hard to troubleshoot. Some basic troubleshooting steps are detailed in the above networking guide, just in case you do not get your computer associated to the Access Point.

Graphical Network Configuration Services

Slackware currently has some alternatives to configure and monitor your network connections. These install a daemon (aka a background service) which will allow you to switch between wired and wireless connections easily. That makes them perfectly suited for mobile users. They come with graphical configuration utilities and do not depend on the traditional Slackware configuration files - in fact, those files will cause conflicts if they contain network configuration.

  • You will find wicd in the extra section of the Slackware release tree (the word extra means that it is not part of the core distribution and will not have been installed as part of a full installation).
    After installing the wicd package, you have to make its init script executable so that the network daemon automatically starts at boot:
    # chmod +x /etc/rc.d/rc.wicd

    You can then configure your network using the graphical tool wicd-client or if you are running Slackware 14 you can use the KDE widget for wicd instead. For console lovers, there is also wicd-curses which offers the same configuration capabilities as the X-based counterparts.

  • Starting with Slackware 14, there is also Networkmanager. It will be installed as part of a full install, but the network daemon will not be started by default. As with wicd, you have to make its init script executable:
    # chmod +x /etc/rc.d/rc.networkmanager

    which will make NetworkManager start at boot. You will have to configure NetworkManager using an X-based graphical utility.
    Slackware 14 includes a KDE widget for Networkmanager. If you are using another Desktop Environment like XFCE, you can install the Gnome network-manager-applet from SlackBuilds.org.

Switch to a generic kernel

It's recommended that you switch to Slackware's generic kernel. This is easy to do but there are a few steps to follow.

What is the difference between a “generic” kernel and the “huge” kernel which has been installed as the default kernel?
The “huge” kernel is essentially a kernel which has every hardware driver built in which you might need for a successful installation of your computer. Think of storage and (wired) network drivers, filesystem and encryption drivers and a lot more. All these built-in drivers result in a big kernel image (hence the name “huge”). When this kernel boots it will use up a lot your RAM (relatively speaking… with 1 GB of RAM you will not really be troubled by a few MB less RAM).
The “generic” kernel on the other hand, is a kernel which has virtually no drivers built in. All drivers will be loaded into RAM on demand. This will make your kernel's memory consumption lower and the boot process a bit faster. The smaller size allows for the use of an initial RAM disk or “initrd”. An initial RAMdisk is required in certain configurations, like software RAID, or a fully encrypted hard drive.
For now, you need to remember that a “huge” kernel will not support an intial RAM disk, but the “generic” kernel will. We go for maximum flexibility and use a “generic” kernel.
  • You will need to create an initial RAM disk (”initrd“ for short). The initrd functions as a temporary root file system during the intial stage of the kernel booting, and it helps get the actual root system mounted when your system boots. Run this, as root:
    # /usr/share/mkinitrd/mkinitrd_command_generator.sh

    This command will not actually do anything. It is informational only, and will output something like this - depending on your kernel version, your hardware configuration, the root filesystem you chose when you installed Slackware and so on:

    #                                                                                                                       
    # mkinitrd_command_generator.sh revision 1.45                                                                           
    #
    # This script will now make a recommendation about the command to use
    # in case you require an initrd image to boot a kernel that does not
    # have support for your storage or root filesystem built in
    # (such as the Slackware 'generic' kernels').
    # A suitable 'mkinitrd' command will be:
    
    mkinitrd -c -k 3.2.29 -f ext4 -r /dev/sdb2 -m usb-storage:ehci-hcd:usbhid:ohci-hcd:mbcache:jbd2:ext4 -u -o /boot/initrd.gz

    Run the script's suggested mkinitrd commandline (as root) to generate the initrd.gz image.

  • If you have installed LILO (the default bootloader of Slackware), then you will also need to make changes to its configuration file /etc/lilo.conf by adding a section to your Slackware entry as follows:
    image = /boot/vmlinuz-generic-3.2.29
      initrd = /boot/initrd.gz # add this line so that lilo sees initrd.gz
      root = /dev/sda1
      label = Slackware
      read-only

    Actually, the ”mkinitrd_command_generator.sh“ script will show an example section which can be added to /etc/lilo.conf if you pass it the name of the generic kernel as an argument, like this:

    # /usr/share/mkinitrd/mkinitrd_command_generator.sh -l /boot/vmlinuz-generic-3.2.29

    Note that it is recommended to add a new section instead of editing the existing kernel image section. Assign a unique label to your new section. After reboot, LILO will give you two options: to boot into your freshly added generic kernel, or to boot into the failsafe huge kernel (of which you are certain that it will work).

  • After making the changes to /etc/lilo.conf you have to save the file and then run
     
    # lilo -v

    to make your change permanent. Then, reboot.

  • Have a look at mkinitrd manual page (man mkinitrd) for more information.
  • If you use grub or another bootloader, then make changes which are applicable to the program you use.
  • If you try to use the generic kernel without creating an initrd.gz, then booting will fail with a kernel panic.

Start a Graphical Desktop Environment

Configure X If Required

X.Org is the X-Window framework used in Slackware. The X server will usually auto-detect your graphics card and load applicable drivers. If auto-detect does not work (X crashes on startup), you will need to create a file /etc/X11/xorg.conf and set the correct options for your graphics card and display resolution. You can use

# X -configure 

to generate a basic xorg.conf configuration file in your current directory. This file can then be customized and placed in the /etc/X11/ directory. For a detailed overview of X configuration, check the xorg.conf manual page (man xorg.conf).

Non-free Display Drivers

Many people use computers with a modern graphics card powered by a Nvidia or Ati GPU (graphics processing unit). The vendors of these high-performance graphics card offer non-free (proprietary binary-only) drivers for their cards. These binary-only drivers will boost your computer's graphical and in particular OpenGL performance. If you own such a card you may want to read our Wiki article ”Proprietary Graphics Drivers“.

Choosing a Desktop Environment/Window Manager

To choose the Window Manager or Desktop Environment you wish to use, run the xwmconfig utility:

$ xwmconfig

and select one of the available options. Note that you can run the xwmconfig command as the root user which will set a global default for all users. By running the same command as your ordinary user account, you override that global default and pick your own.
After making your choice you can simply run

$ startx

Your preferred Desktop Environment or Window Manager will then start up.

Graphical Login

To start with a graphical login screen on boot instead of Slackware's default console login, change the default runlevel to 4. Edit the file /etc/inittab and change the line that looks like

   id:3:initdefault:

to

   id:4:initdefault:

Note the difference from other Linux distributions; many of those use runlevel 5 for their graphical login. In Slackware, runlevel 5 is identical to runlevel 3 (console boot).

In the graphical runlevel, you will be greeted by one of the available display (login session) managers. Slackware will by default look for the availability of GDM (Gnome Display Manager), KDM (KDE Display Manager) and XDM (X Display Manager) - in that order. You can also install a third-party login manager like SliM but you will have to edit /etc/rc.d/rc.4 and add a call to your new session manager all the way at the top.

Further Exploration

The Command Line

It may be of interest to new Linux users to explore the command line a bit more before installing a graphical desktop, just to learn some shell commands and applications available in non-graphical mode. Slackware excels in having an abundance of command line programs for a wide range of tasks.
For instance, web browsing can be done with lynx or links, which are console based web browsers. You can listen to music (even network audio streams) on the console using audio players like moc, mpg123, ogg123.

Mixing 64-bit with 32-bit

If you just installed the 64-bit version of Slackware (often called slackware64 or Slackware for x86_64) you will soon discover that it will refuse to run 32-bit programs like Wine. You may want to read our page on adding multilib capabilities in that case.

Slackware Documentation

Even a Slackware user can benefit from good documentation (why else are you reading this?). Our suggestion is that you browse this Wiki for additional tips and HOWTOs. And don't forget to check out the root directory of the Slackware DVD or CD1! You'll find Slackware's own main documentation there. Every text file there is worth a read.

Upgrading the System

If you have been using Slackware for a while and want to upgrade to the next release once that becomes available, we have a nice HOWTO available here: Upgrading Slackware to a New Release

When tracking current, you should always read the latest ChangeLog.txt before upgrading the system, to see whether any additional steps are required to be performed before or after upgrading. For upgrades to a stable release, it is a good idea to read the UPGRADE.TXT and CHANGES_AND_HINTS.TXT files located on the CD/DVD or the official mirror.

1)
vedi lo Slackware-HOWTO nella root del DVD o del CD1
 it:slackware:beginners_guide ()