Ubuntu Hardy pl
From
Ubuntu 8.04 LTS (Hardy Heron)
Ubuntu Hardy Heron, następca Gutsy Gibbon został wydany 24. kwietnia 2008. Proszę o pomoc w testowaniu, udoskonalaniu i tłumaczeniu tego poradnika.
| Languages: |
Afrikaans • عربي -قيد التحرير- • Bangla • Bengali • Bulgarian • Català • 简体中文 (翻译中) • Česky • Deutsch • Español • English • Estonian • Filipino • Français • Ελληνικά • Lietuviškai• Latviešu tulkojums • Hindi • Indonesian • Italiano • 日本語 (翻訳中) • 한국어 • ລາວ • नेपाली • Nederlands • Norsk • Русский • Traditional Chinese • Română • Suomi • Türkçe • Svenska • සිංහල • Slovak • فارسی • עברית • پښتو • ไทย • Persian • Wersja polska • Português • Português do Brasil • Slovenski • Srpski • తెలుగు • 繁體中文 (翻譯中) • Українська • اُردو • Vietnamese | edit |
Wstęp
O Hardy'm
- Ubuntu 8.04 został wydany 24. kwietnia 2008 roku.
- Jego nazwa kodowa to Hardy Heron. Jest następcą Ubuntu 7.10 Gutsy Gibbon.
- Hardy jest wersją LTS (Long Term Support, czyli wspieraną długoterminowo), tzn. dla wersji desktop wsparcie będzie trwało 3 lata, a dla wersji serwer 5 lat - 18 miesięcy dłużej niż normalnie.
Jak sprawdzić jakiej używasz wersji Ubuntu?
Użyj tego polecenia:
lsb_release -a
Jak sprawdzić jakiej używasz wersji jądra Ubuntu?
Użyj tego polecenia:
uname -r
Nowsze wersje Ubuntu
- Nowa wersja Ubuntu jest wydawana co 6 miesięcy
- Nowe wydania pojawiają się w kwietniu i październiku.
- Następne wydanie jest planowane na 30. października 2008 i będzie to Ubuntu 8.10 (Intrepid Ibex).
- Hardy Heron jest wydaniem długoterminowym (LTS - Long Time Support) i będzie wspierane przez 5 lat dla edycji serwerowej i 3 lata dla edycji desktop.
O Ubuntu i Oficjalne "odmiany" Ubuntu
Przewodniki po Ubuntu 8.04 i linki
- Ubuntu Official Website
- Official About Ubuntu Page
- Official Ubuntu Forums
- Wikipedia: Ubuntu (Linux Distribution)
- Ubuntu Geek includes Tips,Howtos,Tutorials and Articles about Ubuntu Linux
Ubuntu Screenshot'y
Ubuntu 8.04 Screenshots Gallery
Pożyteczna wiedza
Ta sekcja zawiera informacje, które będą potrzebne w zrozumieniu pozostałej części tego przewodnika.
Uzywanie konsoli / terminala / powłoki
Wszystko donosi się do tej samej rzeczy - interfejsu tekstowego, którego można używać do kontroli nad systemem jako alternatywy dla interfejsu graficznego. Część z zadań zawartych w tym przewodniku będzie się odnośić do graficznego interfejsu (GUI - Graphical User Interface - graficzny interfejs użytkownika), ale częściej spotkasz się z zadaniami w trybie tekstowym.
Abu uruchomić konsolę przejdź do: Aplikacje --> Akcesoria --> Terminal
Wszystkie polecenia poprzedzone 'sudo' otrzymują uprawnienia administratora (root'a) i zostaniesz poproszony o hasło.
Sprawdzanie instrukcji do programów lub poleceń - Manpages
Większość programów i poleceń posiada swoje strony MAN - instrukcje obsługi.
możesz sprawdzić co dana komenda robi wpisując w terminalu na przykład:
man aptitude
lub
man gedit
Bardzo pożyteczne jest wiedzieć co dana komenda robi zanim się ją uruchomi.
Utrzymywanie "świeżości" systemu
Ważne jest, żeby mieć zawsze zaktualizowany system, posiadać wszystkie ostatnie łatki, poprawki bezpieczeństwa i uaktualnienia paczek z repozytoriów.
Najpierw przejdź do:
System --> Administracja --> Źródła oprogramowania
i sprawdź czy wszystkie repozytoria są włączone.
Następnie otwórz terminal:
Aplikacje --> Akcesoria --> Terminal
i wpisz:
sudo apt-get update
System zapyta Cię o twoje hasło. Możesz NIE zobaczyć swojego hasła (względy bezpieczeństwa), ale system rozpozna to co wpisałeś.
sudo apt-get upgrade
sudo apt-get dist-upgrade
I skończone.
Instalowanie paczek (programów) i bibliotek
W Ubuntu są dwie drogi do zainstalowanie paczek w systemie.
Możesz zainstalować paczki poprzez terminal lub Menedżer pakietów Synaptic
A.Jak zainstalować paczkę używając Aptitude lub Apt-get - opcja z terminalem
Idź do
dla GNOME
Aplikacje --> Akcesoria --> Terminal
dla KDE
Znaczek KDE --> System --> Konsola - Program terminal
Aptitude oraz Apt jest Menedżerem pakietów Debian'a i jest używany w Ubuntu
Teraz możemy zainstalować pakiet wpisując:
sudo apt-get install nazwa_pakietu
sudo aptitude install nazwa_pakietu
na przykład: Amarok - odtwarzacz muzyki
sudo apt-get install amarok
sudo aptitude install amarok
Jak widzisz jest to bardzo proste.
Czasami potrzebujemy usunąć pakiet.
Wpisujemy:
sudo apt-get remove nazwa_pakietu
sudo aptitude remove nazwa_pakietu
Jeśli chcemy usunąć exaile (odtwarzacz muzyki): wpisujemy:
sudo apt-get remove exaile
sudo aptitude remove exaile
Aptitude jest lepszy od apt-get i zaleca się stosowanie aptitude, aptitude dodatkowo usuwa zabłąkane pakiety przy instalacji lub gdy usuwamy pakiet. Więcej informacji dlaczego aptitude możemy przeczytać tutaj:
B. Jak zainstalować pakiet używając Synaptic - Łatwa, graficzna opcja
Przejdź do:
dla GNOME
System --> Administracja --> Menedżer pakietów Synaptic
Tutaj możesz zainstalować jakikolwiek pakiet chcesz po prostu go wyszukując poprzez naciśnięcie przycisku Szukaj.
Pokaże Ci się lista pakietów w pustym okienku po lewej. Kliknij na niego to dodasz go do kolejki instalowania
Następnie naciśnij Zastosuj, a Synaptic zainstaluje pakiety sprawdzając najpierw zależności.
W KDE standardowo nie ma Synaptica, trzeba go ręcznie zainstalować, poprzez polecenie:
sudo apt-get install synaptic
sudo aptitude install synaptic
W KDE nie potrzebujemy synaptica, mamy do dostępu Zarządce pakietów Adept
Znaczek KDE --> System --> Zarządca pakietów Adept zarządzanie oprogramowaniem
Szukanie pakietów/programów
Są 4 drogi do znalezienia pakietów w repozytoriach. Wszystkie są proste do wykonania.
A. Jak znaleźć pakiet w Synaptic'u
Otwórz Synaptic
System --> Administracja --> Menedżer pakietów Synaptic
i naciśnij przycisk Szukaj. Masz puste miejsce do uzupełnienia aby Synaptic rozpoczął wyszukiwanie.
B. Jak znaleźć pakiet w internecie
Otwórz twoją ulubioną przeglądarkę internetową i przejdź do
http://packages.ubuntu.com/
Jesteś zainteresowany: a. http://packages.ubuntu.com/hardy/ , b.http://packages.ubuntu.com/hardy-updates/ , c.http://packages.ubuntu.com/hardy-backports/ , d.http://packages.ubuntu.com/hardy-backports/main/newpkg
C. Jak znaleźć pakiet używając Apt'a
Otwórz terminal
Aplikacje --> Akcesoria --> Terminal
Jeśli chcesz znaleźć program, który nazywa się np. "pack-age" wpisz:
sudo apt-cache search pack-age
Jako, że Synaptic używa apt-cache search w sposób graficzny możesz znaleźć paczki poprzez wpisanie słów.
Jeśli chcesz znaleźć odtwarzacz muzyczny (ang. music player) wpisz
sudo apt-cache search music player
D. Jak znaleźć pakiety używając Aptitude
Aptitude jest "terminalowym aleter-ego Synaptic'a". W pasku menu u góry jest opcja "Znajdź". Możesz ją kliknąć przechodząc do niej za pomocą klawiatury.
Zainstalowałem program, lecz nie pokazał się on w menu Aplikacje
Na szczęście można to łatwo załatwić od wydania Gnome 2.12
Kliknij prawym przyciskiem myszy nad menu Aplikacje / Miejsca / System i wybierz "Modyfikuj menu"
W razie problemów otwórz terminal i wpisz
alacarte
W tym programie możesz edytować menu na górze ekranu, dodawać nowe wpisy, by dostać się do swoich nowych aplikacji (Oczywiście musisz wiedzieć, gdzie znajduje się zainstalowana aplikacja). Jeśli masz problem ze znalezieniem jej, wypróbuj komendę:
locate applicationame
Powinna ona pokazać potencjalną lokalizację aplikacji.
Graphics cards and displays
Installation of both ATi and nVidia Graphics drivers
There are three available methods - the first ensures you are always running the latest version of the drivers, and the second is marginally simpler. The third one is an alternative method for those that have older ATi GPU installed. The last one is for those that own the latest ATi cards (2xxx and 3xxx generations) and can't have appropriate display with the latest ATi drivers (via EnvyNG) or with the repository driver.
A. Latest driver installation with EnvyNG (ATi & nVidia)
Read first this faq: http://albertomilone.com/envyngfaq.html#A
Open a terminal and type :
sudo apt-get install envyng-gtk
After rebooting, drivers should be installed and working.
B. Repository Driver installation (ATi & nVidia)
Navigate to:
System --> Administration --> Hardware Drivers
and there you'll see your Graphics Card and an option for installation of its drivers.
Choose it and the press "Apply". It shall install the repository driver - a reboot may be required.
(Applicable for both ATi/AMD and nVidia)
C. ATi Open Source radeon driver (ATi only)
Navigate to https://help.ubuntu.com/community/RadeonDriver
for more instructions.
D. RadeonHD driver (ATi only)
Check with Synaptic Package Manager for
xf86-video-radeonhd
package.
Always make sure that you don't have another ATi driver installed.
More info: http://www.phoronix.com/scan.php?page=article&item=842&num=1
Configuring multiple monitors with a nVidia graphics card
Install the nVidia graphics control panel:
sudo apt-get install nvidia-settings
And then run the configuration utility:
sudo nvidia-settings
You should be able to configure all your monitors, set them to seperate resolutions, and change their positioning relative to one another. When you are finished, make sure you click 'Save to X Configuration File'. It is possible that you may have problems with the boundries of monitors; logging off and back on again should resolve this.
Obsługa multimediów w Ubuntu Hardy Heron
Instalowanie kodeków
Otwórz terminal i wpisz :
sudo -s -H
następnie wpisz swoje hasło.
Po tym wpisz :
apt-get update
apt-get upgrade
Pakiety będą aktualizowane. Upewnij się, że masz włączone wszystkie repozytoria w Źródłach Oprogramowania.
Następnie wpisz tę komendę, która zainstaluje większość potrzebnych kodeków :
apt-get install gstreamer0.10-plugins-ugly-multiverse gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly gstreamer0.10-ffmpeg libxine1-ffmpeg libdvdread3
Od teraz możesz odtwarzać większą część multimediów.
Instalowanie obsługi DVD
w konsoli wpisz:
sudo gedit /etc/apt/sources.list
I wklej na końcu pliku:
## Medibuntu - Ubuntu 8.04 "hardy" ## Please report any bug on https://bugs.launchpad.net/medibuntu/ deb http://packages.medibuntu.org/ hardy free non-free
Zapisz plik i wyjdź z edytora. Następnie w terminalu wpisz:
wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add -
by zainstalować klucz.
Ostatecznie, wpisz:
sudo apt-get update sudo apt-get install libdvdcss2
Pulseaudio
W Xubuntu możesz doświadczyć pewnych problemów z Pulseaudio, takich jak brak dźwięku po aktualizacji z wersji Gutsy Gibbon. Powodem może być nie włączony daemon Pulseaudio. Zauważ, że serwer dźwięku nie jest włączany przy starcie systemu (by wykluczyć ryzyko wyłączenia go przez użytkownika), ale przy logowaniu. Więc, aby uzyskac dźwięk, musisz dodać Pulseaudio do autostartu. Na przykład, otwórz edytor tekstowy i wklej do niego taką treść:
[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=Pulseaudio
Comment=
Exec=pulseaudio
StartupNotify=false
Terminal=false
Hidden=false
Następnie zapisz plik jako Pulseaudio.desktop i dodaj skrót do autostartu.
Instalowanie Odtwarzacza multimediów VLC
w konsoli wpisz:
sudo apt-get install vlc
Aby usunąć program, wpisz:
sudo apt-get --purge autoremove vlc
Jesli doświadczysz problemów z dźwiękiem (w związku z Pulseaudio), w terminalu wpisz:
sudo apt-get install vlc-plugin-pulse
i wybierz PulseAudio jako wyjście dźwięku w opcjach VLC.
Jak zrobić, by VLC był uruchamiany przy wkładaniu płyty DVD do napędu
W Ubuntu Hardy Heron domyślnym programem do odtwarzania DVD jest Totem, jednak nie ma na to prostego sposobu. Większość tricków, które działały w poprzednich wersjach przestały działać. Głównym problemem jest to, że VLC rejestruje jako aplikacja do odtwarzania DVD.
W terminalu wpisz:
cp /usr/share/applications/vlc.desktop ~/.local/share/applications/vlc-dvd.desktop
wyedytuj plik używając gedit:
gedit ~/.local/share/applications/vlc-dvd.desktop
Zamień linię:
Exec=vlc %U
Na jedną z poniższych:
- 1. (Domyślne ustawienia)
Exec=vlc %f
- 2. (Rekomendowane ustawienia z forum Ubuntu dla lepszego odtwarzania DVD)
Exec=vlc --vout-filter deinterlace --deinterlace-mode blend --volume 512 %f
- 3. (Rekomendowane ustawienia z forum Ubuntu dla lepszego odtwarzania DVD i automatycznego włączenia pełnego ekranu z filmem)
Exec=vlc --vout-filter deinterlace --deinterlace-mode blend --volume 512 --fullscreen %f
Zapisz plik i zamknij edytor gedit. W terminalu wpisz:
gedit ~/.local/share/applications/mimeapps.list
Linię «x-content/video-dvd=» pod [Added Associations] zmień na:
[Added Associations] x-content/video-dvd=vlc-dvd.desktop;totem.desktop;
Otwórz Nautilus (domyślny menedżer plików), wejdź w Edycja->Preferencje>Media>DVD Video i wybierz VLC media player (Powinieneś móc wybrać między Totem i VLC)
Instalowanie Amarok (Odtwarzacz muzyki)
Amarok jest aplikacją KDE/Qt, jednak pracuje bardzo dobrze na Ubuntu, i może być zainstalowany poprzez wpisanie:
sudo apt-get install amarok
Instalowanie Exaile (Odtwarzacz muzyczny podobny do Amaroka)
Exaile jest aplikacją GTK, jest podobny do Amaroka i bardzo łatwo ją zainstalować. W terminalu wpisz:
sudo apt-get install exaile
Upewnij się, że masz zainstalowane wszystkie kodeki .
Instalowanie Narzędzi Pulseaudio
Poniższa komenda zainstaluje narzędzia pulseaudio, takie jak aplikacje do kontroli głośności i narzędzia serwera dźwięku.
Otwórz okno terminala i wpisz:
sudo apt-get install libasound2-plugins "pulseaudio-*" paman padevchooser paprefs pavucontrol pavumeter libflashsupport
Uruchom Menedżer Urządzeń Pulseaudio z menu Aplikacje > Dźwięk i Obraz, aby uzyskać dostęp do narzędzi.
Internet i projektowanie stron WWW
Instalowanie serwera LAMP (poprzez Synaptic)
LAMP oznacza Linux, Apache, MySQL i PHP. Możesz zainstalować zestaw zawierający wymienione oprogramowanie poprzez Synaptic Menedżer Pakietów (Jeśli używasz wydania Desktop).
System-->Administracja-->Synaptic Menedżer Pakietów--> Edycja-->Zaznaczenie pakietów wg. zadań-->LAMP server -->Zatwierdź
Instalowanie serwera LAMP (Poprzez terminal)
Poniższa komenda zainstaluje Apache2, PHP5, MySql5, and PHPMyAdmin.
Najpierw w terminalu wpisz:
sudo apt-get install apache2 php5 mysql-server-5.0 phpmyadmin
Ta komenda zainstaluje wszystkie wymagane aplikacje. Możesz być poproszony o hasło użytkownika root MySQL root password (ustaw, jeśli chcesz), oraz o skonfigurowanie PHPMyAdmin (Wybierz typ serwera: apache2). Po zakończeniu potrzeba dokonać konfiguracji, aby oprogramowanie właściwie funkcjonowało. Wpisz:
sudo gedit /etc/apache2/apache2.conf
Przewiń plik na sam dół, nastepnie dodaj:
# Enable PHPMyAdmin Include /etc/phpmyadmin/apache.conf
Zapisz, wyjdź, i wpisz:
sudo /etc/init.d/apache2 restart
Wszystko powinno być już skonfigurowane - w przeglądarce WWW wpisz adres http://127.0.0.1 dla stron, oraz http://127.0.0.1/phpmyadmin , by administrować bazą danych. Główny folder przechowywania stron znajduje się w domyślnie w /var/www/. Zwykle nie jest to użyteczne, gdyż nie mamy możliwości dostępu do tego katalogu. Szczęśliwie jest łatwy sposób, by to rozwiązać...
Dodawanie wirtualnego hosta do twojego serwera LAMP
Wirtualny host pozwala nam na dostęp do różnych folderów jako do katalogów docelowych stron WWW używając wybranych adresów. Przyznaj, 'localhost' czy 127.0.0.1 wygląda nie za ciekawie.
Zacznij, dodając nowy host. Możesz to zrobić używając menu System --> Administration --> Network; Wybierz zakładkę Hosty, Wybierz localhost z listy i kliknij w Właściwości. Możesz być zmuszony do kliknięcia w przycisk 'Odblokuj' i wpisania swojego hasła. Poniżej wpisu 'localhost',w nowej linii, dodaj swój wpis; Dla przykładu my użyjemy nazwy 'testhost'. Dodaj go, następnie wyłącz wszystkie okna dialogowe.
Teraz trzeba edytować plik konfiguracyjny. Otwórz terminal i wpisz :
sudo gedit /etc/apache2/httpd.conf
W nowootwartym pliku (który może również być pusty dodaj definicję dla twojego hosta. Moja nazwa użytkownika to 'dan', swoje strony trzymam zaś w folderze www, znajdującym się w /home, więc mój wpis będzie wyglądać tak:
<VirtualHost *>
ServerName testhost
DocumentRoot /home/dan/www
</Virtualhost>
Mogę teraz zacząć dodawać pliki do /home/dan/www, i dostać się do nich, otwierając http://testhost
Home Automation / Home Theater / Home Security
Complete Systems
Linux MCE
LinuxMCE is an integrated home theater/home security/home automation/telephone PBX/intercom system for your home. It is a community project that is a fork of the Linux Pluto commercial endeavour. There is a version that runs on Kubuntu 7.04 (Feisty) and a version for Kubuntu 7.10 (Gutsy). A version for Kubuntu 8.04 (Hardy) is due out soon. It is available in 32 and 64 bit versions. LinuxMCE can run either as a standalone Home Theater PC or can co-ordinate a fully networked home, using the networking capabilities that are intrinsically part of the Kubuntu Linux OS. For more info see the LinuxMCE website.
LinuxMCE can be installed at the same time as the Kubuntu OS, on a new PC with an Nvidia graphics card (6000, 7000, or 8000 series), from a single DVD.
LinuxMCE can also be installed as an add-on package to an existing Kubuntu system, using the LinuxMCE 2 CD installation. You will need a Kubuntu LiveCD for your installation, even if you already have a full Kubuntu installation in place. (The LinuxMCE installation uses the Kubuntu LiveCD for additional modules.) Note that the LinuxMCE version must match the Kubuntu version -- i.e. the LinuxMCE 710 version CDs require the Kubuntu 7.10 (Gutsy) Live CD.
With the 2 CD installation, it is possible to run Kubuntu separately from LinuxMCE on the same PC, but it is recommended to dedicate at least one PC to LinuxMCE as a Core server.
LinuxMCE incorporates MythTV, Pluto home automation, Motion security surveillance, Asterisk PBX, VDR video disk recorder, and other home automation/security/theater packages in an integrated platform.
At this time, the automatic installer for Linux MCE uses the KDE desktop (Kubuntu). There are users that have made Linux MCE work with the Gnome desktop (Ubuntu) and other Linux distributions, but it is recommended to stick with the Kubuntu OS, as required by the LinuxMCE automatic installation.
PVR (Personal Video Recorder)
Mythbuntu
Mythbuntu is an Ubuntu-based derivative (based on the Xubuntu (XFCE) desktop) that is meant to function as a standalone PVR, based on MythTV. It can be used, however, with a Gnome (Ubuntu), KDE (Kubuntu) or XFCE (Xubuntu) desktop, which can be added at any later time.
Home Security
Zoneminder surveillance system
Zoneminder manages surveillance cameras and stores images on the hard disk. Images can be viewed using a (LAMP) server remotely. X10 devices can be triggered using built-in perl scripts. For more info see the Zoneminder website.
- Read #General Notes
- Read #Install a LAMP server on a Desktop
- Detailed instructions that appear to work for Gutsy are at the Zoneminder Installation Wiki.
There is a Zoneminder package for Hardy (that was the package from Gutsy). You should be able to install the package from Synaptic Package Manager.
However, if that does not work, try the instructions that worked for Feisty:
- You must have the LAMP server installed. In addition, you will need additional modules:
sudo apt-get install ffmpeg libarchive-tar-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl sudo apt-get install libjpeg62 libmime-perl libstdc++6 libunwind7 libwww-perl zlib1g
- Download the .deb package from the package manager's website:
ftp://www.northern-ridge.com.au/zoneminder/ubuntu/edgy/zoneminder_1.22.3-8_i386.deb
- Install using the Debian package manager. (No other method seems to work.)
dpkg -i zoneminder_1.22.3-8_i386.deb
- (Note: If some dependencies are still unsatisfied, make sure you have these packages installed):
sudo apt-get install libc6 libc6.1 libgcc1 libgcc4 libstdc++6
- (These should already be installed as part of the LAMP installation):
sudo apt-get install apache2-mpm-prefork libapache2-mod-php5 libmysqlclient15off mysql-client mysql-server php5 php5-mysql
If your installation is successful, you will now need to set up the configuration files and databases for Zoneminder.
- Copy the configuration file and restart the Apache2 server.
sudo ln -s /etc/zm/apache.conf /etc/apache2/conf.d/zoneminder.conf sudo /etc/init.d/apache2 reload
- View Zoneminder from your web browser:
http://localhost/zm
- Set up a MySQL database for Zoneminder
- If this is the first time you have used MySQL, the default global MySQL superuser root will not have a password. You should set one now. Instructions for setting mySQL initial privileges are here.
- In short:
mysql -u root
mysql> UPDATE mysql.user SET Password=PASSWORD('your_new_password') WHERE User='root';
mysql> FLUSH PRIVILEGES;
mysql> quit
- In addition, you can set up an additional global MySQL user (such as mysql_user, for example) by following the instructions here. That way you can reserve root login for emergencies.
- In short:
mysql -u root mysql> CREATE USER 'mysql_user'@'localhost' IDENTIFIED BY 'mysql_user_passwd'; mysql> quit
Now you must create a MySQL database for use by Zoneminder. This is an administrative MySQL command, so you must use one of your global MySQL users (either root or mysql_user, as created in the example above). You can name your Zoneminder database anything you want, instead of zmdatabase.
mysqladmin -u root -p CREATE zmdatabase
or
mysqladmin -u mysql_user -p CREATE zmdatabase
Create users for the Zoneminder database. As always, I create a root user for emergency use. I use the same password for root as I do elsewhere on my system. Then I also create a user named zm_user (but you could also creat a user named mysql_user, to keep everything consistent). [I use a unique user here because this is a home security system, after all, and I don't want it breached.] These users are specific to this database; they can be the same users as used elsewhere in the system or can be unique users.
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON zmdatabase.* TO 'zm_user'@'localhost' IDENTIFIED BY 'password'; mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON zmdatabase.* TO 'root'@'localhost' IDENTIFIED BY 'password'; (I used my usual root password here). mysql> quit mysqladmin reload
Note: mysql commands (i.e. any entered at the mysql> prompt) must end with a semicolon. If you forget the semicolon, nothing will happen.
Myth Zoneminder
MythZoneminder allows you to view your security cameras through Myth TV, essentially. It is a plugin that interfaces the two packages Zoneminder (which must be working on your system) and Myth TV (which must also be working.) It can be found in Synpatic Package Manager as the mythzoneminder package.
See the installation instructions.
How to restore GRUB to a partition or MBR with an Ubuntu Live CD
Sometimes, if an Ubuntu installation goes wrong, or a Windows NT bootloader overwrites MBR and doesn't recognise the Linux installation, we have to restore our GRUB bootloader that is, generally, very flexible.
First of all, we burn a Hardy Heron (Ubuntu 8.04) ISO (on a CD(R , RW) or DVD (+R , +RW)) or make sure that we have one already.
Then, we change, in the BIOS, the boot load sequence and we put the CD/DVD option first.
After that, we boot the Live CD, we choose the first option and in a few minutes we have arrived at the Live CD Desktop.
So, we go :
Applications --> Accessories --> Terminal
Then, we have to remember which is our Ubuntu installation partition.
In our example, it is the second one (/dev/sda2), formatted as ext3, in the first HDD of a SATA controller. We suppose that it is the second one, since, in case we have Windows that demand to be in the first partition (/dev/sda1), this one is occupied.
Now, you have to be really careful. You have to enter the right partition, instead of sda2 (unless it is the same) In the terminal :
cd / sudo -s -H
mount -t ext3 /dev/sda2 /mnt
mount -t proc proc /mnt/proc
mount -t sysfs sys /mnt/sys
mount -o bind /dev /mnt/dev
chroot /mnt /bin/bash
And now, you are actually "running" Ubuntu within the Hard Drive but through Live CD's terminal.
Now we restore GRUB like that:
1) Restoration to MBR
grub-install /dev/sda
2) Restoration to partition (example: /dev/sda2)
grub-install /dev/sda2
In the first case (that is the most usual) you have certainly installed GRUB on MBR after you receive, in the terminal, the message that there are no errors.
After you reboot, you have your favorite bootloader restored.
Encrypt home partition with cryptsetup & LUKS
First step is to backup all necessary data, if something goes wrong your data will be lost in the process if it's not backed up. Also note that your home folder needs to be located on a separate partition than your root partition, if not see #How to make partitions.
Second, install necessary software:
sudo apt-get install cryptsetup
Insert the new module, dm-crypt into the kernel:
sudo modprobe dm-crypt
Check to see what encryption schemes are available:
cat /proc/crypto
If only MD5 is listed, try inserting the appropriate modules into the kernel:
sudo modprobe serpent
Above is an example, this could also be twofish, blowfish or anything other crypto module that you would like to use.
The following commands will assume that your home partition is /dev/sda1, please change it to match your own configuration.
Next step we use cryptsetup to change the partition with the luksFormat option, this command will cause you to lose all data on /dev/sda1.
sudo cryptsetup luksFormat -c algorithm -y -s size /dev/sda1
Where algorithm is the algorithm that you chose above such as serpent aes, etc.
Size is the key size for encryption, this is generally 128 or 256. Without specifying the algorithm or the size, I believe it defaults to AES 256, more information and additional options can be found by reading the man page. The above step will ask you to choose a password and verify it. Do not forget this password.
We can then use the luksOpen option to open the encrypted drive.
sudo cryptsetup luksOpen /dev/sda1 home
Home is a nickname which cryptsetup uses to refer to /dev/sda1. It also creates the device /dev/mapper/home, this is what you would actually mount to access the filesystem. If you specify another name other than home, it will create the device /dev/mapper/[name], where [name] is the nickname that cryptsetup will use. This step will ask you for your LUKS passphrase, this is the password you created in the previous step.
Next, we create the actual filesystem on the device. I use reiserfs, but it could just as well be ext3.
sudo mkreiserfs /dev/mapper/home
Or
sudo mkfs.ext3 /dev/mapper/home
Next step is to mount your encrypted device and copy your files back to your home directory.
mkdir new_home sudo mount /dev/mapper/home new_home cp -r * new_home
Now we have to set up everything so that it's ready to go at boot, we need to tell the system that there are encrypted disks that we want mounted.
gksudo gedit /etc/crypttab
Enter the following as one line at the end of the file.
home /dev/sda1 none luks,tries=3
remember home can be any name that you want, just remember that this maps to /dev/mapper/[name]. The option tries=3 allows 3 tries before a reboot is required or the disk is not decrypted.
Next enter the device info in fstab that we want to mount on boot.
gksudo gedit /etc/fstab
Enter the information as one line at the end of the file.
/dev/mapper/home /home reiserfs defaults 0 0
Remember to substitute /dev/mapper/home with your device /dev/mapper/[name], /home is the mount point, since this is our home directory, reiserfs is the filesystem type, put ext3 if you formatted it as ext3. For now the default options should be good, change this if you need/require something else. Also, now is a good time to remove the old /dev/sda1 device entry so that fstab doesn't try to load it at boot. This can be accomplished by commenting out the /dev/sda1 line or deleting it.
Final step is to make sure that the proper modules are loaded at boot time.
gksudo gedit /etc/modules
Now add dm-crypt and the crypto module that you used earlier, such as serpent, aes, etc. Each needs to be on its own line.
dm-crypt serpent
That should be it, all that's required is a reboot. During the reboot process, the computer will say "Starting early crypto disks" and ask for your passphrase. If the passphrase is accepted, it will unlock the encrypted partition and mount it on your specified mount point.
Aliases
You can change the way you enter a command in order to be executed by entering an alias.
For example, you may enter in a terminal "update-system" (a command that in face doesn't exists) that replaces "sudo apt-get update". You can do the same thing for other commands.
This is what you do. Our example is going to be the alias of the command
ls -FCal --color=auto
that shows with colours and many details the contents of a folder.
Open a terminal
Applications --> Accessories --> Terminal
and enter
gedit ~/.bashrc
Be carefull now. Don't erase anything there.
Now, go to the end of the document and enter
alias ll="ls -FCal --color=auto"
As you can see, now with the command
ll
whenever we want, we call, in fact, this one
ls -FCal --color=auto
You can do the same thing for other commands that need a lot of switches.
Save the document, close the terminal and reopen it. You may now check your new alias.
Tips & Tricks
Change the splash screen color
Originally a brownish color to match the Ubuntu theme, it does not quite fit with other themes and might want to be changed. Enter the gdm.conf file (sudo gedit /etc/gdm/gdm.conf). About two-thirds of the way down you will see the lines:
BackgroundColor=#dab082 GraphicalThemedColor=#dab082
Change it to what you like. For all black, use:
BackgroundColor=#000000 GraphicalThemedColor=#000000
Zmiana domyślnego rozmiaru okna terminalu
Standardowy rozmiar okna terminalu wynosi około 80 kolumn znaków szerokości oraz około 24 linijek tekstu wysokości. Aby to zmienić należy edytować plik /usr/share/vte/termcap/xterm. Możesz użyć polecenia:
sudo gedit /usr/share/vte/termcap/xterm
Kilka linijek od góry znajduje się taka linia:
:co#80:it#8:li#24:\
Zmień wartość liczby znajdującej się po co# by zmienić szerokość. Zmień wartość liczby znajdującej się po li# by zmienić wysokość.
Jak tworzyć i edytować partycje
Wpisz w terminalu:
sudo apt-get install gparted
Uruchom:
System --> Administracja --> Partition Editor
Teraz możesz dowolnie edytować i tworzyć partycje.
Uwaga! NIE EDYTUJ PARTYCJI SYSTEMOWEJ ORAZ SWAP
Więcej info:
1) Użytkowanie programu gparted -->http://howtoforge.com/partitioning_with_gparted
2) jak tworzyć partycję z folderem domowym --> http://www.psychocats.net/ubuntu/separatehome
Jak włączyć Compiz Fusion w Ubuntu
W Ubuntu Hardy Heron, Compiz Fusion jest domyślnie zailstalowany i włączony po instalacji your graphics' card drivers.
Jedyną rzeczą, którą musisz zrobić jest zainstalowanie Compiz Fusion Settings Manager
Wpisz w terminalu:
sudo apt-get install compizconfig-settings-manager
Aby uruchomić:
System --> Preferencje --> Advanced Desktop Effects Settings
Reszta konfiguracj zależy od Ciebie.


