Ubuntu dapper fi

From

http://www.textvideld.com http://www.textpasdart.com Image:Ubuntuguide_logo.png


En suosittele toimimaan tämän osittain suomennetun ohjeen mukaan ennenkuin sen käännökset on tarkistettu huolella, sitä odotellessa suosittelen tutustumaan Ubuntu Tutuksi -wikikirjaan, joka tutustuttaa sinut aloittelijan näkökulmasta katsottuna Ubuntuun.

Tämän oppaan tavoitteena on opastaa uusia ja vähän kokeneempiakin Linux-käyttäjiä oppimaan lisää Ubuntusta ja ratkomaan ongelmia. Seuraamalla tätä opasta voit ratkaista monet pulmat, joita Linuxin käytössä yleisimmin ilmenee. Tavoitteena on antaa ohjeita, jotka opettavat sinulle muutakin Linuxista kuin pelkän ulkokuoren - ja kaiken lisäksi suomeksi.


Contents


Aluksi

Mikä on Ubuntu Linux

Ubuntu Linux on virus-vapaa, turvallinen ja ilmainen käyttöjärjestelmä, jonka voi kuka tahansa asentaa.

  • http://www.ubuntu-fi.org/

Mistä voi katsoa Ubuntun kuvakaappauksia

  • http://www.ubuntu-fi.org/Wiki/Kuvakaappauksia

Mistä voi tilata Ubuntun CD:Itä täysin ilmaiseksi?

  • http://shipit.ubuntulinux.org

Mistä voin ladata Ubuntu Linuxin?

  • http://www.ubuntu-fi.org/

Mistä saa tukea Ubuntuun?

  • http://forum.ubuntu-fi.org/
  • http://www.linux-tuki.fi/
  • irc://irc.freenode.net/ubuntu-fi

Mistä etsiä uusia ohjelmia?

  • http://gnomefiles.org/
  • http://www.kde-apps.org/
  • http://freshmeat.net
  • http://sourceforge.net/

Mistä etsiä uusia teemoja Gnomeen/KDE:hen?

  • http://gnome-look.org/
  • http://www.kde-look.org/
  • http://art.gnome.org/


Ohjelmavarastot

Ohjelmavarastojen asentaminen

  • Voit myös tehdä saman Synapticilla, jos olet kyllästynyt käyttämään apt-getia.

1. Avaa pääte Sovellukset > Apuohjelmat > Pääte ja kopioi sinne seuraavat rivit


sudo cp -p /etc/apt/sources.list /etc/apt/sources.list_backup
sudo gedit /etc/apt/sources.list


2. Tyhjennä avautuva tiedosto ja liitä sen sisällöksi seuraavat rivit. Tallenna tiedosto.

deb http://fi.archive.ubuntu.com/ubuntu dapper main restricted universe multiverse
deb-src http://fi.archive.ubuntu.com/ubuntu dapper main restricted universe multiverse
deb http://fi.archive.ubuntu.com/ubuntu dapper-updates main restricted universe multiverse
deb-src http://fi.archive.ubuntu.com/ubuntu dapper-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu dapper-security main restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu dapper-security main restricted universe multiverse
deb http://fi.archive.ubuntu.com/ubuntu dapper-backports main restricted universe multiverse
deb-src http://fi.archive.ubuntu.com/ubuntu dapper-backports main restricted universe multiverse


3. Päivitä kirjoittamalla päätteeseen

sudo apt-get update

Ubuntun Päivittäminen

Voit päivittää Ubuntun myös Synapticilla graafisessa käyttöliittymässä

sudo apt-get update
sudo apt-get upgrade

Ohjelmien asentaminen

Yleistä

Ohjelmat voi asentaa monella tapaa,

  • Synapticilla (Järjestelmä > Hallinta > Synaptic-pakettienhallinta)

Merkitse mitä asennetaan ja paina sitten Toteuta.

  • Lisää tai poista sovelluksia -valikolla (Sovellukset > Lisää tai poista ...)

Pelkistetty pakettienhallinta, valitset asennettavat sovellukset ja painat OK.

  • Päätteellä
 sudo apt-get install ohjelman_nimi

Muistathan päivittää pakettivarastot, jotta saat itsellesi ajan tasalla olevat versiot paketeista.

Asenna Javatuki (Sun Java)

sudo apt-get install sun-java5-jre sun-java5-plugin
  • lisää vielä komento
sudo update-alternatives --config java
  • valitse numero joka lukee java-1.5.0-sun kohdalla

Asenna Flash-tuki

sudo apt-get install flashplugin-nonfree
sudo update-flashplugin

Asenna Lazarus

  • Laxarus on graafinen ohjelmistokehitin, sitä pidetään parhaimpana ohjelmointialustana Linuxille.

1. Avaa pääte

sudo apt-get install libgtk1.2 ja libgtk1.2-dev libgdk-pixbuf-dev libgdk-pixbuf2

2. Aluksi pitää asentaa FreePascal pakettina ftp://ftp.freepascal.org/pub/fpc/dist/i386-linux-2.0.2/fpc-2.0.2.i386-linux.tar

3. Asenna sitten Lazarus http://prdownloads.sourceforge.net/lazarus/fpc-2.0.2.i386-linux.tar?download

Asenna PDF:n lukija

Linuxille on tarjolla PDF-tiedostojen katseluun monia eri ohjelmia. Näistä yleisimpiä on acroread. Muita vaihtoehtoja ovat evince, xpdf ja gv.

sudo apt-get install acroread
sudo apt-get install mozilla-acroread
sudo apt-get install acroread-plugins

Windowsin käyttäminen Linuxissa

Voit asentaa Windowsin virtuaalisesti esimerkiksi VMwaren avulla, asennusta varten sinulla täytyy tietenkin olla Windows-käyttöjärjestelmän asennuslevyt ja tarvittava lisenssi.

  • Valmiin virtuaaliaseman pyöritykseen soveltuu VMware player joka löytyy pakettien hallinnalla
sudo apt-get install vmware-player

tai voit vaihtoehtoisesti myös ladata sen VMwaren omilta sivuilta:

http://www.vmware.com/products/player/

Valmiiksi konfiguroituja virtuaalikojeita löytyy osoitteesta:

http://www.vmware.com/vmtn/appliances/

  • Asentaaksesi virtuaaliasemia tarvitset joko VMware Serverin tai VMware Workstationin, suosittelen VMware Serveriä koska se on ilmainen vaihtoehto.

Voit ladata sen VMwaren omilta sivuilta sekä rekisteröidä itsellesi ilmaisen seriaalinumeron:

http://www.vmware.com/products/server/

lataa palvelin kotihakemistoosi ja sen jälkeen avaa pääte johon kopioi seuraava:

cd
tar xvfz VMware-server-*.tar.gz
cd vmware-server-distrib
./vmware-install.pl


  • Huom. Tarvitset VMwaren toimimiseksi omaa kerneliäsi vastaavan linux-restricted-modules paketin
sudo apt-get install linux-headers-`uname -r`

Asenna Lataus Manageri (Downloader for X)

sudo apt-get install d4x

Asenna FTP-ohjelma (gFTP)

sudo apt-get install gftp


Asenna Tiedostojen jakoon P2P DC++-klooni

  • vaatii wget-ohjelman asennuksen
sudo apt-get install wget
wget -c http://easylinux.info/uploads/linuxdcpp.tar.gz 
sudo tar zxvf linuxdcpp.tar.gz -C /opt
sudo gedit /usr/share/applications/dcpp.desktop
  • Lisää tiedostoon seuraavat rivit
[Desktop Entry]
Encoding=UTF-8
Name=DC++
Exec=/opt/linuxdcpp/ldcpp
Terminal=false
Type=Application
StartupNotify=true
Icon=/opt/linuxdcpp/pixmaps/linuxdcpp.svg
Categories=Application;Network;

Asenna P2P-ohjelma BitTorrent Axureus

  • vaatii wgetin asennuksen
sudo apt-get install azureus

Asenna aMule P2P

  • vaatii wgetin asennuksen
sudo apt-get install amule

Asenna FrostWire P2P

  • vaatii JSE:n
sudo apt-get install sun-java5-jre sun-java5-plugin
sudo update-alternatives --config java
  • Asennus sitten
wget -c http://www.users.on.net/~stubby/FrostWire-4.10.9-2.i586.deb
sudo dpkg -i FrostWire-4.10.9-2.i586.deb

Asenna Messenger (Skype)

sudo apt-get install skype


Emulaattorit

Playstation (pcsx)
sudo apt-get install pcsx
Gameboy (Gnuboy)
  • ohjelmalla voi pelata Gameboy ja Gameboy Advancepelejä
sudo apt-get install gnuboy-sdl

Ohjelmaa käytetään näin: Sovellukset > Apuohjelmat > Pääte Kirjoita päätteelle pelinnimi. Eli pelinnimi ja tiedostopääte.

sdlgnuboy pelinnimi
Dos (Dosemu)
sudo apt-get install dosemu
Nintendo (Nestra)
sudo apt-get install nestra
Supernintendo (zsnes)
sudo apt-get install zsnes

Asenna WinPopup (LinPopUp)

  • Vaatii Samba serverin
sudo apt-get install samba
sudo apt-get install smbfs
sudo apt-get install linpopup
sudo gedit /usr/share/applications/linpopup.desktop
  • Kirjoita tiedostoon seuraavat rivit ja tallenna
[Desktop Entry]
Name=LinPopUp
Comment=LinPopUp
Exec=linpopup
Icon=/usr/share/pixmaps/linpopup.xpm
Terminal=false
Type=Application
Categories=Application;Utility;

Asenna Multimediakoodekit

  • Suorita yksi rivi kerrallaan
sudo apt-get install gstreamer0.10-ffmpeg gstreamer0.10-gl gstreamer0.10-plugins-base
sudo apt-get install gstreamer0.10-plugins-good gstreamer0.10-plugins-bad
sudo apt-get install gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly 
sudo apt-get install gstreamer0.10-plugins-ugly-multiverse
sudo apt-get install w32codecs
  • Käynnistä graafinen tila (Gnome/GDM) uudestaan
sudo /etc/init.d/gdm restart

Asenna Tuki DVD:n toistolle

  • Suorita yksi rivi kerrallaan
sudo apt-get install libdvdread3 
sudo /usr/share/doc/libdvdread3/examples/install-css.sh
sudo apt-get install libdvdcss2 
sudo apt-get install totem-gstreamer-firefox-plugin
sudo apt-get install mplayer

Asenna RealPlayer 10

sudo apt-get install realplay

Asenna Stream Directory Browser

sudo apt-get install streamtuner
sudo apt-get install streamripper

Asenna Music Organizer (Cowbell)

sudo apt-get install cowbell

Asenna ID3 Tag Editor (EasyTAG)

sudo apt-get install easytag

Asenna CAD ohjelmat Qcad, Xfig


Asenna Vektorigrafiikka Inkscape

sudo apt-get install inkscape

Asenna Kino Video Editointi

sudo apt-get install kino
sudo apt-get install kinoplus
sudo apt-get install kino-timfx
sudo apt-get install kino-dvtitler

Asenna Cinelerra Video Editointi

sudo apt-get install cinelerra

Asenna Audacity musiikinmuokkain (harrastelijoille)

sudo apt-get install audacity

Asenna Ardour musiikinmuokkain (ammattilaisille)

sudo apt-get install ardour

Asenna DVD:n muokkain/kopioija

  • esivalmistelut, vaatii DVD:n toisto, Totem Firefox laajennuksen ja multimediakoodekkien asennuksen ennen tähän vaiheen aloittamista
sudo apt-get install rar
sudo ln -fs /usr/bin/rar /usr/bin/unrar
  • Asenna
sudo apt-get install dvdrip
sudo apt-get install vcdimager
sudo apt-get install cdrdao 
sudo apt-get install subtitleripper
sudo ln -fs /usr/bin/rar /usr/bin/rar-2.80
sudo gedit /usr/share/applications/dvdrip.desktop
  • Lisää tiedostoon seuraavat rivit
[Desktop Entry]
Name=dvd::rip 
Comment=dvd::rip
Exec=dvdrip
Icon=/usr/share/perl5/Video/DVDRip/icon.xpm
Terminal=false
Type=Application
Categories=Application;AudioVideo;


Asenna CD:n muokkain/kopioija (Goobox)

  • Vaatii multimediakoodekkejen asennusta
sudo apt-get install goobox
sudo rm -f /usr/share/applications/goobox.desktop
sudo gedit /usr/share/applications/goobox.desktop
  • Lisää tiedostoon seuraavat rivit
[Desktop Entry]
Name=CD Player & Ripper
Comment=Play and extract CDs
Exec=goobox
Icon=goobox.png
Terminal=false
Type=Application
Categories=Application;AudioVideo;

Asenna Picasa (kuvanhallintaohjelma)

sudo apt-get update
sudo apt-get install picasa

Asenna Opera

sudo apt-get install opera

Asenna Sähköpostiohjelma Mozilla Thunderbird

sudo apt-get install mozilla-thunderbird

Asenna GimpShop

http://linux.suramya.com/tutorials/Install_GIMPShop/


Asenna Liferea RSS-lukuohjelma

sudo apt-get install liferea
  • muita hyviä vaihtoehtoja ovat esimerkiksi Blam sekä Straw

Asenna Acrecator RSS-lukuohjelma

sudo apt-get install akregator

Asenna Web kehitysohjelma (NVU)

sudo apt-get install nvu
sudo rm -f /usr/share/applications/nvu.desktop
sudo gedit /usr/share/applications/nvu.desktop
[Desktop Entry]
Name=Nvu
Comment=Web Development Editor
Exec=nvu
Icon=nvu.xpm
Terminal=false
Type=Application
Categories=Application;Network;

Asenna Web kehitysohjelma (quanta plus)

sudo apt-get install quanta

Asenna Projektin hallintaohjelma (Planner)

sudo apt-get install planner

Asenna GnuGash taloushallinto-ohjelmisto

sudo apt-get install gnucash
sudo rm -fr /usr/share/gnome/apps/Applications/
sudo gedit /usr/share/applications/GnuCash.desktop
  • lisää seuraavat rivit ja tallenna
[Desktop Entry]
Name=GnuCash
Comment=GnuCash Personal Finance
Exec=gnucash
Icon=/usr/share/pixmaps/gnucash/gnucash-icon.png
Terminal=false
Type=Application
Categories=Application;Office;

Asenna Julkaisuohjelmisto (Scribus) latex

Asenna Scribus
  • Scribuksella voi taittaa ja luoda julkaisuja.Latex on myös kova sana
sudo apt-get install scribus

Asenna Diagrammi Editori (DIA)

sudo apt-get install dia-gnome

Asenna Compiled HTML Help (CHM) Viewer (xCHM)

sudo apt-get install xchm

Asenna Levynpoltto

Asenna Gnomebaker
sudo apt-get install gnomebaker
Asenna K3B
sudo apt-get install k3b libk3b2-mp3

Asenna Dialup PPP Client (GNOME PPP)

sudo apt-get install gnome-ppp

Asenna Broadband ADSL/PPPoE Client (RP-PPPoE)

wget -c http://easylinux.info/uploads/rp-pppoe-3.6.tar.gz
sudo tar zxvf rp-pppoe-3.6.tar.gz -C /opt/
sudo chown -R root:root /opt/rp-pppoe-3.6/
sudo gedit /usr/share/applications/RP-PPPoE.desktop
  • kirjoita tiedostoon seuraava ja tallenna
[Desktop Entry]
Name=RP-PPPoE
Comment=RP-PPPoE
Exec=gksudo /opt/rp-pppoe-3.6/go-gui
Icon=
Terminal=false
Type=Application
Categories=Application;Network;

Asenna Käynnistyslatain

sudo apt-get install bum

Asenna levynosiointiohjelma (GParted)

sudo apt-get install gparted

Asenna graafinen palomuuri (Firestarter)

sudo apt-get install firestarter

Asenna graafinen internetinkäyttöanalysoija (Ethereal)

sudo apt-get install ethereal

Asenna Vulnerability Scanner (Nessus)

sudo apt-get install nessus
sudo apt-get install nessusd
sudo nessus-adduser
sudo ln -fs /etc/init.d/nessusd /etc/rc2.d/S20nessusd
sudo /etc/init.d/nessusd start
sudo gedit /usr/share/applications/Nessus.desktop
  • kirjoita tidostoon seuraavat rivit ja tallenna
[Desktop Entry]
Name=Nessus
Comment=Nessus
Exec=nessus
Icon=/usr/share/pixmaps/nessus.xpm
Terminal=false
Type=Application
Categories=Application;System;

Asenna RAR Archiver (rar)

sudo apt-get install rar
sudo ln -fs /usr/bin/rar /usr/bin/unrar

Asenna lisää fontteja

sudo apt-get install xfonts-intl-arabic
sudo apt-get install xfonts-intl-asian
sudo apt-get install xfonts-intl-chinese
sudo apt-get install xfonts-intl-chinese-big
sudo apt-get install xfonts-intl-european
sudo apt-get install xfonts-intl-japanese
sudo apt-get install xfonts-intl-japanese-big
sudo apt-get install xfonts-intl-phonetic
sudo apt-get install gsfonts-x11
sudo apt-get install msttcorefonts
sudo fc-cache -f -v

Asenna tuki kiinankielelle

sudo apt-get install scim
sudo apt-get install scim-chinese
sudo apt-get install scim-config-socket
sudo apt-get install scim-gtk2-immodule
sudo apt-get install scim-tables-zh
wget -c http://easylinux.info/uploads/fireflysung-1.3.0.tar.gz 
sudo tar zxvf fireflysung-1.3.0.tar.gz -C /usr/share/fonts/truetype/
sudo chown -R root:root /usr/share/fonts/truetype/fireflysung-1.3.0/ 
sudo fc-cache -f -v
  • paina CTRL+SPACE

Asenna gDesklets-työpöytävimpaimet

sudo apt-get install gdesklets
sudo apt-get install gdesklets-data

Asenna Yleinen kääntäjä

sudo apt-get install build-essential

Asenna integroitu kehitysympäristö (Anjuta)

sudo apt-get install anjuta

Asenna MonoDevelop (C# IDE)

sudo apt-get install mono mono-gmcs mono-gac mono-utils monodevelop

Asenna 3D-grafiikan luontiohjelma (Blender)

sudo apt-get install blender

Asenna pelejä

Asenna frozen-bubble
sudo apt-get install frozen-bubble
Asenna Scorched3D
sudo apt-get install scorched3d
sudo gedit /usr/share/applications/scorched3d.desktop
  • kirjoita tiedostoon seuraava ja tallenna.
[Desktop Entry]
Name=Scorched 3D
Comment=A 3D Remake Of Scorched Earth
Exec=scorched3d
Icon=
Terminal=false
Type=Application
Categories=Application;Game;ArcadeGame;
Asenna planetaario-ohjelma (Stellarium)
sudo apt-get install stellarium
sudo gedit /usr/share/applications/stellarium.desktop
  • Lisää tiedostoon seuraava ja tallenna.
[Desktop Entry]
Name=Stellarium
Comment=Virtual planetarium
Exec=stellarium
Terminal=false
Type=Application
Categories=Application;Education;

Asenna Google Earth

wget -c http://dl.google.com/earth/GE4/GoogleEarthLinux.bin
sudo sh GoogleEarthLinux.bin
  • Kun olet asentanut Klikkaa Exit ja suorita seuraava
sudo cp /usr/local/google-earth/googleearth.desktop /usr/share/applications/
  • Tuokin voisi olla hyvä tehdä
sudo chmod 777 -R ~/.googleearth

Asenna KDE:n opetusviihdesovellukset

sudo apt-get install kdeedu

Asenna Wine (Wine Is Not an Emulator)

  • tämän ohjelman avulla voi suorittaa Windows-ohjelmia Linuxissa.
sudo apt-get install wine
  • lisää infoa saatavissa http://www.winehq.com/
  • tarkemmat ohjeet asennukseen ja asetuksien laittoon http://fi.wikibooks.org/wiki/Ubuntu_tutuksi/Wine

Maksullinen tapa saada Windows-ohjelmat toimimaan

  • Crossover Office on maksullinen tapa saada Windows-ohjelmia toimimaan Linuxissa

http://www.codeweavers.com

Lataa ilmainen kokeiluversio http://www.codeweavers.com/products/download_trial/

Luettelo toimivista ohjelmista: http://www.codeweavers.com/compatibility/browse/cat

Asenna WineCVS

  • tällä ohjelmalla voi pelata Windowspelejä Linuxissa.

http://www.linux-gamers.net/modules/wiwimod/index.php?page=HOWTO+Cedega+CVS

Yritä seuraavaa komentoa

sudo apt-get install cvs build-essential bison flex-old libasound2-dev libpng12-dev libjpeg62-dev
sudo apt-get install libfreetype6-dev libxrender-dev libttf2 libttf-dev libsdl1.2-dev libsdl-ttf2.0-dev  
sudo apt-get install libsdl-net1.2-dev libsdl-gfx1.2-dev msttcorefonts libfontconfig1-dev wget  
  • pitäisi ilmeisesti asentaa X.org ja Gnublot
sudo apt-get install gnuplot xserver-xorg xserver-xorg-dev gcc-3.4
  • No sitten OK ja lataa tiedosto koneelle
wget http://winecvs.linux-gamers.net/WineCVS.sh
  • Avaa pääte ja kirjoita
export CC=gcc-3.4
sh WineCVS.sh
  • SItten suorita asennusohjelma ja kun se on valmis

CVScedega pelinnimi

Asenna "First Person Shooter" -tyylinen Pudotus Terminaali (Tilda)

sudo apt-get install tilda
  • Oletusnäppäimenä on F1. Vaihtaaksesi oletusnäppäintä voit joko kirjoittaa tilda -C päätteeseen, tai hiiren oikeaa näppäintä Tildassa napsauttamalla valita Preferences / Asetukset. Asetukset-valikosta voit vaihtaa myös muita asetuksia, kuten näkymättömyyttä, fonttia, fontin kokoa sekä ikkunoiden kokoa.

Asenna muita työpöytäympäristöjä

Asenna KDE

sudo apt-get install kubuntu-desktop

Asenna XFCE

sudo apt-get install xubuntu-desktop

Asenna silmänruokaa

Kuinka Xgl/Compiz (Nvidia) asennetaan?

  • Kattavan oppaan XGL:n saamisesta toimintaan eri näyttökorteilta löydät sivulta: http://ubuntuforums.org/showthread.php?t=148351



sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup
sudo gedit /etc/X11/xorg.conf
  • Etsi "module"-otsikoitu osa tiedostosta
Section "Module"
	Load	"i2c"
	Load	"bitmap"
	...
	Load	"type1"
	Load	"vbe"
EndSection
  • Kommentoi dri and GLcore (mikäli tiedostossa) pois käytöstä (kirjoittamalla # rivin alkuun).
#	Load	"dri"
#	Load	"GLcore"
  • Varmista, että glx-moduli ladataan
	Load	"glx"
  • Etsi osa "Device", jossa määritellään verkkokortin ajuri (arvot voivat erota)
Section "Device"
	Identifier	"NVIDIA Corporation NV34M [GeForce FX Go5200]"
	Driver		"nv"
	BusID		"PCI:1:0:0"
EndSection
  • Muuta rivit seuraaviksi (jätä "identifier" ja "BusID" alkuperäisiksi).
Section "Device"
	...
	Driver		"nvidia"
	...
	Option		"RenderAccel"		"true"
	Option		"AllowGLXWithComposite" "true"
EndSection
  • Etsi monitorin määrittelyosa
Section "Screen"
	Identifier	"Default Screen"
	Device		"NVIDIA Corporation NV34M [GeForce FX Go5200]"
	Monitor		"Generic Monitor"
	DefaultDepth	16
  • Varmista, että DefaultDepth on 24:
	DefaultDepth	24
  • Tallenna muokkaamasi tiedosto
  • Asenna Xgl/Compiz
sudo apt-get install compiz xserver-xgl libgl1-mesa xserver-xorg libglitz-glx1 compiz-gnome
sudo cp /etc/gdm/gdm.conf-custom /etc/gdm/gdm.conf-custom-backup
sudo gedit /etc/gdm/gdm.conf-custom
  • Korvaa kaikki seuraava
# GDM Configuration Customization file.
#
# This file is the appropriate place for specifying your customizations to the
# GDM configuration.   If you run gdmsetup, it will automatically edit this
# file for you and will cause the daemon and any running GDM GUI programs to
# automatically update with the new configuration.  Not all configuration
# options are supported by gdmsetup, so to modify some values it may be
# necessary to modify this file directly by hand.
# 
# To hand-edit this file, simply add or modify the key=value combination in
# the appropriate section in the template below.  Refer to the comments in the
# gdm.conf file for information about each option.  Also refer to the reference
# documentation.
# 
# If you hand edit a GDM configuration file, you should run the following
# command to get the GDM daemon to notice the change.  Any running GDM GUI
# programs will also be notified to update with the new configuration.
#
# gdmflexiserver --command="UPDATE_CONFIG <configuration key>"
#
# For example, the "Enable" key in the "[debug]" section would be specified by
# "debug/Enable".
#
# You can also run gdm-restart or gdm-safe-restart to cause GDM to restart and
# re-read the new configuration settings.  You can also restart GDM by sending
# a HUP or USR1 signal to the daemon.  HUP behaves like gdm-restart and causes
# any user session started by GDM to exit immediately while USR1 behaves like
# gdm-safe-restart and will wait until all users log out before restarting GDM.
# 
# For full reference documentation see the gnome help browser under
# GNOME|System category.  You can also find the docs in HTML form on
# http://www.gnome.org/projects/gdm/
# 
# NOTE: Lines that begin with "#" are considered comments.
# 
# Have fun!
[daemon]
[security]
[xdmcp]
[gui]
[greeter]
[chooser]
[debug]
[servers]# Override display 1 to use Xgl
0=Xgl 
[server-Xgl] 
name=Xgl server 
command=/usr/bin/Xgl :0 -fullscreen -ac -accel glx:pbuffer -accel xv:fbo 
flexible=true
  • Tee skripti, joka käynnistää Xgl:n tai Compiz:n käynnistyksen yhteydessä
sudo gedit /usr/bin/thefuture
  • Lisää seuraavat rivit uuteen tiedostoon. Korvaa .us omaa näppäimistöäsi vastaavalla koodilla. Esimerkiksi .gb (Iso Britannia) tai .fi (Suomi). Jos haluat nähdä täyden luettelon näppäimistöistä, anna päätteessä komento ls /usr/share/xmodmap.
#!/bin/bash
gnome-window-decorator &  compiz --replace gconf decoration wobbly fade minimize cube rotate zoom scale move resize place switcher &
xmodmap /usr/share/xmodmap/xmodmap.us
  • Tallenna tiedosto
sudo chmod 755 /usr/bin/thefuture
  • Ajaaksesi compiz-ohjelmaa tämän istunnon aikana
thefuture
  • To have compiz load on startup
    • System -> Preferences -> Sessions
    • Startup Programs -> Add
/usr/bin/thefuture
  • Ongelmanratkaisua
    • If Xgl/Compiz doesn't seem to work, or you get errors, simply restart your machine after adding "thefuture" to Startup programs
    • If moving windows slows down the system, run gconf-editor from the terminal. Find apps/compiz/general/screen0/options. Disable detect_refresh_rate and set refresh rate to 60. Everything should work fine now...
    • If you are using a non default keyboard layout (other language), you might have to change it back to what you need if the keyboard acts funny at System/Settings/Keyboard.
    • You can also set the Super-key to the windows button here.
    • If you don't want "bottom expanded panel", type "killall gnome-panel" in terminal.
  • Vinkkejä
    • Switch windows = Alt + Tab
    • Arrange and View All Windows = F12 turns on or off; clicking a window will zoom it to the front
    • Switch desktops on cube = Ctrl + Alt + Left/Right Arrow
    • Switch desktops on cube - with active window following = Ctrl + Shift + Alt + Left/Right Arrow
    • Rotate cube manually = Ctrl + Alt + left-click
    • Make window translucent/opaque = currently only possible with the "transset" utility
    • Zoom-in once = Super-key right-click
    • Zoom-in manually = Super-key + wheel mouse up
    • Zoom-out manually = Super-key + wheel mouse down
    • Move window = Alt + left-click
    • Snap Move window (will stick to borders) = Ctrl + Alt + left-click
    • Resize window = Alt + right-click

Kaupalliset ohjelmat

Asenna Windows 9X/ME/2000/XP (Win4Lin)

  • Käytä Windowsia Linuxissa

http://www.win4lin.com

Asenna (CrossOver Office)

  • Photoshopin ja Officen saa toimimaan Linuxissa

http://www.codeweavers.com

Asenna Cedega

  • Cedegan avulla voi ajaa Windows-käyttöjärjestelmää varten tehtyjä pelejä Linuxissa. Voit myös kääntää Cedegan lähdekoodista, joka on saatavilla ilmaiseksi.

http://www.transgaming.com

Käyttäjänhallinta

Luo root käyttäjälle uusi salasana

  • Root käyttäjän salasanan luominen aktivoi rootin käyttäjätilin
  • Root käyttäjätilin luonti ei ole suositeltavaa, rikot samalla Ubuntun oletustoiminnan
  • Jos aivan varmasti tiedät mitä teet, niin lisää root käyttäjälle salasana
sudo passwd root

Muuta root:in salasana

sudo passwd -l root

Kuinka sallia root:in kirjautuminen GNOMEen

Järjestelmä > Hallinta > Kirjautumisikkuna
Turvallisuus-välilehti > Turvallisuus > Salli ylläpitäjän paikallinen kirjautuminen (valittuna)

Kuinka käytät komentorivia pääkäyttäjäoikeuksilla?

sudo -s -H
Password: <aseta salasanasi>

Kuinka lisätä/muokata/poistaa järjestelmän käyttäjiä ja ryhmiä

Gnome-työpöydässä järjestelmän käyttäjien ja ryhmien muokkaaminen tapahtuu valikossa Järjestelmä -> Hallinta-->Käyttäjä ja ryhmät

  • Lisää uusi käyttäjä komennolla
sudo useradd jim
  • Poista käyttäjä komennolla
sudo userdel jim
  • lisää tietoa saa komennolla
man usermod


Kuinka kirjaudutaan automaattisesti Gnomeen? (alentaa tietoturvaa)

Järjestelmä > Hallinta > Kirjautumisikkuna
Turvallisuus-välilehti > Käytä automaattista kirjautumista
  • Valitse käyttäjä alasvetovalikosta


Kuinka jokaiselle käyttäjälle annetaan pääkäyttäjän oikeudet (alentaa tietoturvaa)

export EDITOR=gedit && sudo visudo
  • Lisää seuraava rivi tiedoston loppuun ja tallenna.

system_username ALL=(ALL) ALL

Kuinka "sudo"-sessio lopetetaan

sudo -K

Kuinka tiedostojen/kansioiden oikeuksia muutetaan

Napsauta oikealla hiiren näppäimellä tiedostoja tai kansioita -> Ominaisuudet

Oikeudet-välilehti -> Luku/Kirjoitus/Suoritus (Valitse oikeudet Omistajalle/Ryhmälle/Muille)

 sudo chmod käyttäjänimi /paikka_tiedostoille_tai_kansioille

Kuinka tiedostojen/kansioiden omistaja muutetaan

sudo chown käyttäjänimi /paikka_tiedostoille_tai_kansioille

Kuinka tiedostojen/kansioiden ryhmien omistaja muutetaan

sudo chgrp käyttäjänimi /paikka_tiedostoille_tai_kansioille

sudo chgrp system_groupname /location_of_files_or_folders

sudo chgrp system_groupname /location_of_files_or_folders


Laitteisto

Kuinka asennetaan näytönohjaimet ajurit (NVIDIA)

sudo apt-get install nvidia-glx nvidia-kernel-common
sudo nvidia-glx-config enable

Kuinka NVIDIA-logo poistetaan Gnomen käynnistyksestä

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup
sudo gedit /etc/X11/xorg.conf
  • Etsi kohta
...
Section "Device"

Identifier "NVIDIA Corporation NV11 [GeForce2 MX/MX 400]" Driver "nvidia" BusID "PCI:1:0:0"

...
  • Lisää seuraava rivi ja tallenna
  Option		"NoLogo"


Kuinka näytönohjaimen ajurit (ATI) asennetaan

  • Katso epävirallinen ATIn Linux ajurien wiki http://wiki.cchtml.com/index.php/Ubuntu_Installation_Guide
  • Tai http://www.Ubuntu-fi.org

Kuinka tunnistaa modeemin piiri

sudo apt-get install build-essential wget
wget -c http://easylinux.info/uploads/scanModem.gz
gunzip -c scanModem.gz > scanModem
chmod +x scanModem
sudo cp scanModem /usr/bin/
  • Tunnistaaksesi modeemin "chipset"in
sudo scanModem
gedit Modem/ModemData.txt

Ota Windowsin WLAN-ajuri Linuxin käyttöön (Ndiswrapper)

  1. Jotta ndiswrapper toimisi, tarvitset langatonta verkkokorttiasi varten tehdyn Windows-ajurin
  2. Asenna ndiswrapper vain, jos Linux ei tue verkkokorttiasi
  3. Luettelo tuetuista korteista löytyy täältä: http://ndiswrapper.sourceforge.net/mediawiki/index.php/List
sudo apt-get install ndiswrapper-utils
sudo ndiswrapper -i /location_of_your_wireless_driver/your_driver.inf
sudo ndiswrapper -l
  • Unload ACX module and load ndiswrapper
lsmod | grep acx
sudo rmmod acx (only if the module was found. It could also be acx_pci or similar)
modprobe ndiswrapper
  • Aseta ndiswrapper latautumaan käynnistyksen yhteydessä
sudo ndiswrapper -m
sudo gedit /etc/modules

Lisää seuraava moduli luetteloon

ndiswrapper
  • Nyt voit konfiguroida verkkokorttisi komennoilla ifconfig ja iwconfig.

Oletetaan, että wlan0 on langaton verkkokorttisi:

sudo iwconfig wlan0 essid "AP" key ababababababababab mode Managed
iwconfig

Nyt sinun pitäisi nähdä liitospisteen MAC-osoite ja signaalin voimakkuus.

Asenna modeemin ajuri (SmartLink)

uname -r (must be 2.6.10-5-386)
wget -c http://easylinux.info/uploads/sl-modem-modules-2.6.10-5-386_2.9.9a-1ubuntu2+2.6.10-34_i386.deb
sudo dpkg -i sl-modem-modules-*.deb
sudo apt-get install sl-modem-daemon

Kuinka konfiguroidaan PalmOS laitteet

sudo gedit /etc/udev/rules.d/10-custom.rules
  • lisää tiedostoon seuraavat rivit
BUS="usb", SYSFS{product}="Palm Handheld*", KERNEL="ttyUSB*", NAME{ignore_remove}="pilot", MODE="666"
  • tallenna
  • Lisää pilot-applet paneeliin napsauttamalla hiiren oikealla korvalla tyhjää kohtaa ja valitsemalla "Lisää paneeliin"
  • Seuraa näytölle tulevia ohjeita

Kuinka osiotaulu listataan

sudo fdisk -l
   * Voit myös käyttää Järjestelmä -> Hallinta -> Levyt


Kuinka tiedostojärjestelmän levytilan käyttö listataan

df -T -h
  • Voit katsoa sen myös menemällä Järjestelmä -> Hallinta -> Levyt

Kuinka tiedostojärjestelmään liitetyt laitteet listataan

mount

Kuinka PCI-laitteet listataan

lspci

Kuinka USB-laitteet listataan

lsusb

Kuinka CD/DVD-ROM:n nopeutta nostetaan

   Esimerkissä oletetaan että /dev/cdrom on CD/DVD-ROM asemasi sijainti
sudo hdparm -d1 /dev/cdrom
sudo cp /etc/hdparm.conf /etc/hdparm.conf_backup
sudo gedit /etc/hdparm.conf
   * Lisää seuraavat rivit tiedoston loppuun ja tallenna
/dev/cdrom {
   dma = on
}

Kuinka CD/DVD-ROM liitetään tiedostojärjestelmään

Esimerkissä oletetaan että /dev/cdrom on CD/DVD-ROM asemasi sijainti

  • Liittääksesi CD/DVD-ROM:n
sudo mount /media/cdrom0/ -o unhide
  • Irroittaaksesi CD/DVD-ROM:n
sudo umount /media/cdrom0/

Kuinka CD/DVD-ROM irrotetaan tiedostojärjestelmästä

   Esimerkissä oletetaan että /dev/cdrom on CD/DVD-ROM asemasi sijainti
sudo umount /media/cdrom0/ -l

Kuinka ottaa /etc/fstab:in muutokset käyttöön ilman uudelleen käynnistämistä

sudo mount -a

Kuinka asentaa "Wacom tablet"


For a detailed guide with screenshots about how to configure the "Extended input devices" in your graphic applications, please follow the official Dapper guide at https://wiki.ubuntu.com//Wacom

With the version of the Linux Wacom driver (0.7.2) in Ubuntu 6.06 Dapper Drake, if you unplug you tablet, it won't function when you plug it back in and you will have to restart X. For this reason, it is best to leave the tablet plugged in. This limitation will be removed when the 0.7.4 version of the driver is included in Ubuntu.

   * lue ohjelman mukana tulleet tiedotteet (release notes)
   * 1. Using Synaptic package manager1, check if the packages xserver-xorg-input-wacom and wacom-tools are already
        installed - if not, install them. If you prefer using the command line, you can also execute : 
sudo apt-get install xserver-xorg-input-wacom wacom-tools
  • 2. Save a copy of your /etc/X11/xorg.conf :
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
   *  then edit it with the command line : 
sudo gedit /etc/X11/xorg.conf
   * and change all /dev/wacom occurences into /dev/input/wacom (created by wacom-tools udev scripts), then save the file. 
   * You should be ready to go after you have restarted X. Remember to configure the "Extended input devices" in 
     your graphic applications (Gimp, Inkscape), however you can already check if it's working by moving your 
     stylus on the tablet : the mouse cursor should go through the whole screen.

CD/DVD Poltto

Kuinka cd-rw -levy alustetaan?

   Esimerkissä oletetaan että /dev/cdrom on CD/DVD-ROM asemasi sijainti
sudo umount /dev/cdrom
cdrecord dev=/dev/cdrom blank=fast

Kuinka tiedostoja tai kansioita poltetaan CD/DVD:lle?

  • Grillaamalla CD-levyjä eli näin...
nautilus burn:///
   * File Browser: CD/DVD Creator 
   * Drag files/folders into window 
File Menu -> Write to Disc... -> Write

Kuinka levykuva (.iso) poltetaan CD/DVD:lle?

  • Saman voi tehdä myös K3b:llä tai Gnomebakerilla.

Napsauta oikella hiiren korvalla Image-tiedostoa (ISO) -> Kirjoita cd:lle... -> Kirjoita

====Kuinka kopioida CD/DVD====
   * Lue #General Notes
   * Lue #Kuinka luoda levykuva CD/DVD:n tiedostoista
   * Lue #Kuinka polttaa .iso tiedostoja CD/DVD:lle? 


Kuinka luoda levykuva CD/DVD:n tiedostoista

   * Lue #General Notes 
   Esimerkissä oletetaan että /dev/cdrom on CD/DVD-ROM asemasi sijainti

sudo umount /dev/cdrom dd if=/dev/cdrom of=file.iso bs=1024

Kuinka luoda levykuva tiedostot kansioista

   * Lue #General Notes 

mkisofs -o file.iso /kansion_sijainti/

Kuinka MD5 tarkistustiedostot luodaan

   * Lue #General Notes 

md5sum file.iso > file.iso.md5


Kuinka MD5 tarkistussumma lasketaan

   * Lue #General Notes 
   Esimerkissä oletetaan että tiedostot tiedosto.iso ja tiedosto.iso.md5 ovat samassa kansiossa 

md5sum -c tiedosto.iso.md5

Kuinka levykuva (ISO) liitetään polttamatta sitä

  • Lue #General Notes
  • Liittääksesi Levykuvan (ISO)
sudo mkdir /media/iso
sudo modprobe loop
sudo mount tiedosto.iso /media/iso/ -t iso9660 -o loop
  • Irrottaaksesi (ISO) tiedoston
sudo umount /media/iso/

Kuinka CD/DVD:n polttamisnopeus asetetaan

   * Read #General Notes
   * Applications -> System Tools -> Configuration Editor
   * Configuration Editor 

/ -> apps -> nautilus-cd-burner -> default_speed (set/change the burn speed)

How to enable burnproof for CD/DVD Burner

   * Read #General Notes
   * Applications -> System Tools -> Configuration Editor
   * Configuration Editor 

/ -> apps -> nautilus-cd-burner -> burnproof (Checked)


How to enable overburn for CD/DVD Burner

   * Read #General Notes
   * Applications -> System Tools -> Configuration Editor
   * Configuration Editor 

/ -> apps -> nautilus-cd-burner -> overburn (Checked)


Kuinka luoda multisession DVD+-RW disks

   * example Nero

Kuinka MP3-tiedostoista tehdään audio-CD (GnomeBaker)

   * Read #General Notes
   * Read #How to install CD/DVD Burning Application (GnomeBaker) 

sudo apt-get install gstreamer0.10-plugins-ugly sudo apt-get install gstreamer0.8-misc sudo apt-get install gstreamer0.8-mad

   * Applications -> Sound & Video -> GnomeBaker

Internet työskentely

Kuinka Google Talk konfiguroidaan

  • See the answer at Google Talk Help Center

Kuinka verkkoyhteyksiä otetaan käyttöön tai lopetetaan

  • Read #General Notes
  • System -> Administration -> Networking
  • Network settings
Connections Tab -> Select "Ethernet connection" -> Activate/Deactivate

Kuinka verkkoyhteys konfiguroidaan

  • Read #General Notes
  • System -> Administration -> Networking
  • Network settings
Connections Tab -> Select "Ethernet connection" -> Properties
Connection -> Enable this connection (Checked)
Connection Settings -> Configuration: Select "DHCP/Static IP address"
DNS Tab -> DNS Servers -> Add/Delete

Kuinka modeemiyhteys konfiguroidaan =

sudo pppconfig
  • To connect dialup
sudo pon provider_name
  • To disconnect dialup
sudo poff

Kuinka laajakaistayhteys konfiguroidaan

sudo pppoeconf

Kuinka tietokoneen nimi vaihdetaan

  • Read #General Notes
  • System -> Administration -> Networking
  • Network settings
General Tab -> Host Settings -> Hostname: Specify the computer name 
  • Save and close all opened applications, Reboot computer

Kuinka muutetaan tietokoneen kuvausta

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf
  • Find this line
...
  server string = %h server (Samba, Ubuntu)
...
  • Korvaa seuraavalla rivillä
  server string = new_computer_descriptions
  • Tallenna muokattu tiedosto
sudo testparm
sudo /etc/init.d/samba restart

Kuinka to change computer Domain/Workgroup

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf
  • Find this line
...
  workgroup = MSHOME
...
  • Replace with the following line
  workgroup = new_domain_or_workgroup
  • Save the edited file
sudo testparm
sudo /etc/init.d/samba restart

Kuinka annetaan koneen nimi (hostname) tietokoneelle, jolla ei ole staattista IP-osoitetta käyttäen ilmaista DynDNS-palvelua

sudo apt-get install ipcheck
sudo gedit /etc/ppp/ip-up.d/dyndns_update.sh
  • Insert the following lines into the new file
 #!/bin/sh
 USERNAME=myusername
 PASSWORD=mypassword
 HOSTNAME=myhostname.dyndns.org
 cd /root/
 if [ -f /root/ipcheck.dat ]; then
  ipcheck -r checkip.dyndns.org:8245 $USERNAME $PASSWORD $HOSTNAME
 else
  ipcheck --makedat -r checkip.dyndns.org:8245 $USERNAME $PASSWORD $HOSTNAME
 fi
  • Save the edited file
sudo chmod 700 /etc/ppp/ip-up.d/dyndns_update.sh
sudo sh /etc/ppp/ip-up.d/dyndns_update.sh

Kuinka kansioita jaetaan helpolla tavalla

Right click on folder -> Share folder
Shared folder -> Share with: Select "SMB"
Share properties -> Name: Specify the share name

Kuinka selataan paikallisverkon tietokoneita

e.g. Assumed that network connections have been configured properly
If computers or network folders could not be found, try access them directly
Read #How to access network folders without mounting
  • Places -> Network Servers

Kuinka päästään käsiksi verkkokansioihin liittämättä niitä tiedostojärjestelmään

e.g. Assumed that network connections have been configured properly
Network computer's IP: 192.168.0.1
Shared folder's name: linux
  • Press 'Alt+F2' (Run Application...) and enter:
smb://192.168.0.1/linux

Kuinka liitetään/irrotetaan verkkokansioita ja annetaan kaikille käyttäjille lukuoikeus niihin

e.g. Assumed that network connections have been configured properly
Network computer's IP: 192.168.0.1
Network computer's Username: myusername
Network computer's Password: mypassword
Shared folder's name: linux
Local mount folder: /media/sharename
  • Liitä verkkokansio
sudo mkdir /media/sharename
sudo mount //192.168.0.1/linux /media/sharename/ -o username=myusername,password=mypassword
  • Irrota verkkokansio
sudo umount /media/sharename/

Kuinka liitetään/irrotetaan verkkokansioita ja annetaan kaikille käyttäjille luku- ja kirjoitusoikeus niihin

e.g. Assumed that network connections have been configured properly
Network computer's IP: 192.168.0.1
Network computer's Username: myusername
Network computer's Password: mypassword
Shared folder's name: linux
Local mount folder: /media/sharename
  • To mount network folder
sudo mkdir /media/sharename
sudo mount //192.168.0.1/linux /media/sharename/ -o username=myusername,password=mypassword,dmask=777,fmask=777
  • To unmount network folder
sudo umount /media/sharename/

Kuinka liitetään/irrotetaan verkkokansiot käynnistyksen yhteydessä ja annetaan kaikille käyttäjille lukuoikeus niihin

e.g. Assumed that network connections have been configured properly
Network computer's IP: 192.168.0.1
Network computer's Username: myusername
Network computer's Password: mypassword
Shared folder's name: linux
Local mount folder: /media/sharename
sudo mkdir /media/sharename
sudo gedit /root/.smbcredentials
  • Insert the following lines into the new file
username=myusername
password=mypassword 
  • Save the edited file
sudo chmod 700 /root/.smbcredentials
sudo cp /etc/fstab /etc/fstab_backup
sudo gedit /etc/fstab
  • Append the following line at the end of file
//192.168.0.1/linux    /media/sharename smbfs  credentials=/root/.smbcredentials    0    0

Kuinka liitetään/irrotetaan verkkokansiot käynnistyksen yhteydessä ja annetaan kaikille käyttäjille luku- ja kirjoitusoikeus niihin

e.g. Assumed that network connections have been configured properly
Network computer's IP: 192.168.0.1
Network computer's Username: myusername
Network computer's Password: mypassword
Shared folder's name: linux
Local mount folder: /media/sharename
sudo mkdir /media/sharename
sudo gedit /root/.smbcredentials
  • Insert the following lines into the new file
username=myusername
password=mypassword
  • Save the edited file
sudo chmod 700 /root/.smbcredentials
sudo cp /etc/fstab /etc/fstab_backup
sudo gedit /etc/fstab
  • Append the following line at the end of file
//192.168.0.1/linux    /media/sharename smbfs  credentials=/root/.smbcredentials,dmask=777,fmask=777  0    0

Kuinka ipw2200-verkkokortti ja wpa otetaan käyttöön

  • See Ubuntuforuns.org how-tos

Kuinka konfiguroidaan ja käynnistetään PPTP-tunneli (VPN)

  • Read #General Notes
  • Use these instructions to automatically install PPTP Client
OR
  • Install manually
wget -c http://linux.edu.lv/uploads/content/pptp.tar.gz
tar zxvf pptp.tar.gz
sudo sh ./pptp/install
  • To configure PPTP Client
sudo gedit /usr/share/applications/pptpconfig.desktop
  • Replace content of this file with the following lines
[Desktop Entry]
Name=PPTP Client
Comment=Configure and start PPTP tunnels (VPN)
Categories=Application;Network
Encoding=UTF-8
Exec=gksudo pptpconfig
Icon=gnome-remote-desktop.png
StartupNotify=true
Terminal=false
Type=Application
  • The above lines change the default file in three ways: the application is placed in the Application/Internet category, gksudo will make the application run as superuser and we put a nice icon that appears in the menu.
  • Start the client with Applications -> Internet -> PPTP Client

Kuinka to Configure Ubuntu/Kubuntu with WPA using Network-Manager

Ubuntu Dapper in typical cases can configure WPA to work out of the box with minimal hassle. You'll need to install network-manager.


For Ubuntu:

sudo apt-get install network-manager-gnome

For Kubuntu (will install knetworkmanager):

sudo apt-get install network-mananger-kde

Logout/Reboot.

Ubuntu users should now see the NetworkManager Applet in the Gnome notification area. Kubuntu users will probably have to run knetworkmanager before they see NetworkManager in the systray.

  • Note: If you get a "The NetworkManager applet could not find some required resources. It cannot continue." message, then:
sudo gtk-update-icon-cache -f /usr/share/icons/hicolor

Once Network-Manager is installed, click on the NM icon in the notification area (default is at the top right of Ubuntu/Gnome). Choose your network, then enter your passphrase. Type a password for the keyring, and you're set.

If you don't see your network, click "Create New Wireless Network...", type your essid/networkname, then choose "WPA Personal" for wireless security.

  • Note: If you installed Kubuntu then installed ubuntu-desktop & network-manager-gnome, you may not be able to use network-manager in Gnome, if at all. In this case, you may have to use WPA Supplicant and do some manual editing of conf files to get WPA up and running.
  • Note: When you first log into Gnome/KDE, the keyring application will ask for a password. Future revisions of Network-Manager should resolve this.

Etähallinta (remote desktop)

Etätyöpöydän konfigurointi (ei turvallinen)

Warning! Remote Desktop will only work if there's a GNOME login session
Leaving computer with an unattended GNOME login session is not secure
Use (System -> Lock Screen) and switch off the monitor when computer is left unattended
  • System -> Preferences -> Remote Desktop
  • Remote Desktop Preferences
Sharing ->
Allow other users to view your desktop (Checked)
Allow other users to control your desktop (Checked)
Security ->
Ask you for confirmation (Un-Checked)
Require the user to enter this password: (Checked)
Password: Specify the password

How to connect into remote Ubuntu desktop

e.g. Assumed that remote Ubuntu machine have configured Remote Desktop
Read #How to configure remote desktop (not secure)
Remote Ubuntu machine: 192.168.0.1
vncviewer -fullscreen 192.168.0.1:0
  • To quit vncviewer
Press 'F8' -> Quit viewer

How to connect into remote Ubuntu desktop via Windows machine

e.g. Assumed that remote Ubuntu machine have configured Remote Desktop
Read #How to configure remote desktop (not secure)
Remote Ubuntu machine: 192.168.0.1
  • If you have a router remember to open the appropiate port the default one is 5900
This process is called port forwarding port forwarding
  • Download DotNetVNC: Here
this is a free DotNet version that require the DotNet framework available from microsoft here
Remember tha this is only one VNC client i've found searching in internet, search the one is more suitable for your interest
  • Open the VNC client you have chosen, and insert the connection string formatted like this <LINUX BOX IP><:DESKTOP NUMBER>|<::PORT>
In example use: 192.168.1.2:0 or 192.168.1.2::5900 to connect to desktop 0, to connect to desktop 1 use 192.168.1.2:1 or 192.168.1.2::5901 and so on


How to connect into remote Ubuntu desktop via OSX

e.g. Assumed that remote Ubuntu machine have configured Remote Desktop
Read #How to configure remote desktop (not secure)
Remote Ubuntu machine: 192.168.0.1
  • If you have a router remember to open the appropiate port the default one is 5900
This process is called port forwarding port forwarding
  • Download ChickenOfTheVNC: Here
  • Open ChickenOfTheVNC, and insert the host (IP adress of remote machine), the display number (0 is default and is port 5900) and the password.
In example use: Host: 192.168.0.1, Display 0, Password: password

Windows

Kuinka Windows-partitiot (NTFS) liitetään tiedostojärjestelmään/irrotetaan tiedostojärjestelmästä käsin?


e.g. Assumed that /dev/hda1 is the location of Windows partition (NTFS)
Local mount folder: /media/windows
  • Liitetään Windows-partitio:
sudo mkdir /media/windows
sudo mount /dev/hda1 /media/windows/ -t ntfs -o nls=utf8,umask=0222
  • Irrotetaan Windows-partitio
sudo umount /media/windows/

How to mount/unmount Windows partitions (FAT) manually, and allow all users to read/write

e.g. Assumed that /dev/hda1 is the location of Windows partition (FAT)
Local mount folder: /media/windows
  • To mount Windows partition
sudo mkdir /media/windows
sudo mount /dev/hda1 /media/windows/ -t vfat -o iocharset=utf8,umask=000
  • To unmount Windows partition
sudo umount /media/windows/

How to mount Windows partitions (NTFS) on boot-up, and allow all users to read only

e.g. Assumed that /dev/hda1 is the location of Windows partition (NTFS)
Local mount folder: /media/windows
sudo mkdir /media/windows
sudo cp /etc/fstab /etc/fstab_backup
sudo gedit /etc/fstab
  • Append the following line at the end of file
/dev/hda1    /media/windows ntfs  nls=utf8,umask=0222 0    0

How to mount Windows partitions (FAT) on boot-up, and allow all users to read/write

e.g. Assumed that /dev/hda1 is the location of Windows partition (FAT)
Local mount folder: /media/windows
sudo mkdir /media/windows
sudo cp /etc/fstab /etc/fstab_backup
sudo gedit /etc/fstab
  • Append the following line at the end of file
/dev/hda1    /media/windows vfat  iocharset=utf8,umask=000  0    0

How to mount Windows partitions (NTFS) on boot-up, and allow users read and write access

Warning: Ntfs writing support is still experimental. You should not enable it on production machines and/or volumes you don't have backups of. Proceed at your own risk!

sudo apt-get install libfuse2 fuse-utils
  • Download the latest ntfsprogs package (these are from the Dapper repositories, so they are safe to install.)

libntfs8 ntfsprogs libfuse2 fuse-utils

  • Install the downloaded packages
sudo dpkg -i libfuse2_*.deb fuse-utils_*.deb ntfsprogs_*.deb libntfs8_*.deb
  • Add fuse to the list of modules to load
echo fuse | sudo tee -a /etc/modules
  • Create a user group to access the ntfs disks
sudo addgroup ntfs
  • The output should look something like this, remember the GID (the number printed after the group name) as it may differ and we will need it later:
Adding group `ntfs' (1002)...
Done.
  • Create the local mount folder folder and edit the fstab file to mount the disks to this folder.
e.g. Assumed that /dev/hda1 is the location of Windows partition (NTFS)
Local mount folder: /media/windows
sudo mkdir /media/windows
sudo cp /etc/fstab /etc/fstab.bak
sudo gedit /etc/fstab
  • Append the following line at the end of file, using the GID number previously. The umask following this GID allows write access just to owner (root) and group (ntfs), and read access to everyone.
/dev/hda1    /media/windows    ntfs-fuse    auto,gid=1002,umask=0002    0    0
  • Save the edited file.
  • Add users to the ntfs group, where "username" is the name of the user you would like to have write access
sudo adduser username ntfs
  • Fix Dapper bug #29865 of the linux-ntfs package:
sudo rm /sbin/mount.ntfs-fuse && sudo ln /usr/bin/ntfsmount /sbin/mount.ntfs-fuse
  • If you reboot now, the disk will be writable to the selected users when they logon. If you want the changes to take effect immediately without rebooting, execute the following command, ignoring the errors about "/" and others not being unmounted. You'll have to logout from all your user sessions for the new group to be acknowledged (usually a logout from your graphical session and login back again will do it).
sudo modprobe fuse && sudo umount -a && sudo mount -a
  • Further troubleshooting is listed at this comprehensive howto thread.

Turvallisuus

What are the basic things I need to know about securing my Ubuntu

  • Read #General Notes
  • Ensure hard drive is first in BIOS boot-up sequence
    • To prevent trespassers from using Linux Installation CD which allows them to gain root user access
    • To prevent trespassers from using Linux Live CD (e.g. UBUNTU/KNOPPIX/MEPIS) which allows them to destroy/browse/share the entire hard drive
    • To prevent trespassers from installing another Operating System
  • Ensure a password is set for BIOS
    • To prevent trespassers from changing the BIOS boot-up sequence
  • Ensure computer is located at a secured place
    • To prevent trespassers from removing computer's hard drive which allows them to destroy/browse/share the entire hard drive from a different computer
    • To prevent trespassers from removing computer's on-board battery which resets the BIOS password
  • Ensure passwords used on the system cannot be easily guessed
    • To prevent trespassers from cracking password file using brute force attacks (e.g. John the Ripper)
    • Create password with minimum length of 8 characters
    • Create password with mixture of characters/numbers, and upper/lower case
  • Ensure interactive editing control for GRUB menu is disabled
  • Ensure history listing is disabled in Console mode
  • Ensure Ctrl+Alt+Del is disabled in Console mode
    • To prevent trespassers from restarting the system without permission in Console mode
    • Read [[#How to disable Ctrl+Alt+Del from restarting computer in Console mode]]
  • Ensure interactive option is set for remove, copy and move of files/folders in Console mode
  • For day to day usage, login as a normal user
  • Disable root user account, use "sudo" instead
    • To reduce the amount of time spent with root privileges, and thus the risk of inadvertently executing a command as root
    • "sudo" provides a more useful audit trail (/var/log/auth.log)
    • Read #How to disable root user account
  • Install a Firewall
  • Perform vulnerability test

How to disable all interactive editing control for GRUB menu

grub
grub> md5crypt
Password: ****** (ubuntu)
Encrypted: $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (encrypted password)
grub> quit
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
sudo gedit /boot/grub/menu.lst
  • Find this section
...
## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
#   password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret
...
  • Add the following line below it
password --md5 $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (encrypted password above)
  • Find this section
...
title		Ubuntu, kernel 2.6.10-5-386 (recovery mode)
root		(hd0,1)
kernel		/boot/vmlinuz-2.6.10-5-386 root=/dev/hda2 ro single
initrd		/boot/initrd.img-2.6.10-5-386
savedefault
boot
...
  • Replace with the following lines
#title		Ubuntu, kernel 2.6.10-5-386 (recovery mode)
#root		(hd0,1)
#kernel		/boot/vmlinuz-2.6.10-5-386 root=/dev/hda2 ro single
#initrd		/boot/initrd.img-2.6.10-5-386
#savedefault
#boot
  • Save the edited file

How to disable history listing in Console mode

rm -f $HOME/.bash_history
touch $HOME/.bash_history
chmod 000 $HOME/.bash_history

How to disable Ctrl+Alt+Del from restarting computer in Console mode

sudo cp /etc/inittab /etc/inittab_backup
sudo gedit /etc/inittab
  • Find this line
...
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
...
  • Replace with the following line
#ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
  • Save the edited file
sudo telinit q

How to enable prompt before removal/overwritten of files/folders in Console mode

sudo cp /etc/bash.bashrc /etc/bash.bashrc_backup
sudo gedit /etc/bash.bashrc
  • Append the following lines at the end of file
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
  • Save the edited file

Huoltotila

Kuinka to gain root user access without login

  • Read #General Notes
  • Easiest method (will not work if GRUB menu password is set)
    • Boot-up computer
    • If GRUB menu is hidden, press 'Esc' to enter the GRUB menu
    • Select
Ubuntu, kernel 2.6.10-5-386 (recovery mode)

How to modify kernel boot-up arguments, to gain root user access

  • Read #General Notes
  • Boot-up computer
  • If GRUB menu is hidden, press 'Esc' to enter the GRUB menu
  • If GRUB password is set, press 'p' to unlock the GRUB menu
  • Select
Ubuntu, kernel 2.6.10-5-386
  • Press 'e' to edit the commands before booting
  • Select
kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda2 ro quiet splash
  • Press 'e' to edit the selected command in the boot sequence
  • Add "rw init=/bin/bash" to the end of the arguments
grub edit> kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda2 ro quiet splash rw init=/bin/bash
  • Press 'b' to boot

How to use Ubuntu Installation CD, to gain root user access

  • Read #General Notes
  • Boot-up computer into Ubuntu Installation CD
  • At "boot:" prompt, add "rescue" to the argument
boot: rescue
  • Follow the instructions on screen

How to change root user/main user password if forgotten

# passwd root
  • To change main user password
# passwd system_main_username

How to change GRUB menu password if forgotten

grub
grub> md5crypt
Password: ****** (ubuntu)
Encrypted: $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (encrypted password)
grub> quit
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
sudo gedit /boot/grub/menu.lst
  • Find this line
...
password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
...
  • Replace with the following line
password --md5 $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (encrypted password above)
  • Save the edited file

How to restore GRUB menu after Windows installation

e.g. Assumed that /dev/hda is the location of /boot partition
# grub-install /dev/hda

How to add Windows entry into GRUB menu

e.g. Assumed that /dev/hda1 is the location of Windows partition
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
sudo gedit /boot/grub/menu.lst
  • Append the following lines at the end of file
title		Microsoft Windows
root		(hd0,0)
savedefault
makeactive
chainloader	+1
  • Save the edited file

How to read Linux partitions (ext2, ext3) in Windows machine

OR
  • See www.fs-driver.org

Taikatemppuja

Kuinka GNOME päivitetään, ilman että konetta käynnistetään uudestaan

Press 'Ctrl + Alt + Backspace'
or
sudo /etc/init.d/gdm restart

Kuinka to turn on Num Lock on GNOME startup

sudo apt-get install numlockx
sudo cp /etc/X11/gdm/Init/Default /etc/X11/gdm/Init/Default_backup
sudo gedit /etc/X11/gdm/Init/Default
  • Find this line
...
exit 0
  • Add the following lines above it
if [ -x /usr/bin/numlockx ]; then
 /usr/bin/numlockx on
fi

How to run programs on startup when login into GNOME

Startup Programs Tab -> Add/Edit/Delete

Kuinka to speed-up your Ubuntu box

  • Read the following post: http://ubuntuforums.org/showthread.php?t=189192

Kuinka to switch to Päätemodeen GNOMEssa

Press 'Ctrl + Alt + F1' (F2 - F6)
  • To switch between consles in Console mode
Press 'Alt + F1' (F2 - F6)
  • To switch back to GNOME mode
Press 'Alt + F7'

Kuinka estää Ctrl+Alt+Backspace käynnistämästä X-palvelinta uudestaan (Gnomessa)

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup
sudo gedit /etc/X11/xorg.conf
  • Append the following lines at the end of file
Section "ServerFlags"
	Option		"DontZap"		"yes"
EndSection

Kuinka Ctrl+Alt+Del asetetaan avaamaan System Monitor (Gnomessa)

gconftool-2 -t str --set /apps/metacity/global_keybindings/run_command_9 "<Control><Alt>Delete"
gconftool-2 -t str --set /apps/metacity/keybinding_commands/command_9 "gnome-system-monitor"

Kuinka Gnome-työpöytä päivitetään

killall nautilus

Kuinka to refresh GNOME panel

killall gnome-panel


Kuinka Gedit-editorissa otetaan automaattinen tallennus käyttöön ja poistetaan varmuuskopioiden ottaminen

  • Read #General Notes
  • Applications -> System Tools -> Configuration Editor
  • Configuration Editor
/ -> apps -> gedit-2 -> preferences -> editor -> save -> create_backup_copy (Unchecked)
/ -> apps -> gedit-2 -> preferences -> editor -> save -> auto_save (Checked)

Kuinka Nautilus saadaan näyttämään kätketyt tiedostot ja kansiot

  • Read #General Notes
  • Places -> Home Folder
  • To temporary show all hidden files/folders in Nautilus
Press 'Ctrl + H'
  • To permanently show all hidden files/folders in Nautilus
Edit Menu -> Preferences
Views Tab -> Default View -> Show hidden and backup files (Checked)

Kuinka tiedostoja selataan Nautiluksen avulla pääkäyttäjänä

sudo gedit /usr/share/applications/Nautilus-root.desktop
    • Insert the following lines into the new file
[Desktop Entry]
Name=File Browser (Root)
Comment=Browse the filesystem with the file manager
Exec=gksudo "nautilus --browser %U"
Icon=file-manager
Terminal=false
Type=Application
Categories=Application;System;
  • To browse files/folders as root user in Nautilus
    • Applications -> System Tools -> File Browser (Root)

Kuinka vaihdetaan tiedostotyypin avaavaa oletusohjelmaa

Right click on file -> Properties
Open With Tab -> Add
Select "Open with" program
Select "Open with" program (Checked)

Kuinka sähköpostiohjelmaoletus vaihdetaan Mozilla Thunderbird-ohjelmaksi

Mail Reader Tab -> Default Mail Reader -> Command: mozilla-thunderbird %s

Kuinka oikea hiirinäppäin saadaan avaamaan tiedostot pääkäyttäjänä

gedit $HOME/.gnome2/nautilus-scripts/Open\ as\ root
  • Insert the following lines into the new file
for uri in $NAUTILUS_SCRIPT_SELECTED_URIS; do
	gksudo "gnome-open $uri" &
done
  • Save the edited file
chmod +x $HOME/.gnome2/nautilus-scripts/Open\ as\ root
Right click on file -> Scripts -> Open as root

Kuinka päätteen äänimerkki otetaan pois päältä

Not for Dapper---- firingstone

Edit Menu -> Current Profile...
General Tab -> General -> Terminal bell (Un-Checked)

Kuinka to handle mss protocol in Mozilla Firefox


  • Open your firefox.
  • Type as url: about:config

Now just right click somewhere into the main window. A little box with options to choose will appear. Choose "new", then "string". Then copy the following line into the appearing text field:

network.protocol-handler.app.mms

Into the next text field copy this:

/usr/bin/X11/vlc

Now you do the same thing again, but this time you do not choose "string" but "boolean", and the line to copy is:

network.protocol-handler.external.mms

Then set

true

Kuinka to handle rtsp (realmedia) protocol in Mozilla Firefox


  • Open your firefox.
  • Type as url: about:config

Now just right click somewhere into the main window. A little box with options to choose will appear. Choose "new", then "string". Then copy the following line into the appearing text field:

network.protocol-handler.app.rtsp

Into the next text field copy this:

/usr/bin/X11/realplay

Now you do the same thing again, but this time you do not choose "string" but "boolean", and the line to copy is:

network.protocol-handler.external.rtsp

Then set

true

Kuinka Mozilla Firefox saadaan lataamaan sivu nopeammin

  • Read #General Notes
  • Applications -> Internet -> Firefox Web Browser
  • Mozilla Firefox
Address Bar -> about:config
Filter: ->
network.dns.disableIPv6 -> true
network.http.pipelining -> true
network.http.pipelining.maxrequests -> 8
network.http.proxy.pipelining -> true
  • Restart Mozilla Firefox

Kuinka to disable beep sound for link find function in Mozilla Firefox

  • Read #General Notes
  • Applications -> Internet -> Firefox Web Browser
  • Mozilla Firefox
Address Bar -> about:config
Filter: -> accessibility.typeaheadfind.enablesound -> false
  • Restart Mozilla Firefox


Yksinkertainen pakettienhallinta (Synaptic)

  • Read #General Notes
  • System -> Administration -> Synaptic Package Manager
  • To enable the extra Universe and Multiverse repositories
    1. Settings -> Repositories
    2. In the Installation Media tab, click Add. There are three separate repositories; Dapper Drake, Security Updates and Updates. Select each repository and check Officially supported, Restricted copyright, Community maintained (Universe) and Non-free (Multiverse). Ensure you click OK between each repository to save your changes
    3. You should now see those three repositories under Channels. Make sure Officially supported, Restricted copyright, Community maintained (Universe) and Non-free (Multiverse) appears under each repository
  • To add backports and PLF (new versions of many applications. Unsupported. May contain illegal packages. Use at own risk.)
    1. Settings -> Repositories
    2. Click on Add and then Custom
    3. Paste the following four lines into the box and click Add Repository, one line at a time:
deb http://archive.ubuntu.com/ubuntu dapper-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu dapper-backports main restricted universe multiverse
deb http://packages.freecontrib.org/ubuntu/plf dapper free non-free
deb-src http://packages.freecontrib.org/ubuntu/plf dapper free non-free 
deb http://archive.canonical.com/ubuntu dapper-commercial main
  • Päivitä pakettiluettelo (vastaa komentorivin komentoa: apt-get update)
Edit Menu -> Reload Package Information
  • Asenna kaikki mahdolliset päivitykset (vastaa komentorivin komentoa: apt-get upgrade)
Edit Menu -> Mark All Upgrades... -> Default Upgrade
Edit Menu -> Apply Marked Changes
  • Etsi pakettia (vastaa komentorivin komentoa: apt-cache search paketin_nimi)
Edit Menu -> Search... anna paketin nimi
  • Asenna valitsemasi paketti (vastaa komentorivin komentoa: apt-get install paketin_nimi)
Edit Menu -> Apply Marked Changes
  • Poista valitsemasi paketti (vastaa komentorivin komentoa: apt-get remove paketin_nimi)
Select "package_name"
Package Menu -> Mark for Removal
Edit Menu -> Apply Marked Changes

Mitä paketteja ylimääräisissä pakettivarastoissa on?

  • The PLF repository provides
    1. DVD playback support (libdvdcss2)
    2. Skype
    3. Sun Java SDK (Software Development Kit) and JRE (Java Runtime Environment)
    4. Opera Web browser
    5. RealPlayer 10
    6. Win32 binary multimedia codecs

Kuinka .deb-paketteja asennetaan tai poistetaan?

sudo dpkg -i package_file.deb
  • To uninstall .deb file
sudo dpkg -r package_name

Kuinka to convert .rpm files to .deb files

sudo alien package_file.rpm

Kuinka hakemiston kaikki tiedostot uudelleennimetään kerralla

wget -c http://easylinux.info/uploads/mvb_1.6.tgz
sudo tar zxvf mvb_1.6.tgz -C /usr/share/
sudo chown -R root:root /usr/share/mvb_1.6/
sudo ln -fs /usr/share/mvb_1.6/mvb /usr/bin/mvb
  • To rename all files in directory at once
mvb NEW_NAME

Kuinka hakemiston kaikkia kuvatiedostoja muokataan kerralla?

sudo apt-get install imagemagick
wget -c http://easylinux.info/uploads/bbips.0.3.2.sh
sudo cp bbips.0.3.2.sh /usr/bin/bbips
sudo chmod 755 /usr/bin/bbips
  • To manipulate all image files in directory at once
bbips

Kuinka järjestelmänlaajuisia ympäristömuuttujia asetetaan?

sudo cp -p /etc/profile /etc/profile_backup
sudo gedit /etc/profile
  • Append the System-wide Environment Variables at the end of file
  • Save the edited file

How to save "man" outputs into files

man command | col -b > file.txt

Kuinka GRUB-valikko piilotetaan?

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
sudo gedit /boot/grub/menu.lst
  • Find this line
...
#hiddenmenu
...
  • Replace with the following line
hiddenmenu
  • Save the edited file

Kuinka to change the timeout seconds for GRUB menu on boot-up

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
sudo gedit /boot/grub/menu.lst
  • Find this line
...
timeout     3
...
  • Replace with the following line
timeout     X_seconds
  • Save the edited file

Kuinka vaihdetaan GRUB:n oletusarvoisesti käynnistämä järjestelmä

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
sudo gedit /boot/grub/menu.lst
  • Etsi rivi
...
default     0
...
  • Korvaa seuraavalla rivillä
default     X_sequence
  • Tallenna rivi

How to display Splash Image for GRUB menu on boot-up

e.g. Assumed that hd0,1 is the location of Ubuntu boot partition
wget -c http://easylinux.info/uploads/ubuntu.xpm.gz
chmod 644 ubuntu.xpm.gz
sudo mkdir /boot/grub/images
sudo cp ubuntu.xpm.gz /boot/grub/images/
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
sudo gedit /boot/grub/menu.lst
  • Find this section
# menu.lst - See: grub(8), info grub, update-grub(8)
#      grub-install(8), grub-floppy(8),
#      grub-md5-crypt, /usr/share/doc/grub
#      and /usr/share/doc/grub-doc/.
...
  • Add the following line below it
splashimage (hd0,1)/boot/grub/images/ubuntu.xpm.gz
  • Save the edited file

How to convert Wallpaper to Splash Image for GRUB menu

e.g. Assumed that wallpaper.png is the Wallpaper to be converted to Splash Image
splashimage.xpm.gz is the Splash Image for GRUB menu
convert -resize 640x480 -colors 14 wallpaper.png splashimage.xpm && gzip splashimage.xpm

Kuinka GRUB:n valikkoa muokataan näyttämään vain yksi kernel

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup-`date +%F`
sudo gedit /boot/grub/menu.lst
  • Etsi seuraava rivi:
...
# howmany=all
...
  • Korvaa seuraavalla rivillä:
# howmany=1

Arvo 1 tarkoittaa, että viimeisin kernel säilytetään, arvo 2 säilyttää kaksi kerneliä jne. Älä poista merkkiä #. Valikko päivittyy samalla kun järjestelmään asennetaan seuraava uusi kernel, ei aikaisemmin.

  • Tallenna muokkaamasi tiedosto

How to temporary skip boot-up services

Press 'Ctrl + C'

Kuinka to muokataan automaattisesti käynnistyviä palvelimia

Kuinka to clean /tmp/ folder contents on shutdown

sudo cp /etc/init.d/sysklogd /etc/init.d/sysklogd_backup
sudo gedit /etc/init.d/sysklogd
  • Find this section
...
 stop)
  log_begin_msg "Stopping system log daemon..."
  start-stop-daemon --stop --quiet --oknodo --exec $binpath --pidfile $pidfile
  log_end_msg $?
...
  • Add the following line below it
  rm -fr /tmp/* /tmp/.??*
  • Save the edited file

How to scroll up and down to view previous outputs in Console mode

Press 'Shift + Page Up'
  • To scroll down to view previously outputs
Press 'Shift + Page Down'

How to find out which version of Ubuntu I am using

cat /etc/issue

Automaattinen taustan muuttaminen (GNOME)

mkdir ~/.backgrounds
cd ~/.backgrounds
wget -c http://easylinux.info/uploads/change_background.py
chmod +x change_background.py
  • Muuttaaksesi taustakuvan joka käynnistyksen yhteydessä
export EDITOR=gedit && crontab -e
  • Lisää seuraava rivi tiedoston loppuun:
@reboot ~/.backgrounds/change_background.py
Lisätietoja ajastetuista prosesseista (cronjob) saat:
man 5 crontab

Kuinka KDE:n taustakuva saadaan vaihtumaan automaattisesti

  • Go to K-menu -> System Settings -> Desktop -> Background
  • Choose Slide Show
  • Press Setup...
  • Press Add... to add pictures you wish to see as desktop background
  • Set 'Change picture after' to desired picture rotation interval.
  • Press 'OK'

How to add keyboard layouts for other languages

  • Go to System -> Preferences -> Keyboard
  • Choose Layouts
  • Press Add... to add the secondary keyboard layout. It is simpler to have two layouts; the maximum is currently four for Xorg.
  • Choose Layout Options
  • Expand option Group Shift/Lock behaviour
  • Choose the key combination that enables you to switch between keyboard layouts. The default is by pressing both Alt keys at the same time. A common alternative is to use Alt+Shift.
  • Press Close.

See #How to add the Keyboard (Layout) Indicator applet to add the Keyboard Indicator applet.

How to add keyboard layouts toggle for other languages (Xfce)

  • use *.lst files on /etc/X11/xkb/rules to select 2nd_laguage_code
setxkbmap -option grp:switch,grp:alt_shift,grp_led:scroll us,2nd_laguage_code
  • you can add it to a startup file, which will be set to be executed on startup, with the following lines (remember to 'chmod +x' the file):
#!/bin/tcsh
setxkbmap -option grp:switch,grp:alt_shift,grp_led:scroll us,il

How to add the Keyboard (Layout) Indicator applet

  • Right-click on empty space on the top panel so that you see the pop-up menu.
  • Click Add to Panel...
  • Choose Keyboard Indicator (it is under the Utilities section, at the end)

The Keyboard Indicator applet appears on the panel. The default language should be USA for U.S. English. You can either right-click on this applet for more options or see above on how to configure.

How to type extended characters

  • Add the keyboard layout US English International (with dead keys)
  • Make US English International (with dead keys) the default keyboard layout.

The key marked ['"] is now a dead key. When you press it, nothing happens. However if you press a consonant immediately afterwards, the consonant appears with an accent.

  • ' + a = á
  • ' + e = é
  • and so on for i-í, o-ó, y-ý, c-ć, z-ź, n-ń, l-ĺ, u-ú, r-ŕ
  • " + a = ä
  • " + e = ë
  • and so on for y-ÿ, u-ü, i-ï, o-ö

Similarly, ` and a consonant generates à, è, ù, ì, ò. Similarly, ~ and a consonant generates ã, ũ, ĩ, õ, ñ.

To type ' and ", press RightAlt+' and RightAlt+" respectively. To type ' and ", you may also press '+<space> and "+<space> respectively.

There are more characters available by keeping RightAlt pressed and typing a character. Therefore,

  • RightAlt+q = ä
  • RightAlt+w = Ã¥
  • RightAlt+e = é
  • RightAlt+r = ®
  • RightAlt+t = þ
  • RightAlt+y = ü
  • RightAlt+u = ú
  • RightAlt+i = í
  • RightAlt+o = ó
  • RightAlt+p = ö
  • RightAlt+[ and ] for « and » respectively.
  • RightAlt+a = á
  • RightAlt+s = ß
  • RightAlt+d = ð
  • RightAlt+l = ø
  • RightAlt+; = ¶
  • RightAlt+: = °
  • RightAlt+z = æ
  • RightAlt+c = ©
  • RightAlt+n = ñ
  • RightAlt+m = µ
  • RightAlt+, = ç
  • RightAlt+/ = ¿
  • RightAlt+1 = ¡
  • RightAlt+2 = ²
  • RightAlt+3 = ³
  • RightAlt+4 = ¤
  • RightAlt+5 = €
  • RightAlt+6 = ¼
  • RightAlt+7 = ½
  • RightAlt+8 = ¾
  • RightAlt+9 = ‘
  • RightAlt+0 = ’
  • RightAlt+- = Â¥
  • RightAlt+= = ×
  • RightAlt+! = ¹
  • RightAlt+@, then o = ő (and Ő).
  • RightAlt+#, then a = ā (and Ā). Similarly for ēĒ, ūŪ, īĪ, ōŌ.
  • RightAlt+$ = £
  • RightAlt+% =
  • RightAlt+^ =
  • RightAlt+& =
  • RightAlt+*, then a = ą (and Ą). Similarly for ęĘ, įĮ.
  • RightAlt+(, then a = ă (and Ă)
  • RightAlt+(, then g = ğ (and Ğ)
  • RightAlt+), then a = Ã¥ (and Å)
  • RightAlt+_ =
  • RightAlt++ = ÷

How to set the Compose key to type special characters

  • Click System, Preferences, Keyboard.
  • Under Layout Options, expand on Compose key position.
  • Choose Right-Win key is compose, click Close.

Now you can type extended characters using the RightWin key (next to AltGr), according to this keyboard settings file. Specifically, the lines that start with GDK_Multi_key are those that we can use here. The Compose key is actually GDK_Multi_key.

Some examples,

  • RightWin + C + = produces €
  • RightWin + = + C produces €
  • RightWin + C + O produces ©
  • RightWin + O + C produces ©
  • RightWin + a + ' produces á
  • RightWin + a + " produces ä
  • RightWin + a + ` produces à
  • RightWin + a + ~ produces ã
  • RightWin + a + * produces Ã¥
  • RightWin + a + ^ produces â
  • RightWin + a + > produces â
  • RightWin + a + , produces ą
  • RightWin + e + - produces ē
  • RightWin + S + 1 produces ¹
  • RightWin + S + 2 produces ²
  • RightWin + S + 3 produces ³

How to install ubuntu-title font used in Ubuntu logo

sudo apt-get install ttf-ubuntu-title

Now you can use this font in your favorite applications

Palvelinkäyttö

AntiVirus Server

How to install ClamAV AntiVirus Server

sudo apt-get install clamav

Kuinka virustietokannat päivitetään käsin

sudo freshclam

Kuinka tarkastetaan tiedostoja/kansioita virusten varalta käsin

sudo clamscan -r /location_of_files_or_folders

Kuinka tarkastetaan tiedostoja/kansioita virusten varalta automaattisesti

e.g. Automatically scan files/folders for viruses at midnight everyday
* * * * * means minute hour date month year
export EDITOR=gedit &&  sudo crontab -e
  • Append the following line at the end of file
00 00 * * *  sudo clamscan -r /location_of_files_or_folders
  • Tallenna muuttamasi tiedosto

Kirjoitinpalvelin (cupsd)

Kuinka cupsd asemmetaam

Cupsd should be automatically installed during standard instaltion. Checkout if there is a file "/etc/init.d/cupsys". If you want to manually install it, do
 sudo apt-get install cupsys*

Kuinka kirjoitin lisätään

In gnome click on "System/Administration/Printing. And choose "Add printer". A "add printer wizard" should start and tell you what to do.

Kuinka tulostat toiselta Ubuntu-koneelta toisen Ubuntun kirjoittimeen

  • Varmista, että kirjoitin on oikein konfiguroitu
  • Server ip address: 192.168.0.1
  • Client ip address: 192.168.0.23
    • Palvelimen konfigurointi
 sudo cp /etc/cups/cupsd.conf /etc/cups/cupsd.conf.backup
 sudo gedit /etc/cups/cupsd.conf
etsi osa
<Location />
  ...
  Allow localhost
  ...
</Location>
lisää siihen seuraava rivi.
 Allow 192.168.0.23
Käynnistä cups uudestaan.
 sudo /etc/init.d/cupsys restart
    • Asiakkaan konfigurointi
 sudo cp /etc/cups/client.conf /etc/cups/client.conf.backup
 sudo gedit /etc/cups/client.conf
Lisää seuraava rivi
 ServerName 192.168.0.1
Käynnistä cups uudestaan
 sudo /etc/init.d/cupsys restart
Kokeile komentoa "lpq". Jotain seuraavantapaista pitäisi tulla näkyviin
 vitek@lightfox:~$ lpq
 HPLJ6P is ready
 no entries

Kuinka tulostat Windows-koneelta Ubuntun kirjoittimeen

Samba-palvelin

Kuinka asentaa Samba Serverin tiedostoille/kansioille sharing service

sudo apt-get install samba smbfs

Kuinka verkon käyttäjiä muokataan

sudo smbpasswd -a system_username
sudo gedit /etc/samba/smbusers
    • Lisää seuraavat rivit tiedostoon ja tallenna
system_username = "network username"
  • To edit network user
sudo smbpasswd -a system_username
  • To delete network user
sudo smbpasswd -x system_username

Kuinka kotikansio jaetaan antaen vain lukuoikeus (Authentication=Yes)

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf
  • Etsi tämä rivi
...
;  security = user
...
  • ja korvaa se seuraavilla riveillä ja tallenna
  security = user
  username map = /etc/samba/smbusers
sudo testparm
sudo /etc/init.d/samba restart

Kuinka kotikansio jaetaan antaen sekä luku- että kirjoitusoikeus (Authentication=Yes)

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf
  • Etsi tämä rivi
...
;  security = user
...
  • ja korvaa se tällä ja tallenna
  security = user
  username map = /etc/samba/smbusers
  • Etsi tämä osa:
...
# By default, the home directories are exported read-only. Change next
# parameter to 'yes' if you want to be able to write to them.
  writable = no
...
  • Muuta writable-asetus:
# By default, the home directories are exported read-only. Change next
# parameter to 'yes' if you want to be able to write to them.
  writable = yes
sudo testparm
sudo /etc/init.d/samba restart

How to share group folders with read only permission (Authentication=Yes)

sudo mkdir /home/group
sudo chmod 777 /home/group/
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf
  • Find this line
...
;  security = user
...
  • Replace with the following lines
 security = user
 username map = /etc/samba/smbusers
  • Append the following lines at the end of file
[Group]
  comment = Group Folder
  path = /home/group
  public = yes
  writable = no
  valid users = system_username1 system_username2
  create mask = 0700
  directory mask = 0700
  force user = nobody
  force group = nogroup
sudo testparm
sudo /etc/init.d/samba restart

Kuinka to share group folders with read/write permissions (Authentication=Yes)


sudo mkdir /home/group
sudo chmod 777 /home/group/
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf
  • Etsi tämä rivi
...
;  security = user
...
  • ja korvaa se tällä
  security = user
  username map = /etc/samba/smbusers
  • Append the following lines at the end of file
[Group]
  comment = Group Folder
  path = /home/group
  public = yes
  writable = yes
  valid users = system_username1 system_username2
  create mask = 0700
  directory mask = 0700
  force user = nobody
  force group = nogroup
sudo testparm
sudo /etc/init.d/samba restart

Kuinka to share public folders with read only permission (Authentication=Yes)


sudo mkdir /home/public
sudo chmod 777 /home/public/
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf
  • Find this line
...
;  security = user
...
  • Replace with the following lines
  security = user 
  username map = /etc/samba/smbusers
  • Append the following lines at the end of file
[public]
  comment = Public Folder
  path = /home/public
  public = yes
  writable = no
  create mask = 0777
  directory mask = 0777
  force user = nobody
  force group = nogroup
sudo testparm
sudo /etc/init.d/samba restart

Kuinka to share public folders with read/write permissions (Authentication=Yes)

sudo mkdir /home/public
sudo chmod 777 /home/public/
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf
  • Find this line
...
;  security = user
...
  • Replace with the following lines
  security = user
  username map = /etc/samba/smbusers
  • Append the following lines at the end of file
[public]
  comment = Public Folder
  path = /home/public
  public = yes
  writable = yes
  create mask = 0777
  directory mask = 0777
  force user = nobody 
  force group = nogroup
sudo testparm
sudo /etc/init.d/samba restart

Kuinka to share public kansiot with read only permission (Authentication=No)

sudo mkdir /home/public
sudo chmod 777 /home/public/
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf
  • Find this line
...
;  security = user
...
  • Replace with the following line
  security = share
  • Append the following lines at the end of file JA tallenna
[public]
  comment = Public Folder
  path = /home/public
  public = yes
  writable = no
  create mask = 0777
  directory mask = 0777
  force user = nobody
  force group = nogroup
  • lisää päätteeseen
sudo testparm
sudo /etc/init.d/samba restart

Kuinka to share public folders with read/write permissions (Authentication=No)

sudo mkdir /home/public
sudo chmod 777 /home/public/
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
sudo gedit /etc/samba/smb.conf
  • Find this line
...
;  security = user
...
  • Replace with the following line
  security = share
  • Append the following lines at the end of file
[public]
  comment = Public Folder
  path = /home/public
  public = yes
  writable = yes
  create mask = 0777
  directory mask = 0777
  force user = nobody
  force group = nogroup
  • Tallenna
sudo testparm
sudo /etc/init.d/samba restart

Kuinka tulostaan samban kautta toisella Ubuntu-koneella

 sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.backup
 gedit /etc/samba/smb.conf
Etsi seuraavat rivit
 ...
 # printing = cups
 # printcap name = cups
 ...
ja poista #-merkki niiden alusta.
 printing = cups
 printcap name = cups
Käynnistä cups-palvelin uudestaan
 sudo /etc/init.d/cupsys restart
Nyt tulostimet toimivat Ubuntussasi, kone pitäisi löytyä samban kautta.

SSH Serveri

Kuinka asentaa SSH Server for remote administration service


sudo apt-get install ssh

Kuinka to SSH into remote Ubuntu machine

e.g. Assumed that remote Ubuntu machine have installed SSH Server service
Read #How to install SSH Server for remote administration service
Remote Ubuntu machine: 192.168.0.1
ssh username@192.168.0.1

Kuinka to copy files/folders from remote Ubuntu machine into local machine (scp)

e.g. Assumed that remote Ubuntu machine have installed SSH Server service
Read #How to install SSH Server for remote administration service
Remote Ubuntu machine: 192.168.0.1
Remote files/folders location: /home/username/remotefile.txt
Local machine save location: . (current directory)
scp -r username@192.168.0.1:/home/username/remotefile.txt .

Kuinka to copy files/folders from local machine into remote Ubuntu machine (scp)

e.g. Assumed that remote Ubuntu machine have installed SSH Server service
Read #How to install SSH Server for remote administration service
Local files/folders location: localfile.txt
Remote Ubuntu machine: 192.168.0.1
Remote Ubuntu machine save location: /home/username/
scp -r localfile.txt username@192.168.0.1:/home/username/

Kuinka to copy files/folders from remote Ubuntu machine into local machine (rsync)

e.g. Assumed that remote Ubuntu machine have installed SSH Server service
Read #How to install SSH Server for remote administration service
Remote Ubuntu machine: 192.168.0.1
Remote files/folders location: /home/username/remotefile.txt
Local machine save location: . (current directory)
rsync -v -u -a --delete --rsh=ssh --stats username@192.168.0.1:/home/username/remotefile.txt .

Kuinka to copy files/folders from local machine into remote Ubuntu machine (rsync)

e.g. Assumed that remote Ubuntu machine have installed SSH Server service
Read #How to install SSH Server for remote administration service
Local files/folders location: localfile.txt
Remote Ubuntu machine: 192.168.0.1
Remote Ubuntu machine save location: /home/username/
rsync -v -u -a --delete --rsh=ssh --stats localfile.txt username@192.168.0.1:/home/username/

Kuinka liitetään toisen koneen kansioita paikalliseen Ubuntu-järjestelmään (sshfs)

Tässä oletetaan, että etäkoneelle on asennettu SSH-palvelin
Lue #How to install SSH Server for remote administration service
Etäkone: 192.168.0.1
Etäkoneen kansio: /media/music
  • Asennetaan sshfs
sudo apt-get install sshfs
  • Ladataan kernel-ajuri sshfs-tiedostojärjestelmää varten
sudo modprobe fuse
  • Pysyvää käyttöä varten lisää 'fuse' /etc/modules -tiedoston loppuun
sudo gedit /etc/modules
  • Liitetään käyttäjä ryhmään 'fuse'
sudo adduser your_user_name fuse
  • Luodaan hakemisto, johon etäkoneen kansio liitetään
mkdir ~/remote_music
  • Liitetään kansio hakemistoon ~/remote_music
sshfs 192.168.0.1:/media/music ~/remote_music

How to SSH into remote Ubuntu machine via Windows machine

e.g. Assumed that remote Ubuntu machine have installed SSH Server service
Read #How to install SSH Server for remote administration service
  • Download PuTTY: Here


How to copy files/folders from/into remote Ubuntu machine via Windows machine

e.g. Assumed that remote Ubuntu machine have installed SSH Server service
Read #How to install SSH Server for remote administration service
  • Download FileZilla: Here

Kuinka asetaan käyttäjät, jotka voivat kirjautua ssh:n kautta sisään

Jos otat SSH-palvelimen käyttöön, voi oletuksena kuka tahansa käyttäjä kirjautua sisään etäkäyttäjänä
Tästä voi aiheutua turvallisuusongelmia, koska on olemassa välineitä, joiden avulla
yritetään ohjelmallisesti etsiä yleisiä käyttäjätunnus-salasana -yhdistelmiä.


  • Tee aluksi varmuuskopio ssh-palvelimen asetustiedostosta

sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.VARMUUSKOPIO

  • Muokkaa asetustiedostoa

sudo gedit /etc/ssh/sshd_config

  • Muuta asetus PermitRootLogin (alunperin yes) arvoonno. Pääkäyttäjä ei saa kirjautua etäkäyttäjänä sisään.
  • Lisää parametri AllowUsers ja anna pilkulla erotettuna luettelo käyttäjistä, jotka saavat kirjautua sisään ssh:n kautta
  • Voit myös käyttää asetusta DenyUsers tarkkaa käyttäjäoikeuksien säätämistä varten.
  • Jos otat openssh-palvelimen käyttöön, että halua toistaiseksi sallia etäyhteyksiä, voit lisätä sanat AllowUsers nosuchuserhere estääksesi kaikkia kirjautumasta.

DHCP Server

How to install DHCP Server for automatic IP addresses assignment

e.g. Assumed that "eth0" is the interface for network card
IP Address Range: 192.168.0.100 to 192.168.0.200
Subnet Mask: 255.255.255.0
DNS Servers: 202.188.0.133, 202.188.1.5
Domains: tm.net.my
Gateway Address: 192.168.0.1
sudo apt-get install dhcp3-server
sudo cp /etc/default/dhcp3-server /etc/default/dhcp3-server_backup
sudo gedit /etc/default/dhcp3-server
  • Find this line
...
INTERFACES=""
  • Replace with the following line
INTERFACES="eth0"
  • Save the edited file
sudo cp /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf_backup
sudo gedit /etc/dhcp3/dhcpd.conf
  • Find this section
...
# option definitions common to all supported networks...
option domain-name "example.org";
option domain-name-servers ns1.example.org, ns2.example.org;
default-lease-time 600;
max-lease-time 7200;
...
  • Replace with the following lines
# option definitions common to all supported networks...
#option domain-name "example.org";
#option domain-name-servers ns1.example.org, ns2.example.org;
#default-lease-time 600;
#max-lease-time 7200;
  • Find this section
...
# A slightly different configuration for an internal subnet.
#subnet 10.5.5.0 netmask 255.255.255.224 {
# range 10.5.5.26 10.5.5.30;
# option domain-name-servers ns1.internal.example.org;
# option domain-name "internal.example.org";
# option routers 10.5.5.1;
# option broadcast-address 10.5.5.31;
# default-lease-time 600;
# max-lease-time 7200;
#}
...
  • Replace with the following lines
# A slightly different configuration for an internal subnet.
subnet 192.168.0.0 netmask 255.255.255.0 {
 range 192.168.0.100 192.168.0.200;
 option domain-name-servers 202.188.0.133, 202.188.1.5;
 option domain-name "tm.net.my";
 option routers 192.168.0.1;
 option broadcast-address 192.168.0.255;
 default-lease-time 600;
 max-lease-time 7200;
}
  • Save the edited file
sudo /etc/init.d/dhcp3-server restart


Database Server

How to install MYSQL Database Server

sudo apt-get install mysql-server
  • MySQL initially only allows connections from the localhost (127.0.0.1). We'll need to remove that restriction if you wish to make it accessible to everyone on the internet. Open the file /etc/mysql/my.cnf
sudo gedit /etc/mysql/my.cnf
  • Find the line bind-address = 127.0.0.1 and comment it out
...
#bind-address           = 127.0.0.1
...
  • MySQL comes with no root password as default. This is a huge security risk. You'll need to set one. So that the local computer gets root access as well, you'll need to set a password for that too. The local-machine-name is the name of the computer you're working on. For more information see here
mysqladmin -u root password your-new-password
mysqladmin -h root@local-machine-name -u root password your-new-password
sudo /etc/init.d/mysql restart

How to install MYSQL Administrator

sudo apt-get install mysql-admin

Apache HTTP Serveri

Kuinka asentaa Apache HTTP Server for HTTP (Web) Server service

sudo apt-get install apache2
  • http://localhost

Kuinka asentaa PHP-tuki Apache HTTP -palvelimeen

Kuinka PHP4 asennetaan
sudo apt-get install php4
sudo apt-get install libapache2-mod-php4
sudo /etc/init.d/apache2 restart
  • Kokeile onko php4 asennettu oikein
sudo gedit /var/www/testphp.php
  • Kirjoita seuraava rivi uuteen tiedostoon
<?php phpinfo(); ?>
  • Tallenna tiedosto
  • http://localhost/testphp.php
  • Muista poistaa kokeilutiedosto jälkikäteen, se voi olla turvallisuusriski
Kuinka PHP5 asennetaan
sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
sudo /etc/init.d/apache2 restart
  • Kokeile onko php4 asennettu oikein
sudo gedit /var/www/testphp.php
  • Kirjoita seuraava rivi uuteen tiedostoon
<?php phpinfo(); ?>
  • Tallenna tiedosto
  • http://localhost/testphp.php
  • Muista poistaa kokeilutiedosto jälkikäteen, se voi olla turvallisuusriski

Kuinka MYSQL asennetaan Apache-palvelinta varten

sudo apt-get install libapache2-mod-auth-mysql
  • Valitse joko php4-mysql tai php5-mysql riippuen siitä, minkä php-version olet asentanut järjestelmääsi
sudo apt-get install php<version-number>-mysql
sudo apt-get install phpmyadmin
  • Jotta php toimisi yhdessä MySQL-tietokannan kanssa, avaa tiedosto (korvaa <version> numerolla 4 tai 5 riippuen php:n versiosta)
sudo gedit /etc/php<version>/apache2/php.ini
  • Ota pois kommenttimerkki (#) rivin ";extension=mysql.so" alusta. Nyt rivin pitäisi näyttää tältä:
...
extension=mysql.so
...
  • Tallenna tiedosto ja poistu
sudo /etc/init.d/apache2 restart
  • http://localhost/phpmyadmin

Kuinka annetaan URL kansiolle, joka ei sijaitse kansiossa /var/www/

sudo gedit /etc/apache2/conf.d/alias
  • Liitä seuraavat rivit uuteen tiedostoon:
Alias /URL-path /location_of_folder/
<Directory /location_of_folder/>
  Options Indexes FollowSymLinks
  AllowOverride All
  Order allow,deny
  Allow from all
</Directory>
  • Tallenna muokkaamasi tiedosto ja käynnistä apache uudestaan
sudo /etc/init.d/apache2 restart
  • http://localhost/URL-path

Kuinka muuttaa oletusporttinumeroa Apache-palvelimessa

oletetaan, että uusi portti on 78
sudo cp /etc/apache2/ports.conf /etc/apache2/ports.conf_backup
sudo gedit /etc/apache2/ports.conf
  • Etsi tämä rivi
Listen 80
  • Korvaa seuraavalla rivillä
Listen 78
  • Tallenna muokkaamasi tiedosto
sudo /etc/init.d/apache2 restart
  • http://localhost:78

Kuinka parse RSS into PHP for Apache HTTP Server

e.g. Assumed that RSS is DistroWatch.com - News
wget -c http://easylinux.info/uploads/magpierss-0.71.1.tar.gz
sudo mkdir /var/www/feeds
sudo tar zxvf magpierss-0.71.1.tar.gz -C /var/www/feeds/
sudo mv /var/www/feeds/magpierss-0.71.1/* /var/www/feeds/
sudo rm -fr /var/www/feeds/magpierss-0.71.1/
sudo chown -R www-data:root /var/www/feeds/
sudo gedit /var/www/feeds/index.php
  • Insert the following lines into the new file
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
 <head>
 <title>DistroWatch.com - News</title>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
 <style type="text/css">
 /*<![CDATA[*/
 /* 
 DEFAULT TAG STYLES
 */
 body {
  background: #ffffff;
  margin-left: 20px;
  font-family: bitstream vera sans,sans-serif;
  font-size: 9pt;
 }
 h1 {
  font-family: luxi sans,sans-serif;
  font-size: 15pt;
 }
 /*]]>*/
 </style>
 </head>
 <body>
 <?php
 require_once 'rss_fetch.inc';
 error_reporting(E_ERROR);
 $url = 'http://distrowatch.com/news/dw.xml';
 $rss = fetch_rss($url);
 if ($rss) {
  echo "<h1>";
  echo "<a href=$url>", $rss->channel[title], "</a><br/>";
  echo "</h1>";
  foreach ($rss->items as $item ) {
   $url = $item[link];
   $title = $item[title];
   $description = $item[description];
   echo "<li>";
   echo "<b>Topic:</b> <a href=$url><b><u>$title</u></b></a><br/><br/>";
   echo "$description<br/><br/>";
   echo "</li>";
  }
 }
 else {
  echo "<a href=$url>", $url, "</a> - Server Down!<br/>";
 }
 ?>
 </body>
 </html>
  • Save the edited file
  • http://localhost/feeds/index.php

FTP-palvelin

Kuinka asennetaan ftp-palvelin tiedostonsiirtoa varten

sudo apt-get install proftpd

How to configure FTP user to be "jailed" (chrooted) into their home directory

sudo cp /etc/proftpd.conf /etc/proftpd.conf_backup
sudo gedit /etc/proftpd.conf
  • Find this section
...
DenyFilter           \*.*/
...
  • Add the following line below it
DefaultRoot           ~
  • Save the edited file
sudo /etc/init.d/proftpd restart

How to configure FTP Server to allow anonymous FTP user to read only

sudo cp /etc/proftpd.conf /etc/proftpd.conf_backup
sudo gedit /etc/proftpd.conf
  • Append the following lines at the end of file
<Anonymous ~ftp>
 User            ftp
 Group            nogroup
 UserAlias          anonymous ftp
 DirFakeUser on ftp
 DirFakeGroup on ftp
 RequireValidShell      off
 MaxClients         10
 DisplayLogin        welcome.msg
 DisplayFirstChdir      .message
 <Directory *>
  <Limit WRITE>
   DenyAll
  </Limit>
 </Directory>
</Anonymous>
  • Save the edited file
sudo /etc/init.d/proftpd restart

How to configure FTP Server to allow anonymous FTP user to read/write

sudo cp /etc/proftpd.conf /etc/proftpd.conf_backup
sudo gedit /etc/proftpd.conf
  • Append the following lines at the end of file
<Anonymous ~ftp>
 User            ftp
 Group            nogroup
 UserAlias          anonymous ftp
 DirFakeUser on ftp
 DirFakeGroup on ftp
 RequireValidShell      off
 MaxClients         10
 DisplayLogin        welcome.msg
 DisplayFirstChdir      .message
</Anonymous>
  • Save the edited file
sudo /etc/init.d/proftpd restart

How to map anonymous FTP user to folders outside /home/ftp/

sudo cp /etc/proftpd.conf /etc/proftpd.conf_backup
sudo gedit /etc/proftpd.conf
  • Append the following lines at the end of file
<Anonymous /location_of_folder/>
 User            ftp
 Group            nogroup
 UserAlias          anonymous ftp
 DirFakeUser on ftp
 DirFakeGroup on ftp
 RequireValidShell      off
 MaxClients         10
 DisplayLogin        welcome.msg
 DisplayFirstChdir      .message
 <Directory *>
  <Limit WRITE>
   DenyAll
  </Limit>
 </Directory>
</Anonymous>
  • Save the edited file
sudo /etc/init.d/proftpd restart

How to change the default port number for FTP Server

e.g. Assumed that new port number is 77
sudo cp /etc/proftpd.conf /etc/proftpd.conf_backup
sudo gedit /etc/proftpd.conf
  • Find this line
Port              21
  • Replace with the following line
Port              77
  • Save the edited file
sudo /etc/init.d/proftpd restart

How to ftp into remote Ubuntu machine via Windows machine

e.g. Assumed that remote Ubuntu machine have installed FTP Server service
Read #How to install FTP Server for File Transfer service
  • Download FileZilla: Here

Streaming Media Server

How to install GNUMP3d for Streaming Media Server service

e.g. /var/music/ is the directory containing multimedia files
sudo apt-get install gnump3d
  • http://localhost:8888

How to change the default directory containing multimedia files for GNUMP3d

e.g. Assumed that new directory containing multimedia files is /home/music/
sudo cp /etc/gnump3d/gnump3d.conf /etc/gnump3d/gnump3d.conf_backup
sudo gedit /etc/gnump3d/gnump3d.conf
  • Find this line
root = /var/music
  • Replace with the following line
root = /home/music
  • Find this line
user = gnump3d
  • Replace with the following line
user = root
  • Save the edited file
sudo /etc/init.d/gnump3d restart
  • http://localhost:8888

How to change the default port number for GNUMP3d

e.g. Assumed that new port number is 7878
sudo cp /etc/gnump3d/gnump3d.conf /etc/gnump3d/gnump3d.conf_backup
sudo gedit /etc/gnump3d/gnump3d.conf
  • Find this line
port = 8888
  • Replace with the following line
port = 7878
  • Save the edited file
sudo /etc/init.d/gnump3d restart
  • http://localhost:7878


Image Gallery Server

  • For a comparison between Gallery1 and Gallery2 see here

Gallery1

How to install Gallery1 for Image Gallery Server service
sudo apt-get install gallery (when prompted to restart Apache, choose No or Cancel)
sudo apt-get install imagemagick
sudo apt-get install jhead
sudo apt-get install libjpeg-progs
sudo /etc/init.d/apache2 restart
sudo sh /usr/share/gallery/configure.sh
  • http://localhost/gallery/setup/index.php
  • Gallery Configuration
Gallery Configuration Wizard: Step 1
Next Step ->
Gallery Configuration Wizard: Step 2
General settings Tab ->
Admin password: Specify the password
Locations and URLs Tab ->
Album directory: /var/www/albums/
Temporary directory: /tmp/
Gallery URL: http://localhost/gallery
Albums URL: http://localhost/albums
Next Step -->
Gallery Configuration Wizard: Step 3
Next Step -->
Gallery Configuration Wizard: Step 4
Save Config ->
  • http://localhost/gallery/albums.php
How to configure Gallery1 to be accessible via Internet (Hostname or fix IP) or LAN (fix IP)
e.g. Assumed that network and internet connections have been configured properly
Internet (Hostname or fix IP) or LAN (fix IP): http://www.url.com
sudo cp /etc/gallery/config.php /etc/gallery/config.php_backup
sudo gedit /etc/gallery/config.php
  • Find this section
...
$gallery->app->photoAlbumURL = "http://localhost/gallery";
$gallery->app->albumDirURL = "http://localhost/albums";
...
  • Replace with the following lines
$gallery->app->photoAlbumURL = "http://www.url.com/gallery";
$gallery->app->albumDirURL = "http://www.url.com/albums";
  • Save the edited file
  • http://www.url.com/gallery/albums.php
How to configure Gallery1 to be accessible via LAN (dynamic IP)
e.g. Assumed that network connections have been configured properly
LAN (dynamic IP): 192.168.0.1
sudo cp /etc/gallery/config.php /etc/gallery/config.php_backup
sudo gedit /etc/gallery/config.php
  • Find this section
...
$gallery->app->photoAlbumURL = "http://localhost/gallery";
$gallery->app->albumDirURL = "http://localhost/albums";
...
  • Replace with the following lines
$gallery->app->photoAlbumURL = "/gallery";
$gallery->app->albumDirURL = "/albums";
  • Save the edited file
  • http://192.168.0.1/gallery/albums.php
How to backup/restore Gallery1 data
sudo tar zcvf gallery.tgz /var/www/albums/ /etc/gallery/
  • To restore Gallery data
sudo tar zxvf gallery.tgz -C /

Gallery2

How to install Gallery2
How to configure Gallery2

Ongelmanratkontaa

Configuring network interfaces... (taking too long to load)

Synchronizing clock to ntp.ubuntulinux.org... (taking too long to load)

service_name = ntpdate

How to disable system time/date from being reset to UTC (GMT)

sudo cp /etc/default/rcS /etc/default/rcS_backup
sudo gedit /etc/default/rcS
  • Find this line
...
UTC=yes
...
  • Replace with the following line
UTC=no
  • Save the edited file
  • System -> Administration -> Time and Date
Set the correct time/date
sudo /etc/init.d/hwclock.sh restart

Kuinka gonfiriguoida äänet toimimaan properly in GNOME

sudo killall esd
sudo cp /etc/esound/esd.conf /etc/esound/esd.conf_backup
sudo gedit /etc/esound/esd.conf
  • Find this section
...
auto_spawn=0
spawn_options=-terminate -nobeeps -as 5
...
  • Korvaa seuraavilla riveillä.
auto_spawn=1
spawn_options=-terminate -nobeeps -as 2 -d default
  • tallenna muokattu tiedosto
sudo apt-get install libesd-alsa0
sudo gedit /etc/asound.conf
  • Insert the following lines into the new file
pcm.card0 {
type hw
card 0
}
pcm.!default {
type plug
slave.pcm "dmixer"
}
pcm.dmixer {
type dmix
ipc_key 1025
slave {
pcm "hw:0,0"
period_time 0
period_size 2048
buffer_size 32768
rate 48000
}
bindings {
0 0
1 1
}
}
  • Tallenna muokattu tiedosto
sudo ln -fs /usr/lib/libesd.so.0 /usr/lib/libesd.so.1
System -> Preferences -> Sound
Sound preferences
General Tab -> Sounds for events (Un-Checked)
  • Save and close all opened applications, Reboot computer

Kuinka pakottaa roskakori tyhjenemään GNOME:ssa

sudo rm -fr $HOME/.Trash/

How to remove duplicate menu/menu items in GNOME

rm -f $HOME/.config/menus/applications.menu

Kuinka päivittää Sijainnit-valikko GNOME:ssa (jos /media/ kansioon /etc/fstab:ssa liitetty sisältö ei tule näkyviin)

sudo /etc/init.d/dbus-1 restart

How to consume static (not dhcp) wireless LAN (WLAN) connection (KDE)

  • I assume you have successfully consumed WLAN connection in Windows
  • To enable the network device please follow the following steps
  • Go to K-menu -> System Settings -> Network Settings
  • Enable Administrator mode
  • Select Network Interfaces tab and the wireless interface (usually ath0) to configure
  • Click Configure Interface...
  • Choose Manual or Automatic. Choose Manual
  • Fill the preferred IP address to identify your computer and the netmask. Choose to activate when computer starts
  • Click Advanced Settings to for more properties
  • Select Routes tab and fill the gateway IP address
  • Make sure you choose the correct device in the right dropdown (e.g. ath0)
  • Click apply to commit all changes
  • To choose wireless connection please follow the following steps
  • Go to K-menu -> Internet -> Wireless Assistant
  • Right click on preferred connection ssid
  • Choose and complete fields for Manual connection
  • Click Ok
  • Create connection configuration
sudo gedit /etc/wpa_supplicant.conf
  • Insert the following lines into the new file
network={
ssid="YOUR_PREFERRED_CONNECTION_SSID"
scan_ssid=1
proto=WPA
key_mgmt=WPA-PSK
psk="STRING_TO_GENERATE_PASSWORD"
#psk=123456789 #you have option to use connection key instead of connection password
}
  • Save the edited file
  • Create script to easily activate connection
sudo gedit /etc/init.d/wifi_wpa.sh
  • Insert the following lines into the new file
#! /bin/sh
# wifi: wpa_supplicant init
echo " * [Wifi]: Enabling WPA supplicant..."
if [ -x /sbin/wpa_supplicant ]; then
/sbin/wpa_supplicant -B -i ath0 -c /etc/wpa_supplicant.conf -D madwifi -w
fi
exit 0
  • Save the edited file
  • Make sure both file readable and executable
sudo chmod +r /etc/wpa_supplicant.conf
sudo chmod +x /etc/init.d/wifi_wpa.sh
  • make wireless connection automaticaly starts when computer starts
sudo ln -s /etc/init.d/wifi_wpa.sh /etc/rcS.d/S40netwifiwpa
  • Close all opened applications, Reboot computer

Ubuntun päivitys

Kuinka päivittää Hoary Hedgehog -> Breezy Badger -> Dapper Drake

  • Ensin tarkista että järjestelmäsi on ajantasalla:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
  • Jos sinulla ei ole CD:tä saatavissa, tarkista, että sinulla on kommentoitu (rivin edessä on #-merkki) rivi joka sisältää cd-asemasi
sudo gedit /etc/apt/sources.list

/etc/apt/sources.list

päivittääksesi breezyyn sources.list tulisi näyttää tämän tapaiselta:

## Uncomment the following two lines to fetch updated software from the network
deb http://us.archive.ubuntu.com/ubuntu breezy main restricted
deb-src http://us.archive.ubuntu.com/ubuntu breezy main restricted
## Uncomment the following two lines to fetch major bug fix updates produced
## after the final release of the distribution.
deb http://us.archive.ubuntu.com/ubuntu breezy-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu breezy-updates main restricted
## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://us.archive.ubuntu.com/ubuntu breezy universe deb-src http://us.archive.ubuntu.com/ubuntu breezy universe deb http://security.ubuntu.com/ubuntu breezy-security main restricted deb-src http://security.ubuntu.com/ubuntu breezy-security main restricted deb http://security.ubuntu.com/ubuntu breezy-security universe deb-src http://security.ubuntu.com/ubuntu breezy-security universe</div>


  • Päivittääksesi breezystä dapperiin, korvaa (ctrl+h) vain kaikki 'breezy' kohdat 'dapper'iksi '/etc/apt/sources.list':issä
gksudo gedit /etc/apt/sources.list
  • Tallenna muokattu tiedosto
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
  • Tallenna istunto, käynnistä uudelleen ja nauti.

HUOM:

  • EI ole suositeltavaa päivittää suoraan hoarysta dapperiin, päivitä järjestyksessä: hoary->breezy->dapper

Kuinka päivittää Dapper Drake (6.06) Edgy Eftiksi (6.10)

  • Huomaathan että Edgy Eft on vasta kehitysasteella joten sen käyttöä ensisijaisena käyttöjärjestelmänä ei suositella. Päivityksen jälkeen järjestelmäsi voi siis olla epävakaa tai olla toimimatta ollenkaan.
  • Jos et ymmärrä mitä teet - jätä tekemättä ja odota viralliseen julkaisuun.
  • Jos ymmärrät riskit ja silti tahdot koekäyttää Edgyä, niin teet sen omalla vastuullasi

Ensin muutetaan pakettivarastot

gksudo gedit /etc/apt/sources.list

Sen jälkeen muuta dapper sanat edgy:ksi.

  • esim. jos sinulla on tämännäköinen sources.list
## peruspaketit
deb http://se.archive.ubuntu.com/ubuntu/ dapper main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ dapper-security main restricted universe multiverse
deb http://se.archive.ubuntu.com/ubuntu/ dapper-updates main restricted universe multiverse
## niiden sorsat
deb-src http://se.archive.ubuntu.com/ubuntu/ dapper main restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu/ dapper-security main restricted universe multiverse
deb-src http://se.archive.ubuntu.com/ubuntu/ dapper-updates main restricted universe multiverse
## backports
deb http://se.archive.ubuntu.com/ubuntu dapper-backports main restricted universe multiverse
  • niin se vaihdetaan seuraavanlaiseksi
## peruspaketit
deb http://se.archive.ubuntu.com/ubuntu/ edgy main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ edgy-security main restricted universe multiverse
deb http://se.archive.ubuntu.com/ubuntu/ edgy-updates main restricted universe multiverse
## niiden sorsat
deb-src http://se.archive.ubuntu.com/ubuntu/ edgy main restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu/ edgy-security main restricted universe multiverse
deb-src http://se.archive.ubuntu.com/ubuntu/ edgy-updates main restricted universe multiverse
## backports
deb http://se.archive.ubuntu.com/ubuntu edgy-backports main restricted universe multiverse
  • Sen jälkeen tehdään itse päivitys. Vielä voit siis perua, mitään ei ole muutettu järjestelmässäsi. Voit vaihtaa pakettivarastosi ennalleen kirjoittamalla
gksudo gedit /etc/apt/sources.list
  • ja vaihtamalla edgy:t dapper:iksi. Takaisinpäin päivitys ei tule onnistumaan.
  • Itse päivitys uusilla pakettivarastoilla tapahtuu kopioimalla yksi kerrallaan seuraavat rivit päätteeseen.
sudo apt-get update
sudo apt-get dist-upgrade

Sen jälkeen kun käynnistät järjestelmäsi uudestaan on käyttöjärjestelmä johon käynnistät Edgy Eft, voi myös olla ettei se enää käynnisty ollenkaan tai et pääse enää graafiseen tilaan.

Poistetut aihepiirit

  • (Englanninkielisestä) oppaasta poistetut aiheet löydät täältä.

Muutamia linkkejä

http://fi.wikibooks.org/wiki/Ubuntu_tutuksi

http://wiki.linux.fi

http://tjaa.dy.fi/~linux