Ubuntu:Feisty cz

From

Image:Ubuntuguide_logo.png

Contents

Neoficiální průvodce začátky Ubuntu 7.04 (Feisty Fawn - Rozpustilý srnec)

Ubuntu 7.04 (Feisty Fawn) byl vydán 19.4.2007. Tento průvodce se neustále vyvíjí. Je třeba Vaší pomoci při testování a vylepšování tohoto průvodce.

Tohoto průvodce začal vytvářet Chua Wen Kiat (Kuala Lumpur, Malajsie). Nyní je udržován Linuxovým Centrem Litevské university a každým kdo je ochoten přispívat.

O tomto původci můžete diskutovat na oficiálním fóru UbuntuGuide.org na ubuntuforums.org. Zastavte se a přidejte se do diskuse.


Pro editaci stránek se musíte zaregistrovat

Pokud máte nějaké nápady, můžete o nich diskutovat na diskusní stránce

Pokud máte nějaké otázky o, pošlete nám e-mail na ubuntuguide -at- ubuntuguide.org

MikrobartOrvilsQuashJiyuu0CargoGabemorrBytecopekrampoSimosStubbyeljacoshaiThunderMHasileadammichaelroachBelisarivsCheatorHankTamalKaotikssoniahKutanMehdirichuxShadymanHavarillLouisShadymanshanlot751EtienneRabid9797Mantas Smelevičiusperspectoffphloseadogsmalugo2debugPakosRedBassCyberAngelCogeeldineroycorreUficAntidrugueVahidLouis KingRsinghBorut-TCinglallsTownrayANtuMaLaMpete alleboneGreenstarThe TurkRonBCompotatojoMbrasigma80EnlightenedswineKarthikeyanemorrp1Th0rv4ldjspanglerand other friends of our community edit


Starší verze

Pokud používáte zastaralou verzi Ubuntu, měli byste zvážit její povýšení na Feisty Fawn. Tato verze obsahuje spoustu vylepšení a aktualizační program Vám pomůže s přechodem na novější verze. Pokud jste v produkčním prostředí, nebo pokud vám vše funguje k Vaší plné spokojenosti, můžete zůstat u verze s prodlouženou dobou podpory (LTS - Long-Term Support).

Pro povýšení zastaralé nebo aktualizaci současné verze si přečtěte kapitolku #Povýšení a aktualizace.


Předmluva překladatele

Pro začátečníky tu mám několik informací, které jistě oceníte.

V tomto průvodci se hojně používá terminálu. Není to proto abychom uživatele vylekali, ale abychom celý postup řešení konkrétního problému co nejvíce zjednodušili.

Potřebné úkony jsou vesměs zredukovány na pouhé zkopírování příkazu, vložení do terminálu a potvrzení stiskem klávesy Enter. Občas je uživatel dotázán aby si vybral jednu z nekolika nabízených možností astavení. Případně je ještě potřeba provést změny v konfiguračních souborech. Vše je patřičně popsáno, takže opět stačí kopírovat a vkládat.

Kopírování se provádí tak, že vyznačený příkaz označíte levým tlačítkem myši a kliknutím kolečkem do terminálu jej tam vložíte. Pak stačí stisknout Enter. Jednoduché, že?

Terminálu se spousta neznalých bojí nebo jím rovnou opovrhuje. Ano, každý se bojí neznámého a mnoho lidí má vesměs negativní zkušenosti s příkazovou řádkou z jiných operačních systémů.

Mohu Vás ale uklidnit. Nemusíte se ničeho bát. Následujte zde popisované postupy a brzy zjistíte, že terminál je tuze mocný nástroj který Vám náramně zjednoduší život.

Zajímá-li Vás co provádíte, zkoušejte si pročíst manuálové stránky příslušných programů (např. "man sudo", "man apt-get" apod.) a pokud ne, pouhým zkopírováním příkazu řádek po řádku a jejich vložením do terminálu prostě vyřešíte problém a můžete jít dál. Ať tak či onak, jsem přesvědčen, že příkazovou řádku oceníte.

Při vymýšlení vlastních příkazů se Vám jistě bude hodit klávesa TAB pro automatické doplnění příkazu. Používá se tak, že napíšete několik počátečních znaků a po stisku této klávesy dojde k doplnění příkazu. Pokud jste nezadali dostatek znaků potřebných k jednoznačnému určení příkazu, můžete opakovaným stiskem klávesy TAB vyvolat dostupné možnosti.

Zkuste třeba nainstalovat program amarok (snad nejoblíbenější přehrávač muziky v Linuxu, je určen pro KDE, ale v GNOMEho taky můžete používat a určitě se Vám bude líbit a díky němu oceníte id3 tagy protože do Vaší hudební kolekce vnesou pořádek) pomocí aptitude.

Nejdříve napište "sudo ", potom napište "apti" a stiskněte TAB. Doplní se Vám celý název aptitude. Pak stiskněte 2x TAB. Zobrazí se Vám možnosti. Stiskněte "i" a zase TAB (možnost na "i" je jenom jedna - install, proto nemusíte psát více písmen). Nyní postupně pište znaky "amarok" a po každém písmenu stiskněte 2x TAB. Vidíte jak se výběr možností postupně zužuje až je shell schopen bezpečně rozpoznat požadovaný balík.

Výsledek by měl vypadat nějak takto:

sudo aptitude install amarok

Nyní už byste měli chápat jak doplňování znaků funguje. Podrobnější význam příkazu bude vysvětlen později. Hoříte-li touhou po poznání, zkuste příkazy "man sudo" a "man aptitude". Popíší Vám právě použité říkazy.


Pokud přecházíte na Linux z Windows, jeden z nejzásadnějších rozdílů, který Vás může (nezřídka nepříjemně) překvapit, pro Vás bude znamenat styl instalace programového vybavení. Zde totiž neexistují (tedy, něco podobného tu je, ale neni to standardní styl instalace) instalační exe soubory kterými se programy instalují.

Instalují se tzv. balíky (anglicky packages). Balík je v podstatě zkomprimovaný archiv, který obsahuje soubory potřebné pro běh instalovaného programu stejně jako instalační exe soubory ve Windows.

Rozdíl ovšem je ten, že v Linuxu se o instalaci programu stará správce balíků. Čili, Vy si vyberete program, který chcete nainstalovat a správce balíků se postará o to, aby byly potřebné balíky nainstalovány. Balíky totiž, stejně jako exe soubory ve Windows, často neobsahují úplně všechny soubory, které program vyžaduje. Toto má i ve Windows své opodstatnění. Jeden druh knihovny často využívá více programů. A byla by hloupost stahovat a instalovat potřebné knihovny znovu a znovu jako součást jiných programů.

Čili výhoda správce balíků je v tomto ohledu zřejmá, vy si vyberete co chcete, správce se postará o zbytek. Nemusíte honit po webu pochybné programy pochybného obsahu a řešit, jestli máte nebo nemáte nainstalovány potřebné knihovny.

Další výhoda správce balíků je, že hlídá, jestli si programy vzájemně nepřepisují data. Nemůže se Vám tedy stát, že máte dva instalátory, a oba Vám přepisují nějaké knihovny a tím způsobí nefunkčnost jiných programů. Toto byl poměrně velký neduh Windows, nicméně v poslední době se to Microsoftu tak nějak daří řešit.

Velkou výhodou správce balíků je rovněž podepisování balíků. To se provádí pomocí GPG klíče a jeho autor se tímto zavazuje, že jím podepsané balíky neobsahují škodlivý software ale jenom to, co mají obsahovat. Ve Windows něco takového není a musíte spoléhat na dobrý úmysl tvůrce programu. Nezřídka si takto uživatel zavlekl do systému nějaký spyware apod. (toto je moje osobní zkušenost).

Někde Vám budou doporučovat, abyste si program sami zkompilovali (tzv. svatá trojice "./configure", "make, "make install"). Poklepejte si na čelo, usmějte se a jděte dál. Ano, někdy, až budou Vaše znalosti světa Linuxu a Open Source obecně na výši, se může stát, že budete chtít/potřebovat zkompilovat speciální program, který se nikde v binární podobě nevyskytuje. Ale v současné době disponuje Ubuntu tak rozsáhlými archivy balíků (ať už oficiálními nebo neoficiálními), že v podstatě nehrozí, že budete kompilování potřebovat. Já osobně Vám kompilaci ani nedoporučuji. Popřepisujete různé knihovny či si jinak zanesete zmatek do systému a pak můžete reinstalovat a neoprávněně nadávat na nestabilní Linux.

V tomto průvodci Ubuntu Vám bude kompilace zběžně popsána, ale pořád mějte na paměti, že je to až poslední možnost instalace programu a měli byste ji podstupovat jenom pokud jste obeznámeni s problémem a nejlépe ještě pokud máte nablízku kamaráda, který poradí.


Nejspíš se Vám ze začátku nebude zamlouvat ani systém přístupových práv. Ano, ve Windows něco takového není. Tento systém ani nebyl navržen pro připojení na web a tak ani nebylo třeba omezovat práva běžného uživatele (někteří neznalí lidé tvrdí že Bill Gates je otec internetu, toto není pravda, internet se rozšířil navzdory němu, ne díky němu, byl tak přinejlepším jeho tchýní). Každý mohl instalovat a odinstalovávat programy a taky to tak potom vypadalo (o zábavě s viry obzvláště ve Win řady 9x nemluvě). Sám si pamatuju jak v době kdy jsem začínal s Windows, bratr co chvíli něco napravoval či rovnou kompletně reinstaloval. Nestalo se Vám někdy něco podobného? Nesmazal Vám někdy bratr důležitá data nebo rovnou zrušil systém (špatná správa pro feministky, sestry umí zamávat s nezabezpečeným systémem zrovna tak dobře)?

V Linuxu je něco takového v podstatě nemožné (ano, dělali ho chybující lidé a chybující lidé ho taky používají, systém Vám např. nezabrání v prozrazení hesla a podobně). Už se nemusíte bát o svá data. Já sám svým PC neznalým rodičům s klidem říkám: "Ničeho se neboj, nic zrušit nemůžeš. Dokud něco vyloženě nerozmlátíš, nebude pro mě problém vše napravit."

A to je přesně ono. Přísným oddělením práv běžného uživatele a superuživatele (čili správce počítače) je důvod proč Vám Váš Linux nemůže složit kdokoliv kdo Vám anglicky napíše, že Vás miluje, či libovolný rodinný příslušník (Windows řady NT už toto taky tak nějak řeší, ale výchozí udělení práv správce každému, potřeba použít NTFS a neexistence multiuser multitaskingu, kdy může na jednom počítači být přihlášeno více uživatelů tuto snahu ještě pořád hodně srážejí).

Čili, ano, musíte použít heslo pro získání práv superuživatele, ale ta bezpečnost za to stojí. Navíc Ubuntu toto ještě zjednodušuje při zachování bezpečnosti.


Další rada se týká restartování. Zde na Ubuntuguide.org (mám na mysli anglické verze manuálu, já se toto v překladu pokouším minimalizovat) je často doporučováno restartovat systém pro provedení změn. Toto je zde napsáno pro zjednodušení. Pokud neinstalujete-neaktualizujete obzvláště důležitou knihovnu, jako třeba jádro systému, úplný restart není třeba. Obvykle se jenom musí restartovat změněná aplikace. Čili pokud aktualizujete GNOME, stačí se odhlásit a znovu přihlásit. Nejčastěji se doporučuje restartovat Xserver což je aplikace která se stará o vykreslování oken a různá desktopová prostředí (jako GNOME, KDE, XFCE a další) jsou její nadstavby.

Toto se provede stiskem kláves Ctrl + Alt + Backspace (odhlášení by taky mělo stačit, obvykle tím taky dojde k restartování Xserveru). Čistější způsob restartování Xserveru (a taky méně user-friendly) je přepnout se do konzole (stiskem např. Ctrl+Alt+F1), přihlásít se a pak spustit "sudo /etc/init.d/gdm restart" (pro Kubuntu namísto gdm zadejte kdm).

Tím dojde k restartování prostředí, obrazovka zčerná a následně vám zpětně naskočí přihlašovací menu gdm (pokud nemáte zapnuté automatické přihlášení). Proto doporučuji nejdřív uložit všechny dokumenty protože dojde také k ukončení běhu veškerých aplikací které jste měli na ploše spuštěné. Restartování Xserveru se provádí také pokud např. náhodou začne nějaká nezbedná aplikace způsobovat tak velké vytížení, že nepůjde korektně či méně korektně ukončit. Nestává se to denně, ale pokud se to náhodou někdy stane, budete vědět co a jak.

Dále se může stát, že v důsledku chyby programu, nebo, a to daleko častěji, chybou nevhodného zásahu do systému (pozor, sudo je tu taky od toho aby Vám docvaklo, že provádíte změny s právy všemocného uživatele root a máte tedy moc si třeba kompletně smazat disk či špatně nastavit systémovou aplikaci) nemusí ani restart Xserveru pomoci. Pro tento případ je v jádře (položka v Kernel hacking) obsažena podpora pro použití klávesy SysRQ, kterou jste patrně doteď použili maximálně jako Print Screen (je to obvykle zdvojená klávesa).

Zatuhne-li Vám tedy počítač, zkuste následující posloupnost kláves:

Alt + SysRq + S (sync - provede se uložení dat z paměti na pevný disk) Alt + SysRq + U (unmount - připojení disků jen pro čtení) Alt + SysRq + B (boot - provede se restart)

Slova sync, unmount a boot jsou zde použita jako mnemotechnická pomůcka. Nejsem si jistý, jestli názvy odpovídají skutečnému úmyslu autora této užitečné pomůcky.

Je jasné, že tvrdý restart je až poslední možnost protože popsaný způsob je šetrnější k Vašim datům. Bude jej zapotřebí jen v krajních případech kdy předchozí postupy nepomohly. Nepředpokládám, že budete tyto způsobu restartování potřebovat často, ale přece jenom, nic není dokonalé.

Pokud máte nějaké návrhy, nápady či připomínky k překladu, můžete se mi ozvat na můj JID (musíte mít založen účet na nějakém jabber serveru, protože toto není e-mailová adresa ačkoliv tak vypadá): belisarivs zavináč njs.netlab.cz

Mně nezbývá než Vám popřát hodně štěstí při objevování nového světa Open Source a Ubuntu a doufat, že vám výsledek mojí práce na překladu bude k něčemu dobrý.


Základní poznámky

  1. Toto je neoficiální průvodce začátky používání 7.04 (Feisty Fawn). Není spojen s Ubuntu a Canonical Ltd.
  2. Tento průvodce může být diskutován na oficiálním Fóru UbuntuGuide.org na ubuntuforums.org. Zastavte se a přidejte se do diskuse.
  3. Pokud uvidíte namodralé pole, znamená to, že musíte provádět příkazy v příkazové řádce (Programy --> Systémové nástroje --> Terminál) nebo použít obsah tohoto pole jak je zmíněno v dalších instrukcích.
  4. Abyste redukovali chyby při opisu, je doporučeno kopírovat a vkládat příkazy do terminálu (pravý klik na příkazy --> "Kopírovat" nebo "Vložit". Také můžete použít Ctrl+C pro kopírování a Shift+Insert pro vkládání, případně můžete zkusit označit text levým myšidlem a kliknutím kolečkem myši jej vložit do terminálu, (pozn. překl.))
  5. "sudo" znamená - provádí superuživatel. "sudo" Vás požádá o Heslo (Password). Prosím napište jej.
  6. Pokud potřebujete o příkazu více informací, podívejte se na manuálové stránky použitím příkazu "man". Například "man sudo" zobrazí manuálovou stránku příkazu "sudo".
  7. Pokud Vás nebaví pořád psát "aptitude" nebo apt-get, přečtěte si #Správce balíků Synaptic
  8. "aptitude", "wget" a další nástroje pro instalaci/update/download programů vyžadují internetové připojení.
  9. Pro stažení souboru klikněte pravým tlačítkem na odkaz --> vyberte "Uložit odkaz jako..." --> ujistěte se, že název a přípona souboru jsou správně.
  10. Nech je duch "lidskost ostatním" pořád s Vámi...


Pokud používáte 64-bit verzi, vyměňte všechna "i386" za "amd64"


Použití gksudo vs. sudo

Příkazy (v terminálu), které vyžadují práva roota musí následovat za příkazem sudo, nebo jeho grafickou verzí gksudo. Pro většinu uživatelů jsou oba příkazy zaměnitelné a mohou si tedy vybrat který použijí.

Ale jsou zde jisté rozdíly. Gksudo spouští s konfiguračními soubory roota, zatímco sudo s konfiguračními soubory běžného uživatele.

Zde je na toto téma pěkná diskuse. Doporučuje se zde gksudo pro všechny uživatele kromě případů, kdy je použito čistě prostředí příkazové řádky. V těch případech se doporučuje sudo.

V tomto průvodci jsou obě možnosti použity. Sudo je univerzálnější (hodí se třeba pro servery), gksudo je zase vázáno na GNOME. V KDE jej nahrazuje kdesu.

Jak přidat extra repositáře

Používání menu

  • Vyberte si repositáře pro Vaši distribuci. Tyto jsou součástí distribučního systému Ubuntu. Toto je doporučená metoda.
Systém --> Správa --> Zdroje softwaru

Zaškrtněte repozitáře, které budete potřebovat (main, universe, restricted, multiverse). Repositář 'sources' pravděpodobně nebudete potřebovat.

  • Přidejte libovolné repositáře třetích stran. Takové repositáře nejsou monitorovány, ale některé jsou docela populární. Používáte je na vlastní riziko.
Systém --> Správa --> Zdroje softwaru --> Software třetí strany --> Add...

Přidejte svůj repositář. V tomto příkladě přidáme Medibuntu, populární repositář třetích stran.

Řádka APT: deb http://packages.medibuntu.org/ feisty free non-free
  • Stáhněte potřebné gpg klíče a přidejte je do seznamu klíčů. tento klíč Vašemu systému ověřuje tento repositář. U Medibuntu se to provádí takto:
wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add -

Manuální editace sources.list

  • Manuální aktualizace provádíte na vlastní riziko. Míchání nekompatibilních repositářů může poškodit Váš systém.
  • Vytvořte kopii současného seznamu zdrojů.
sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
  • Pužijte textový editor (gedit nebo nano) pro editaci seznamu zdrojů:
gksudo gedit /etc/apt/sources.list
  • Editujte repositáře v sources.list podobně jako v tomto vzoru:
Pro poupožití lokálního zrcadla můžete přidat "cc." před archive.ubuntu.com, cc = kód země
např. deb http://cz.archive.ubuntu.com/ubuntu feisty main restricted universe multiverse
## See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
## newer versions of the distribution.
## Přidejte komentář (##) před každý řádek aby nebyl procházen. 
## Použijte následující sources.list jen na vlastní riziko. 
## Odkomentujte deb-src pokud chcete stahovat zdrojové balíky
## Pokud máte instalační CD, můžete jej přidat do repositáře použitím 'apt-cdrom add'
## čímž dojde k přidání řádku podobného tomu následujícímu:
#deb cdrom:[Ubuntu 7.04 _Feisty Fawn_ - Beta i386 (20070322.1)]/ feisty main restricted
deb http://cz.archive.ubuntu.com/ubuntu/ feisty main restricted
#deb-src http://cz.archive.ubuntu.com/ubuntu/ feisty main restricted
## Hlavní opravné aktualizace vytvořené po finálním vydání distribuce.
deb http://cz.archive.ubuntu.com/ubuntu/ feisty-updates main restricted
#deb-src http://cz.archive.ubuntu.com/ubuntu/ feisty-updates main restricted
## Software z tohoto repositáře je NAPROSTO NEPODPOROVÁN týmem Ubuntu,
## a ani nemusí být pod svobodnou licencí. Rozhodnutí použít 
## tento repositář je na Vás. Taky prosím berte v potaz, že pro software
## v universe NEBUDOU vytvářeny revize nebo aktualizace Ubuntu security
## týmem.
deb http://cz.archive.ubuntu.com/ubuntu/ feisty universe
#deb-src http://cz.archive.ubuntu.com/ubuntu/ feisty universe
## Software z tohoto repositáře je NAPROSTO NEPODPOROVÁN týmem Ubuntu,
## a ani nemusí být pod svobodnou licencí. Rozhodnutí použít 
## tento repositář je na Vás. Taky prosím berte v potaz, že pro software
## v universe NEBUDOU vytvářeny revize nebo aktualizace Ubuntu security
## týmem.
deb http://cz.archive.ubuntu.com/ubuntu/ feisty multiverse
#deb-src http://cz.archive.ubuntu.com/ubuntu/ feisty multiverse
## Software z tohoto repositáře nebyl testován tolik jako ten v hlavním repositáři,
## ačkoliv obsahuje novější verze některých aplikací které obsahují zajímavé vlastnosti.
## Taky prosím berte v potaz, že pro software v backports NEBUDOU
## vytvářeny revize nebo aktualizace Ubuntu security týmem.
deb http://cz.archive.ubuntu.com/ubuntu/ feisty-backports main restricted universe multiverse
#deb-src http://cz.archive.ubuntu.com/ubuntu/ feisty-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu feisty-security main restricted
#deb-src http://security.ubuntu.com/ubuntu feisty-security main restricted
deb http://security.ubuntu.com/ubuntu feisty-security universe
#deb-src http://security.ubuntu.com/ubuntu feisty-security universe
deb http://security.ubuntu.com/ubuntu feisty-security multiverse
#deb-src http://security.ubuntu.com/ubuntu feisty-security multiverse
## PLF REPOSITÁŘ (Nepodporován. Může obsahovat ilegální balíky. Použití na vlastní riziko.)
## Medibuntu - Ubuntu 7.04 "feisty fawn"
## Please report any bug on https://launchpad.net/products/medibuntu/+bugs
deb http://packages.medibuntu.org/ feisty free non-free
#deb-src http://medibuntu.sos-sts.com/repo/ feisty free non-free
## KOMERČNÍ REPOSITÁŘ SPOLEČNOSTI CANONICAL (Hostovaný na serverech Canonical, ne Ubuntu
## serverech. VMWare, RealPlayer10, Opera, DesktopSecure a další.) 
deb http://archive.canonical.com/ubuntu feisty-commercial main
## enlightenment e17 beta, použití na vlastní riziko
## E17 je Beta a může být nestabilní či poškodit Váš systém
#deb http://edevelop.org/pkg-e/ubuntu feisty e17
#deb http://e17.dunnewind.net/ubuntu feisty e17
#deb-src http://edevelop.org/pkg-e/ubuntu feisty e17

Pro přidání klíče po použití repositáře Enlightenment:

wget -q http://lut1n.ifrance.com/repo_key.asc -O- | sudo apt-key add -
  • Obnovit seznam balíků:
sudo apt-get update


Přidání programů z GUI menu

Přidat/Odstranit programy

Použití nástroje Přidat/Odstranit... je velmi jednoduché.

Aplikace --> Přidat/Odstranit...
  • Hledejte druh programů který chcete přidat. Např.: napište MP3 pro vypsání seznamu software týkajícího se mp3.
  • Zaškrtněte aplikaci, kterou chcete nainstalovat (či odškrtněte pro odinstalování).
  • Klikněte na tlačítko "Použít".
  • Zobrazí se Vám seznamnově nainstalovaných balíků. Potvrďte.

Správce balíků Synaptic

Synaptic poskytuje přístup k instalaci k o mnoho více programů než nástroj Přidat/Odstranit. Dává Vám více možností instalace závislostí ve velmi dobře použitelném GUI. Je to standardní metoda instalace balíků v Ubuntu.

Systém --> Správa --> Správce balíků Synaptic
  • Hledejte typ programu jaký chcete, ať už v sekcích nebo pomocí vyhledávače balíků podle zadaných požadavků.
  • Klikněte na čtvereček vedle názvu balíku a vyberte co chcete provést.
  • Pokud má program více závislostí, vyskočí na Vás okno,kde budou uvedeny. Potvrďte.
  • Pak klikněte na "Použít" a potvrďte.
  • Instalace pomocí Synaptica dělá to samé jako pomocí apt-get či aptitude.

Buď napíšete:

sudo apt-get instal balík

nebo

sudo aptitude install balík

anebo spustíte Synaptic a balík nainstalujete z něj. Je to úplně jedno.

Automatix2

Varování: Automatix2 je proprietární skript, který se pokouší nainstalovat nějaký software a často při tom způsobí poškození systému. Komunita Ubuntu pro něj NEBUDE poskytovat podporu a navíc velmi nedoporučuje jeho použití. Problémy které způsobuje se velmi těžko řeší a mohou vést až ke kompletní reinstalaci systému. Vývojáři Debianu a Ubuntu zkoušeli co dělá a jak funguje a zjistili, že je poměrně nebezpečný. Viz tento přehled. Používejte Automatix jen na vlastní nebezpečí.

Někteří uřivatelé hlásí jeho úspěšné použití po čerstvé instalaci systému bez jakékoliv aktualizace nebo instalace nových balíků.

Nejnovější balík lze získat zde.

  • Pro systémy i386 lze získat balík zde:
wget http://www.getautomatix.com/apt/dists/feisty/main/binary-i386/automatix2_1.1-4.7-7.04feisty_i386.deb
  • Instalujte tímto příkazem:
sudo dpkg -i automatix2_1.1-4.7-7.04feisty_i386.deb
  • Pro systémy amd64 lze získat balík zde:
http://www.getautomatix.com/apt/dists/feisty/main/binary-amd64/automatix2_1.1-4.6-7.04feisty_amd64.deb
  • Instalujte tímto příkazem:
sudo dpkg -i automatix2_1.1-4.6-7.04feisty_amd64.deb
  • Automatix2 je dostupný z menu Aplikace --> Systémové nástroje --> Automatix
Instalace Automatixu s použitím apt (alternativní metoda)
echo "deb http://www.getautomatix.com/apt feisty main" | sudo tee -a /etc/apt/sources.list
wget http://www.getautomatix.com/keys/automatix2.key
gpg --import automatix2.key
gpg --export --armor E23C5FC3 | sudo apt-key add -
sudo apt-get update
sudo apt-get install automatix2

Správa programů z příkazové řádky

K práci s balíky v příkazové řádce se používají nástroje APT (Advanced Packaging Tools). Nejčastěji je to program apt-get. Jeho syntaxi si probereme níže. Zároveň si uvědomte, že práce s tímto programem musí probíhat s právy superuživatele (root) takže musíte nejdříve napsat sudo/gkduso

Instalace balíku:

sudo apt-get install jméno_balíku

Odinstalace balíku:

sudo apt-get remove jméno_balíku

Neúplně nainstalované balíky mohou být opraveny:

sudo apt-get install jméno_balíku --reinstall

For more info see the official APT guide here.

Instalace programů pomocí programu pro příkazovou řádku s mmenu

Někteří uživatelé nepoužívají desktopové prostředí ale chtějí menu pro instalaci programů. Pro ty je vhodný program aptitude:

Jeho pouhým spuštěním (pamatujte, názvu programu musí předcházt sudo) se Vám zobrazí GUI programu, kde můžete pohodlně hledat balíky jako v Synapticu.

Lze jej ale rovněž použít namísto apt-get s podobnou syntaxí.

Instalace balíku:

sudo aptitude install jméno_balíku

Odinstalace balíku:

sudo aptitude remove jméno_balíku

Aktualizace a povýšení

Povýšení z Ubuntu Edgy Eft na Ubuntu Feisty Fawn

  • Metoda č. 1:
sudo apt-get dist-upgrade
  • Metoda č. 2:

Povýšení verze Dapper Drake na Edgy Eft a na Feisty Fawn

  • Metoda č. 1: Systém --> Správa --> Správce aktualizací. Tak můžete povýšit z Dapper Drake na Edgy Eft. Tento postup můžete zopakovat pro povýšení z Edgy Eft na Feisty Fawn. Nepovšujte přímo z Dapper Drake na Feisty Fawn. Může Vám to zpsobit dost vážné problémy.
  • Metoda č. 2: Přečtěte si Povýšení z Ubuntu Dapper nebo Edgy na Feisty Fawn

Povolení automatických aktualizací

  • Povolte automatické aktualizace z menu:
Systém --> Správa --> Zdroje softwaru --> Aktualizace

Vyberte si "Důležité aktualizace", "Doporučené aktualizace" a případně i jiné aktualizace dle libosti. Vyberte si frekvenci s jakou bude prováděna kontrola dostupných aktualizací.

Jak manuálně aktualizovat Ubuntu

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
  • Z menu:
Systém --> Správa --> Správce aktualizací

Kde jsou další průvodci *buntu?


Desktopová prostředí

Kde si prohlédnout obrázky z Ubuntu

Toto prostředí je postaveno na GNOME, což je výchozí prostředí pro Ubuntu.

Kde si prohlédnout obrázky z Kubuntu

Toto prostředí je postaveno na KDE. Koukněte na Kubuntuguide.org.

Jak spouštět příkazy v terminálu

  • Toto je pro GNOME. Spusťte emulátor terminálu:
Aplikace --> Příslušenství --> Terminál
  • Pokud zde tuto položku nevidíte, přidejte si ji do menu:
Klikněte pravým tlačítkem na Aplikace --> Upravit nabídky --> Příslušenství --> Terminál (zaškrtnout)

Na operace se soubory apod. je vhodnější používat terminál, ale pokud spouštíte aplikace jako Beryl, Compiz a Emerald, jejichž relace končí až ukončením práce na počítači a nechcete kvůli nim mít pořád otevřené okno terminálu (jeho zavřením obvykle dojde k ukončení aplikace která v něm byla spuštěna) můžete použít applet "Spustit aplikaci..." pro GNOME.

Jak nainstalovat KDE (Kubuntu)

sudo apt-get install kubuntu-desktop

Systém se zeptá jestli chcete používat kdm nebo gdm. Doporučujeme gdm.

Systém --> Ukončit... --> Odhlásit
Sezení: KDE

Jak odinstalovat KDE (Kubuntu)

  • Odeberte balík:
sudo apt-get remove kubuntu-desktop

Pokud jste nepoužili tento příkaz, tak se mrkněte na tento tutorial.

Kde si prohlédnout obrázky z Xubuntu

Toto je minimalistické prostředí založené na XFCE. Je nejlepší pro PC s menším množstvím paměti. Koukněte na Xubuntuguide.org.

Jak nainstalovat XFCE (Xubuntu)

sudo apt-get install xubuntu-desktop

Xubuntu vzhled gdm bude nastaven jako výchozí.

Systém --> Ukončit... --> Odhlásit
Sezení: XFCE

Jak odinstalovat XFCE (Xubuntu)

  • Odeberte balík:
sudo apt-get remove xubuntu-desktop

Pokud jste nepoužili tento příkaz, tak se mrkněte na tento tutorial.

Kde si prohlédnout obrázky z Ubuntu Studia

Ubuntu Studio je desktopové prostředí zaměřené na použití multimédií.

Kde si prohlédnout obrázky z desktopového prostředí Enlightenment

Toto prostředí je zaměřeno na speciální efekty. Je hezké a nenáročné ale taky ještě dost nedokončené.

Jak nainstalovat FluxBox

Fluxbox je populární minimalistický správce oken. Více hledejte třeba na stránkách Fluxboxu.

sudo apt-get install fluxbox menu
  • Spusťte Fluxbox z GDM:
echo "exec startfluxbox" --> ~/.xinitrc
  • Změňte přihlašovací zvuk:
sudo apt-get install sox
gksudo gedit ~/.fluxbox/startup

Nalezněte tento řádek:

exec /usr/local/bin/fluxbox

Někde nad něj dejte toto:

play /usr/share/sounds/login.wav --> /dev/null 2>&1 &

Jak nainstalovat Blackbox

  • Blackbox je minimalistický správce oken. Není moc často aktualizován. Více informací hledejte na Blackbox Wiki.
sudo apt-get install blackbox menu

Jak změnit obrazovku USplash když spouštíte nebo vypínáte počítač

Když přidáte další desktopové prostředí, obrazovka USplash se může změnit (např. Kubuntu namísto Ubuntu). Pokud ji chcete změnit proveďte toto:

sudo update-alternatives --config usplash-artwork.so

Dojde k vypsání seznamu nainstalovaných obrazovek usplash. Napište číslo které odpovídá té kterou chcete použít a stiskněte Enter. Poté proveďte:

sudo dpkg-reconfigure usplash

Kde hledat různé grafické elementy pro Váš desktop

Jak nastavit GLSlideshow

  • GLSlideshow je šetřič obrazovky který postupně ukazuje obrázky s plynulým panoramatickým pohledem a slábnutím. Pro jeho zapnutí:
Systém --> Volby --> Šetřič obrazovky --> GLSlideshow
  • Feisty Fawn nenabízí způsob aby někdo jiný než root nastavoval obrázky (v /usr/share/backgrounds). Nejjednodušší bude vytvoření vlastního adresáře kam uživatel vloží zvolené obrázky a pak vložit symbolický odkaz do /usr/share/backgrounds. V ukázce vytvoříme adresář s názvem screensaverpics, ale může se jmenovat i jinak.
mkdir ~/screensaverpics
gksudo ln -s /usr/share/backgrounds ~/screensaverpics
  • Create a .xscreensaver file in your home directory:
gksudo gedit .xscreensaver
  • Add this line:
imageDirectory:	/path/to/images/
  • Save it and test the screensaver by locking your screen. You'll see your images, but it will repeat the same one over and over. To fix this, change your glslideshow.desktop configuration file:
gksudo gedit /usr/share/applications/screensavers/glslideshow.desktop
  • Look for the following entry:
Exec=glslideshow -root
  • Modify this line to instead read:
Exec=glslideshow -root -duration 10 -pan 10 -fade 3
  • Save and try the screensaver again. You should see all of your images in a random-ordered slideshow.


3-D Desktopy

Compiz / Desktop Efekty

  • Do Feisty Fawn byl přidán Compiz. Ale je stále v experimentální fázi a mnoho efektů Vám nemusí fungovat.
  • Pro přístup k některým efektům z menu:
Systém --> Volby --> Efekty prostředí
  • Pro změnu nastavení Compizu (v současné době se toto nedoporučuje):
  • Povolte položku Editor nastavení:
Klikněte pravým tlačítkem na Aplikace --> Upravit nabídky --> Systémové Nástroje --> Editor nastavení (zaškrtnout)
  • Spusťte Editor nastavení:
Aplikace --> Systémové nástroje --> Editor nastavení
  • Jděte na:
apps --> compiz --> ??

OpenCompositing: Beryl a Compiz

Vývoj Berylu byl ukončen v březnu 2007, ale tento je stále podporován. Beryl a Compiz se znovu spojují do Compiz-fusion pod vlajkou OpenCompositing. Navštivte OpenCompositing.org pro více informací. Compiz je ve Feisty Fawn nainstalován jako výchozí. Úplný průvodce instalací se specifickými instrukcemi pro karty nVidia, ATI, a je k nalezení na stránce Compiz documentation. Instrukce pro získání nejnovější verze jsou dostupné na Compiz Ubuntu Installation Guide.

  • Pokud Compiz není nainstalován, nainstalujte jej pomocí správce balíků Synaptic nebo pomocí příkazové řádky:
gksudo apt-get install compiz
Jak nainstalovat Beryl (ATI)

Prosím pozor: Jsou dva způsoby instalace Berylu pro karty ATI. Jeden využívá open source moduly a jeden proprietární moduly. Nejdříve zkuste open source. V případě, že postup nebude fungovat (nebo budete chtít využít proprietární moduly, ať už kvůli výkonu nebo vlastnostem), je v další sekci uveden návod jak vrátit vše zpět.

Instalace Berylu s použitím Open Source ovladačů
  • Tato metoda funguje taky na 64 bit systémech
  • Funguje na starších kartách ATI
  • Používá se open source ovladačů radeon.
  • Využívá se AIGLX. Pokud Vám direct rendering nefunguje, zobrazování bude velmi pomalé.
Přidejte tento repositář do Vašeho seznamu: 
deb http://ubuntu.beryl-project.org/ feisty main 
  • Přidejte GPG klíč pro repositář a aktualizujte seznam balíků:
wget http://ubuntu.beryl-project.org/root@lupine.me.uk.gpg -O- | sudo apt-key add - 
gksudo apt-get update
  • Vytvořte kopii souboru xorg.conf a editujte jej:
cp -p /etc/X11/xorg.conf /etc/X11/xorgold.conf
gksudo gedit /etc/X11/xorg.conf 

V sekci "Module" se ujistěte, že jsou zde obsaženy následující řádky (pokud nejsou, přidejte je):

Load "dri"
Load "vbe"
Load "glx"

Ujistěte se, že na konci souboru jsou tyto řádky (v UNIXech je navíc dobrým zvykem navíc nechávat na konci textového souboru prázdný řádek):

Section "DRI"
Mode 0666
EndSection
  • Restartujteujte Xka. (Restartování X.org možná někdy nemusí stačit. Pokud se systém chová divně, raději jej restartujte úplně, ale pamatujte, tohle nejsou Windows, neresetuje se kvůli každé drobné změně.)
  • Nainstalujte Beryl:
gksudo apt-get install beryl beryl-manager
beryl-manager --no-force-window-manager

Tímto se Beryl pouze spustí ale neaktivuje.

  • Změňte nastavení aby bylo použito AIGLX:
Klikněte pravým tlačítkem myši na červený krystal blízko hodin --> Advanced Beryl Options
Window Manager: Metacity(GNOME)
Rendering Path: copy
Advanced --> Change Rendering Platform: AIGLX.
  • Klikněte pravým tlačítkem myši na krystal --> Select Window Manager: Beryl

Pokud vše funguje a můžete rotovat kostkou apod., tak změňte rendering path zpět na automatic.

Pokud se vyskytne problém, restartujte počítač kompletně a opět spusťte Beryl:

beryl-manager --no-force-window-manager
  • Spuštění Berylu po startu:
Systém --> Volby --> Sezení 
Nový: beryl-manager
Odinstalování Berylu (open source instalace)
  • Pokud instalační metoda s použitím open source modulů nevedla k cíli proveďte návrat k výchozímu nastavení následováním těchto kroků:
Zajděte do:
Systém --> Volby --> Sezení
a zase Beryl zrušte.
  • Použití:
rm ~/.config/autostart/beryl-manager.desktop

přinese stejný efekt

Tím dojde k odebrání Berylu z položek po spuštění . Nyní zkopírujte původní xorg.conf soubor zpět.

gksudo cp -p /etc/X11/xorgold.conf /etc/X11/xorg.conf
  • Spusťte souborový manažer Nautilus, dejte zobrazit skryté soubory a ve svém domovském adresáři smažte adresáře .beryl a .emerald a soubor .beryl-managerrc.

Nebo spusťte:

rm -r ~/.beryl
rm -r ~/.emerald
rm ~/.beryl-managerrc
Restartujte Xserver.

Pokud Beryl nechcete vůbec používat, odeberte repositář a pak spusťte:

gksudo apt-get remove beryl beryl-manager emerald-themes
gksudo apt-get autoremove
Instalace Berylu použitím proprietárních FGLRX driverů od ATI
  • ATI fglrx driver nebude podporovat vlastnosti, které Compiz v Ubuntu má. Nainstalujte Xgl aby Vám nová verze Berylu spolupracovala s Vaší kartou ATI:
gksudo apt-get install xserver-xgl
  • Pro vytvoření skriptu spouštějícího Xgl spusťte:
gksudo gedit /usr/local/bin/startxgl.sh

Vložte tam tento text:

#!/bin/sh
Xgl :1 -fullscreen -ac -accel xv:pbuffer -accel glx:pbuffer &
DISPLAY=:1
exec dbus-launch --exit-with-session gnome-session

Pokud Vám chybí tlačítko pro vypnutí a restart, vložte tam namísto předchozího textu tento:

#!/bin/sh
Xgl :1 -fullscreen -ac -accel xv:pbuffer -accel glx:pbuffer &
DISPLAY=:1
cookie="$(xauth -i nextract - :0 | cut -d ' ' -f 9)"
xauth -i add :1 . "$cookie"
exec dbus-launch --exit-with-session gnome-session
  • Takto se stane sript spustitelným:
gksudo chmod a+x /usr/local/bin/startxgl.sh
  • Takto se přidá položka Xgl do výběru sezení v GDM:
gksudo gedit /usr/share/xsessions/xgl.desktop

Vložte do soboru tento text:

[Desktop Entry]
Encoding=UTF-8
Name=GNOME with XGL
Comment=
Exec=/usr/local/bin/startxgl.sh
Icon=
Type=Application
  • Opět uděláme skript spustitelný:
gksudo chmod a+x /usr/share/xsessions/xgl.desktop
  • Dočasně vypněte repositář universe:
Systém --> Správa --> Zdroje softwaru
Odškrtněte položku "Otevřený software udržovaný komunitou (universe)".
  • Přidejte správný klíč repositáře:
gksudo wget http://ubuntu.beryl-project.org/root@lupine.me.uk.gpg -O- | sudo apt-key add -
Přidejte toto do Vašeho seznamu repozitářů (nebo to udělejte ručně pomocí geditu): 
deb http://ubuntu.beryl-project.org/ feisty main
  • Aktualizujte seznam balíků:
gksudo apt-get update
  • Nainstalujte Beryl:
gksudo apt-get install beryl
  • Nainstalujte ovladače ATI drivers (pokud je potřeba):
Systém --> Správa --> Správce nesvobodných ovladačů
Povolte: ATI graphics card

Odhlašte se z GNOME

  • V GDM si vyberte sezení Xgl, pak spusťte Beryl:
Klikněte pravým tlačítkem myši na červený krystal poblíž hodin --> 
Select Window Manager: Beryl
Select Window Decorator: Standard Beryl Decorator (Emerald)
Reload Window Decorator
Reload Window Manager
  • Pokud dostanete hlášku, že beryl-xgl chybí, stáhněte balík beryl-core (případně jej najdete ve /var/cache/apt/archives):
wget http://ubuntu.beryl-project.org/pool/feisty/main/0.2.0/beryl-core_0.2.0~0beryl1_i386.deb

Rozbalte beryl-xgl (? na to musím ještě mrknout) do ~/Desktop (jde to třeba v Midnight Commanderovi - mc) a zkopírujte do správného adresáře:

gksudo cp ~/Desktop/beryl-xgl /usr/bin/beryl-xgl
  • Pokud máte problém s více uživateli v Xgl, koukněte na tohle vlákno.
  • Přidejte Beryl a Emerald do programů po spuštění:
Systém --> Volby --> Sezení
Nový --> Jméno: Beryl
Příkaz: beryl-manager
Nový --> Jméno: Emerald Theme
Příkaz: emerald --replace
  • Znovu zapněte repositář universe, ale ujistěte se, že se nic co má vztah k Berylu neaktualizuje.
Jak nainstalovat Beryl (Nvidia)
  • Zazálohujte xorg.conf:
gksudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup
gksudo gedit /etc/X11/xorg.conf
  • Nainstalujte ovladač Nvidia pro grafickou kartu:
Systém --> Správa --> Restricted Driver Manager
Enable: Nvidia Drivers

Restartujte Xserver a ujistěte se, že ovladače Nvidia pracují správně.

  • Nainstalujte Beryl:
gksudo apt-get install beryl emerald-themes beryl-manager
  • Spusťte Beryl:
beryl-manager
  • Spusťte Emerald (pokud sám nenaběhne):
emerald --replace
  • Spuštění Beryly a Emeraldu po startu:
Systém --> Volby --> Sezení
Nový: beryl-manager
Nový: emerald --replace
  • Zkuste se odhlásit a znovu přihlásit jestli je vše jak má.
  • Pokud se menu programu nezobrazují ve správné vrstvě (pod otevřenými okny):
Klikněte pravým tlačítkem myši na ikonu Beryl manageru (červený krystal u hodin) --> Reload Window Manager

Problém by měl být napraven.

  • Pokud Vaše okna nemají okraje a horní proužek s tlačítky (minimalizovat, maximalizovat a zavřít), editujte /etc/X11/xorg.conf:
gksudo gedit /etc/X11/xorg.conf

Najděte Section "Device" a vložte do ní následující řádek:

Option "AddARGBGLXVisuals" "True"

V Section "Screen" najděte řádek DefaultDepth a nastavte tam hodnotu na 24:

DefaultDepth 24

(Více detailů najdete na této stránce .)

  • Pokud používáte karty NVIDIA GeForceGo možné budete potřebovat přidat do Setion "Device" v /etc/X11/xorg.conf řádek:
Option "DisableGLXRootClipping" "True"
  • Pokud to stále nepomáhá Klikněte pravým tlačítkem myši na ikonu Beryl manageru (červený krystal u hodin) -->
Advanced Beryl options --> Rendering platform --> Force AIGLX
Co dělat když přehrávače videa padají během používání Berylu
  • Přečtěte si bug 96226
  • Bude potřeba změnit video výstup z xv na x11 v ~/.mplayer/config a gstreamer-properties.
Jak opravit černá okna během přehrávání videa
  • Existuje dočasné řešení spočívající ve změně video výstupu.
  • Pro přehrávače běžící na platformě gstreamer (Totem, atd.):
gstreamer-properties
Video --> Výchozí výstup --> Zásuvný modul: X Window Systém (bez Xv)

Klikněte na "Test" abyste ověřili, že přehrávání videa funguje (měli byste vidět standardní testovací TV barevné proužky).

  • Pro VLC player (pokud je nainstalován):
VLC --> Nastavení --> Nastavení
Video --> Output modules --> Pokročilá nastavení (zaškrtnout) --> Video output module --> X11 video výstup
  • Pro MPlayer (pokud je nainstalován):
Mplayer --> Klikněte pravým tlačítkem myši na obrazovku --> Preferences
Video --> Available Drivers: X11 (XImage/Shm)

Na některých grafických kartách nejde video přehrát na celé obrazovce (mně to dělá intel GMA950, pozn překl.).

  • Pro Xine player (pokud je nainstalován):
Xine --> File --> Configure --> Preferences
experience_level: Master Of The Known Universe
Video --> Driver: xshm 
  • Pro RealPlayer (pokud je nainstalován):
RealPlayer --> Tools --> Preferences
Hardware --> Deselect: Use XVideo


Jak vylepšit sub-pixel font rendering ve Feisty Fawn
  • Tímto dojde ke zlepšení vzhledu fontu.
  • Opatchované knihovny jsou zkompilovány proti knihovnám Freetype 2.3.x (v současné době nejsou ve Feisty Fawn) a obsahují patche pro subpixel rendering od Davida Turnera.
deb http://www.telemail.fi/mlind/ubuntu feisty fonts
deb-src http://www.telemail.fi/mlind/ubuntu feisty fonts

Přidejte klíče repositáře:

gpg --keyserver subkeys.pgp.net --recv-keys 937215FF
gpg --export --armor 937215FF | sudo apt-key add -
deb http://ubuntu.moshen.de feisty experimental
deb-src http://ubuntu.moshen.de feisty experimental

Přidejte klíče repositáře:

wget http://ubuntu.moshen.de/2F306651.gpg -O- | sudo apt-key add -

Poznámka ze dne 25.6.2007 - Repozitář nefunguje.

  • Nainstalujte balíky
gksudo apt-get update
gksudo apt-get install libfreetype6 libcairo2 libxft2
  • Proveďte rekonfiguraci nastavení fontů. Následující nastavení fungují dobře: Nativní, Automaticky, Nepovolovat bitmapové fonty.
sudo dpkg-reconfigure fontconfig-config
sudo dpkg-reconfigure fontconfig
  • Po aplikování změn restartujte Xserver.

Poznámka: Pokud se později rozhodnete vrátit původní balíky zpět, musíte snížit verzi všech tří nainstalovaných balíků. Více informací hledejte zde.

Jak nainstalovat Compiz-Fusion (Znovusjednocení projektů Compiz a Beryl)
deb http://download.tuxfamily.org/3v1deb feisty eyecandy
deb-src http://download.tuxfamily.org/3v1deb feisty eyecandy
  • Přidejte GPG klíč:
wget http://download.tuxfamily.org/3v1deb/DD800CD9.gpg -O- | sudo apt-key add - 
  • Aktualizujte seznamy balíků:
gksudo apt-get update
gksudo apt-get -y upgrade
  • Zazálohujte soubor /etc/X11/xorg.conf a editujte jej:
cp -p /etc/X11/xorg.conf /etc/X11/xorgold.conf
gksudo gedit /etc/X11/xorg.conf 

Do sekce "Module" přidejte tyto tři řádky (pokud tam už nejsou):

Load "dri"
Load "vbe"
Load "glx"

Taky zajistěte, aby na konci souboru bylo toto:

Section "DRI"
Mode 0666
EndSection

Preventivně restartujte celý systém (restart Xserveru by měl stačit, ale jistota je jistota).

  • Nainstalujte Compiz pro GNOME:
gksudo apt-get -y install compiz compiz-gnome compizconfig-settings-manager compiz-fusion-plugins-extra libcompizconfig-backend-gconf

nebo

  • Nainstalujte Compiz pro KDE:
gksudo apt-get -y install compiz compiz-kde compizconfig-settings-manager compiz-fusion-plugins-extra libcompizconfig-backend-kconfig
  • Spusťte Compiz:
compiz --replace
Jak nainstalovat Compiz (Nvidia)

Projekt Looking Glass

Toto je 3D window manager postavený na technologii Java.

  • Přečtěte si Začátky s Projektem Looking Glass
  • .deb balík je dostupný ke stažení (pro Debian je k disposici repositář, zkontroluju, jestli jde použít i pro Ubuntu).

Working with archives and packages

Some programs are not available in Ubuntu repositories. They may be available as Debian (.deb) packages (Ubuntu is based on Debian), may be archived in tar, gzip, and gzip archives, or may only be available as source code packages.

Zacházení s archivy ".tar.gz" (Tar/GZip) a ".tar.bz" (Tar/BZip)

Pro extrakci:

sudo apt-get install unp
unp -u archiv.tar.gz
unp -u archiv.tar.bz2

Soubor bude rozbalen do adresáře, který ponese jméno původního spuboru bez poslední přípony.

Spuštěním programu unp bez argumentů vypíšete seznam podporovaných kompresních algoritmů. Unptedy můžete použít i na ně.

Vytvoření tar.gz archivu:

tar cvfz archiv.tar.gz adresář

Vytvoření tar.bz2 archivu (bz2 je velmi účinný komprimátor,ale zvládne zkomprimovat pouze jeden soubor, proto se soubory nejdříve zabalí do tar a pak je zkomprimuje bz2):

tar cvjf archiv.tar.bz2 adresář

Jak kompilovat program ze zdrojového souboru 1

Nejdříve nainstalujte kompilátory a potřebné hlavičkové soubory:

gksudo apt-get install build-essential
gksudo apt-get install linux-headers-`uname -r`

"uname -r" vypíše verzi používaného jádra, čili v příkladu výše dojde k nainstalování hlavičkových souborů pro jádro, které pouříváte.

Nainstalujte nástroj na tvorbu balíků:

gksudo apt-get install checkinstall

Rozbalte archiv:

unp -u archiv.tar.gz

Zahajte tvorbu balíku:

cd /cesta/do/rozbaleného/archivu
./configure
make
checkinstall

Poznámka: ./ znamená, že se soubor spustí jako program.

Poznámka: Jste li majiteli dvou nebo vícejádrových chipů, můžete parametru make přidat parametr -j2 (či více podle počtu jader). Kompilace proběhne zhruba 2x rychleji, protože budou kompilovat všechna jádra.

Takhle se např. kompiluje na Amálce (nejvýkonnější Český superpočítač, běží na něm tuším Slackware Linux) s deseti tisíci procesory (nebo kolik jich má):

make -j10000

Poznámka: Pokud chcete do programu zakompilovat podporu některých věcí navíc, můžete ke ./configure přidat další parametry. Tyto zjistíte, když spustíte:

./configure --help

Nechejte si výsledný ".deb" souborpro případné další použití. Nainstalujte jej:

gksudo dpkg -i balík.deb

Poznámka: Toto jsou základní instrukce které ne vždy fungují. Některé balíky vyžadují instalaci jiných balíků knihoven i hlavičkových souborů. Čtěte pozorně výpis skriptu ./configure. Poskytuje Vám informace o chybějících balíčcích potřebných pro úspěšnou kompilaci. Jak jsem již říkal, je to až poslední možnost instalace programu a nedoporučuji Vám ji. Má svá úskalí a chci abyste byli varováni předem.

Ze začátku jsem zmiňoval "svatou trojici" "./configure, make, make install". Určitě se divíte, proč jsem přidal jeden krok navíc a místo přímé instalace zvolil tvorbu balíčku, který pak navíc musíte ještě instalovat. Určitě Vás ale napadnou některé výhody. Jako třeba ponechání si instalačního balíčku "na horší časy". Další, pro začátečníka ne moc jasnou výhodou je, že tento balíček respektuje sdresářovou strukturu Vaší distribuce a instaluje soubory tam kam má, a vy je pak můžete dohledat (zkoušeli jste otevřít nějaký .deb archiv v "mc"?) či prostě pomocí správce balíku program snadno odinstalovat. O faktu, že něco takového je u programů instalovaných pomocí "make install" podstatně obtížnější se snad zmiňovat nemusím.

Jak kompilovat program ze zdrojového souboru 2

Pokud je v adresáři, kde jste rozbalili stažený soubor se zdrojovými soubory i podadresář "debian", máte to nesrovnatelně jednodušší. Místo příkazů "./configure, make, make install" stačí použít příkaz "fakeroot debian/rules binary" a potvrdit. Pochopitelně musíte mít nainstalován balík "fakeroot". Pokud půjde vše jak má, dojde rovnou k vytvoření perfektního balíku se všemi náležitostmi (on ten checkinstall taky není úplně košer).

Utility

Jak zacházet se soubory rar

sudo apt-get install unrar
sudo apt-get install rar

(Je to shareware, který si musíte do 40ti dní zaregistrovat.)

Jak nainstalovat kalkulátor IP adres

Gip kalkulátor IP adres který se integruje s GNOME.

Jak nainstalovat Firefox Widgets

Firefox Widgets zlepšuje vzhled komponent Firefoxu (jako tlačítka, zaškrtávátka a mnoho dalších).

Synchronizace času s časovými servery

  • Z menu:
Systém --> Správa --> Datum a čas
  • Pro jedinou synchronizaci klikněte na 'Synchronize Now'.
  • Pro permanentní synchronizaci s časovým serverem:
Nastavení: Udržuj synchronizované s internetovými servery
Pokud jste vyzváni, nainstalujte podporu NTP
  • Manuální instalace balíku ntp:
sudo apt-get install ntp

Pokud instalujete ntp takto, nemusíte nic nastavovat jelikož synchronizace proběhne automaticky.

Jak nastavit obrázky ze serveru Flickr jako obrázky na pozadí

  • Varování: Webilder je soukromá stránka a není ve spojení s Ubuntu, Flickr nebo nějakým oficiálním repositářem. Tyto instrukce Vás navedou ke stažení a instalaci soukromého programu. Použití je na vlastní riziko.
  • Více informací najdete na: Stránkách Webilderu
  • Edituje /etc/apt/sources.list file:
gksudo gedit /etc/apt/sources.list
  • Přidejte na jeho konec tyto řádky:
deb http://debian.websterwood.com/ feisty main
deb-src http://debian.websterwood.com/ feisty main
sudo apt-get update
  • Pokud používáte GNOME, tak spusťte tento příkaz:
sudo apt-get install webilder webilder-gnome
  • Pokud používáte KDE, tak spusťte tento příkaz:
sudo apt-get install webilder webilder-kde
  • Klikněte pravým tlačítkem na panel GNOME a vyberte "Přidat na panel"
  • Pod "Utility" dole vyberte "Webilder Webshots Applet" a klikněte na "Přidat"
  • Nyní byste na panelu měli vidět malý fotoaparát
  • Klikněte na něj pravým tlačítkem a vyberte Nastavení.

Officiální stránky: http://www.flickr.com/

Obrázkový průvodce vlastnostmi instalačního procesu

Zásuvné moduly pro webový prohlížeč

Jak nainstalovat Java J2SE Runtime Environment (JRE) s modulem pro Mozilla Firefox

  • Nainstalujte using command line:
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
  • Poznámka: moduly sun-java6 a sunjava6-plugin jsou také automaticky nainstalovány jako součást meta-balíku ubuntu-restricted-extras. Tím dojde taky k nainstalování Adobe Flashplayeru, msttcorefonts (fonty od Microsoftu), a taky některých multimediálních kodeků.
  • Není k disposici žádný plugin pro amd64. Je potřeba 32-bit firefox. Ubuntuforums poskytuje speciální skripty pro konfiguraci některých 32-bit aplikací pro amd64.
  • Jako alternativu pro amd64 lze použít blackdown Java. Ale je chybová a ne všechny aplikace v ní fungují. Je to taky uzavřenáaplikace.
sudo apt-get install j2re1.4-mozilla-plugin 

Tímto se nainstaluje blackdown Java.

Jak nainstalovat Flash Player (Macromedia Flash) plugin pro Mozilla Firefox

  • Existuje svobodná open source náhrada Flashe s názvem GNASH (viz níže). Ta může být použita namísto Flashe.
Instalace pomocí Synaptica nebo apt-get
  • Poznámka: flashplugin-nonfree je také automaticky nainstalován jako součást meta-balíku ubuntu-restricted-extras. Tím dojde nejen k nainstalování Adobe Flashplayeru, msttcorefonts (fonty od Microsoftu), a taky některých multimediálních kodeků.
Systém --> Správa --> Správce balíků Synaptic --> Hledat --> flashplugin-nonfree --> Označit pro instalaci

nebo z terminálu:

sudo apt-get install flashplugin-nonfree
Instalace z Firefoxu (metoda 2)
Instalace z tar.gz (metoda 3)
  • Navštivte: [1]

Uložte .tar.gz.

tar -xvzf install_flash_player_9_linux.tar.gz
sudo mv install_flash_player_9_linux/libflashplayer.so /usr/lib/firefox/plugins/
sudo mv install_flash_player_9_linux/flashplayer.xpt /usr/lib/firefox/plugins/
rm install_flash_player_9_linux.tar.gz
rm -rf install_flash_player_9_linux
  • Jsou případy, kdy plugin sídlí v /usr/lib/flashplugin-nonfree/. V tom případě ověřte, že tu je symbolický odkaz ukazující do /usr/lib/flashplugin-nonfree/ namísto /usr/lib/firefox/plugins :
cd /usr/lib/firefox/plugins/ 
ls -las
flashplayer.xpt --> ../../flashplugin-nonfree/flashplayer.xpt
libflashplayer.so --> ../../flashplugin-nonfree/libflashplayer.so

Zkopírujte libflashplayer.so a flashplayer.xpt do /usr/lib/flashplugin-nonfree/ :

sudo cp install_flash_player_9_linux/libflashplayer.so /usr/lib/flashplugin-nonfree/
sudo cp install_flash_player_9_linux/flashplayer.xpt /usr/lib/flashplugin-nonfree/
  • Pokud Vám nejde ve Flashi zvuk, (např na YouTube), editujte konfigurační soubor:
sudo apt-get install alsa-oss
gksudo gedit /etc/firefox/firefoxrc

Změňte:

FIREFOX_DSP=""

na:

FIREFOX_DSP="aoss"

Restartujte Firefox.

Poznámka: Tato metoda nefunguje pro amd64, protože zde není 64-bit plugin do Firefoxu. Je potřeba 32-bit Firefox. Ubuntuforums poskytuje speciální skripty pro konfiguraci některých 32-bit aplikací na amd64.

Pokud ani to nepomůže, zkuste PulseAudio:

Jak nastavit zvukový server PulseAudio

Zdá se, že PulseAudio je lepší řešení a s jeho použitím může Firefox sdílet zvuk s jinými aplikacemi najednou.

GNASH open source alternativa

  • Gnash is an open source alternative for the Flash player. It does not yet play all videos. More information here.
  • Nainstalujte Gnash:
sudo apt-get install mozilla-plugin-gnash
  • Uživatelé 64-bit PC pozor - toto je leší řešení než instalace 32-bit pluginů do Firefoxu. Na většinu jednoduchých Flash funkcí (jiných než např. YouTube a Google Videos), můžete ve svém prohlížeč použít tuto GPL verzi Flashplayeru.

Bohužel, Gnash nepřehraje např. YouTube a Google Videos. Pro tyto můžete zkusit povolit (v nastavení Firefoxu) externí přehrávač jako třba VLC (viz níže).

Jak nainstalovat Flash Player (Macromedia Flash) plugin for (64-bit) Mozilla Firefox (pouze)

  • Odinstalujte všechny pluginy (jako Gnash) pro Firefox které jste nainstalovali.
  • Nainstalujte moduly kompatibility:
sudo apt-get install ia32-libs ia32-libs-gtk linux32 lib32asound2

Stáhněte poslední verzi .rpm souborů po plugin a prohlížeč:

wget http://gwenole.beauchesne.info/projects/nspluginwrapper/files/nspluginwrapper-0.9.91.2-1.x86_64.rpm
wget http://gwenole.beauchesne.info/projects/nspluginwrapper/files/nspluginwrapper-i386-0.9.91.2-1.x86_64.rpm

Ninstalujte alien a unrar:

sudo apt-get install alien unrar

Proveďte konverzi pomocí alien:

sudo alien nspluginwrapper-0.9.91.2-1.x86_64.rpm 
sudo alien nspluginwrapper-i386-0.9.91.2-1.x86_64.rpm

Nainstalujte balíky:

sudo dpkg -i nspluginwrapper-0.9.91.2-1.x86_64.deb 
sudo dpkg -i nspluginwrapper-i386-0.9.91.2-1.x86_64.deb

(Názvy souborůse mohou mírně lišit)

Stáhněte FlashPlayer ze stránek Adobe a rozbalte:

wget http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_9_linux.tar.gz
tar xf install_flash_player_9_linux.tar.gz

Jděte do adresáře vytvořeném rozbalením a zkopírujte dva soubory “libflashplayer.so” a “flashplayer.xpt” do /usr/lib/mozilla-firefox/plugins:

sudo cp libflashplayer.so /usr/lib/mozilla-firefox/plugins
sudo cp flashplayer.xpt /usr/lib/mozilla-firefox/plugins

Spusťte nspluginwrapper:

nspluginwrapper -i /usr/lib/mozilla-firefox/plugins/libflashplayer.so
sudo cp ~/.mozilla/plugins/npwrapper.libflashplayer.so /usr/lib/mozilla-firefox/plugins/

Načtěte moduly jako automatickou spužbu:

Systém --> Volby --> Sezení --> Nový
Jméno: Nspluginwrapper
Příkaz: nspluginwrapper -i /usr/lib/mozilla/plugins/libflashplayer.so

Jak nainstalovat Adobe PDF Reader s modulem pro Mozilla Firefox

Jak blokovat reklamu a Java/Javascripty ve Firefoxu

  • Firefox má mnoho rožšíření a různých modulů. Přístup k nim:
Mozilla Firefox --> Nástroje --> Správce doplňků --> Získat rozšíření

Tak se dostanete na stránku Mozilly s různými moduly a rozšířenéími. Two of the most popular extensions provide significant added security and browsing pleasure.

  • NoScript blokuje všechny Java a Javascripty dokud je pro konkrétní stránku nepovolíte. Můžete je povolit dočasně nebo permanentně. Můžete povolit některé nebo všechny skripty na stránce apod. Ačkoliv je toto lepší metoda nez úplné zakázání Javy a skriptů, nejsem si jist, jestli se Vám chce pro každou stránku zjišťovat který skript povolit apod.
  • AdBlock Plus má zabudovaný seznam pro blokování reklamy. Taky můžete reklamu do blokovaných přidat. AdBlock Plus najdete v sekci Populární rozšíření. Klikněte na něj, a pak nainstalujte.

Streamování ve Firefoxu

  • Nainstalujte from extensions/plugins website for Firefox:
Mozilla Firefox --> Nástroje --> Správce doplňků --> Získat rozšíření

Kodeky multimédií a rozšíření prohlížečů

Jak nainstalovat kodeky multimédií

  • "ubuntu-restricted-extras" je meta-balík, který nainstaluje: flashplugin-nonfree, gstreamer0.10-plugins-ugly, gstreamer0.10-plugins-ugly-multiverse, msttcorefonts, sun-java6-jre a sun-java6-plugin. Tyto balíky jsou proprietární, čili jejich užívání je omezeno jejich tvůrci (Adobe, Sun, Microsoft, etc.). Pokud je instalujete, přijímáte licenční ujednání pro každý z nich:
sudo apt-get install ubuntu-restricted-extras
  • W32codecs je balík různých proprietárních kodeků (např. WMV). Jeho instalací souhlasíte s licenčními podmínkami Microsoftu.
  • Repozitáře třetích stran, jako např. Medibuntu, musí být povoleny jako zdroj software. Přečtěte si přidáání zdrojů softwaru pomocí menu pro povolení Medibuntu. (Poznámka: Medibuntu není spojen s Ubuntu. Použití je na vlastní riziko.)
sudo apt-get install w32codecs
  • Taky můžete potřebovat další moduly:
sudo apt-get install libxine-extracodecs gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer0.10-plugins-bad gstreamer0.10-pitfdll

Poznámka: Zdáse, že kodeky WMV9 na amd64 v současné době pracují pouze ve VLC, poslední verzi Mplayera (>= Verze 1.0rc1), a Xine.

Jak nainstalovat podporu přehrávání DVD

Poznámka: Gstreamer dvd plugin je dostupný jako součást gstreamer0.8-plugins ale může mít několik chyb. Totem ale může spolupracovat také s xine jako backendem (namísto gstreameru) při přehrávání DVD. Tato metoda využívá xine s Totemem.

  • Nainstalujte dvd moduly:
sudo apt-get install libdvdread3 
sudo /usr/share/doc/libdvdread3/install-css.sh
  • Nainstalujte xine backend pro Totem (pokud Totem používáte):
sudo apt-get install totem-xine
  • Dokončete instalaci modulů:
sudo apt-get install libdvdcss2

Jak nainstalovat MIDI sound server (Timidity++)

Timidity umožňuje přehrávání MIDI těmi, kdo mají MIDI hardware nebo zpracování MIDI zabudované do zvukové karty (většina uživatelů) zkrze softwarový syntetizér.

  • Timidity můžete nainstalovat v Synpaticovi bez dalších kroků.
  • Volitelně můžete instalovat z příkazové řádky:
sudo apt-get install timidity
  • Nastavte Timidity aby používal ALSA jako výchozí (tedy za předpokladu že ALSA používáte):
gksudo gedit /etc/default/timidity

Odkomentujte následující řádek (odstraňte znak "#"):

#TIM_ALSASEQ=true
  • Nastavte požadované moduly pro načtení při startu:
gksudo gedit /etc/modules

Přidejte tyto moduly na konec řádku:

snd-seq-device
snd-seq-midi
snd-seq-oss
snd-seq-midi-event
snd-seq
  • Restartujteujte (nebo zkuste postupně "sudo modprobe modul" kde za "modul" postupně dosadíte moduly vypsané výše").

Jak nainstalovat multimedia pluginy for Firefox

Firefox --> Úpravy --> Předvolby --> Obsah --> Typy souborů: Spravovat...
Totem plugin (GNOME)
sudo apt-get install totem-gstreamer-firefox-plugin
  • Restartujteovat Mozilla Firefox
Kaffeine plugin (KDE)
sudo apt-get install kaffeine-mozilla
  • Restartujteovat Mozilla Firefox
MPlayer plugin (nainstaluje taktéž přehrávač multimédií MPlayer)
sudo apt-get install mozilla-mplayer
  • Restartujte Mozilla Firefox
VLC plugin (nainstaluje taktéž přehrávač multimédií VLC)
sudo apt-get install vlc vlc-plugin-* mozilla-plugin-vlc
  • Abyste mohli streamovat video pomocí vlc, musíte také nainstalovat následující balíky.
sudo apt-get install avahi-daemon
sudo apt-get install avahi-utils
Helix plugin (přehrává soubory Realplayer)
sudo apt-get install mozilla-helix-player helix-player

Přehrávače multimédií

Jak nainstalovat Elisa Multimedia Player

Fluendova Elisa je svobodné mediální centrum které může přehrát DVD, video soubory, hudbu a obrázky. Jelikož je navržena pro rozširitelnost, má potenciál zvládat mnovem víc. Zatím nemá funkce pro přehrávání a nahrávání televizních signálů.

Jak nainstalovat server na přehrávání multimédií MPD

MPD je server pro přehrávání audia. Funguje jako digitální jukebox umožňující správu playlistů přez síť. Počítač s běžícím MPD potřebuje být připojen k zesilovači protože audio nestreamuje ale pouze přehrává. Nicméně může být nastaven na streamování s použitím Icecast a JACK. Více informací na: Music Player Daemon (MPD)

  • Nainstalujte MPD:
sudo apt-get install mpd
  • Vytvořte link na Vaši audio kolekci (MP3 apod):
sudo ln -s /path/to/your/music /var/lib/mpd/music/collection
  • Restartujte MPD
sudo /etc/init.d/mpd restart
  • Editujte nastavení:
sudo gedit /etc/mpd.conf
  • Nainstalujte GNOME client (other desktop clients are available -- see wiki).
sudo apt-get install gmpc
  • Update/Install gmpc:
sudo apt-get install gmpc
  • Nastavte GMPC:
Aplikace --> Zvuk a video --> GNOME Music Player Client
Options --> set Host, Port and connection options --> 

Výchozí nastavení připojí MPD běžící na "localhost". Pokud to bude třeba, nastavte volbu "Autoconnect". Výchozí MPD port 6600, ujistěte se, že tento port neblokujete firewallem.

  • Použití GMPC:

Playlist --> Expand the "Browse Filesystem" tree, right-click on your audio collection and click "Update". This will cause the MPD server to reindex your audio files. No files are changed during this process. When completed, navigate through your audio via the "Browse Filesystem" tree. Right-click on folders and tracks to add them to playlist, or manage existing playlist.

Jak nainstalovat přehrávač multimédií Xine-ui

sudo apt-get install xine-ui
sudo apt-get install libxine-extracodecs
  • Spusťte z menu:
Aplikace --> Zvuk a video --> xine

Jak nainstalovat přehrávač multimédií MPlayer

sudo apt-get install mplayer libxine-extracodecs w32codecs
  • Instalace MPlayer pluginu pro Firefox:
sudo apt-get install mozilla-mplayer
  • Spusťte z menu:
Aplikace --> Zvuk a video --> MPlayer
Frontend MPlayeru (SMPlayer)
  • SMPlayer je frontend (čili program, kreý se stará o grafické pristředí a přehrávání nechá na backendu, v tomto případě mplayertu). Viz SMPlayer.

Jak nainstalovat přehrávač multimédií VLC

sudo apt-get install vlc vlc-plugin-*
  • Abyste mohli streamovat video pomocí vlc, musíte také nainstalovat následující balíky.
sudo apt-get install avahi-daemon
sudo apt-get install avahi-utils
  • VLC plugin pro Firefox můžete taky nainstalovat takhle:
sudo apt-get install mozilla-plugin-vlc
  • Aplikace --> Zvuk a video --> VLC media player

Jak nainstalovat přehrávač multimédií XMMS

sudo apt-get install xmms xmms-skins xmms-wma
  • Aplikace --> Zvuk a video --> XMMS

Jak nainstalovat přehrávač multimédií Songbird

  • Z Psychocats.net si stáhněte tento skript:

http://www.psychocats.net/ubuntu/installsongbird.sh

wget http://www.psychocats.net/ubuntu/installsongbird.sh
sh installsongbird.sh

Spustit:

Aplikace --> Zvuk a video --> Songbird
Jak odinstalovat přehrávač multimédií Songbird
  • Z Psychocats.net si stáhněte tento skript:

http://www.psychocats.net/ubuntu/removesongbird.sh

  • Odstraňte program pomocí skriptu:
wget http://www.psychocats.net/ubuntu/removesongbird.sh
sh removesongbird.sh

Jak nainstalovat přehrávač multimédií amaroK

sudo apt-get install amarok
  • Spusťte z menu:
Aplikace --> Zvuk a video --> amaroK

Poznámka: Pokud si amaroK stěžuje na "dcopserver" program not running, následujte tento tip z http://www.ubuntuforums.org/showthread.php?t=107269&highlight=dcopserver

sudo chown -R `whoami`:`whoami` ~/.*
Jak odinstalovat amaroK
sudo apt-get remove amarok

Jak nainstalovat správce a přehrávač multimédií Banshee

sudo apt-get install banshee
Jak odinstalovat Banshee
sudo apt-get remove banshee

Jak nainstalovat správce hudby a přehrávač Listen

sudo apt-get install listen
Jak odinstalovat Listen
sudo apt-get remove listen

Jak nainstalovat správce hudby a přehrávač Exaile!

sudo apt-get install exaile
Jak odinstalovat Exaile!
sudo apt-get remove exaile

Jak nainstalovat přehrávač multimédií RealPlayer 10 (RealPlayer)

Linux Realplayer je založen na open source programu Helix player. Helix samotný může být nainstalován jako balík stejně jako ostatní balíky a použit namísto Realplayeru. Ale neumí zacházet se streamy a další věci. Tyto instrukce jsou pouze pro proprietární verzi Realplayeru.

Instalujte ze stránek real
  • Spusťte instalátor:
sudo sh RealPlayer10GOLD.bin
Instalace z připraveného balíku .deb

Teto instalace používá deb soubor vytvořený jako součást projektu debian-multimedia (děkujeme Christianu Marillatovi).

Spusťte terminál a zadejte:

sudo apt-get install libstdc++5
wget -c http://www.debian-multimedia.org/pool/main/r/realplay/realplayer_10.0.8-0.1_i386.deb
sudo dpkg -i realplayer_10.0.8-0.1_i386.deb

Jak nainstalovat přehrávač multimédií Helix

Helix je open source balík, který přehrává soubory Realplayeru. Realplayer je na něm ve skutečnosti postaven.

  • Poznámka: Zatím nejsou podporovány 64-bit procesory.
sudo apt-get install helix-player mozilla-helix-player

Jak nainstalovat Stream Directory Browser (streamtuner)

sudo apt-get install streamtuner streamripper
  • Aplikace --> Zvuk a video --> streamtuner
Jak odinstalovat Stream Directory Browser (streamtuner)
sudo apt-get remove streamtuner streamripper

Jak nainstalovat Internet TV (Democracy TV / Miro)

Democracy TV byla přejmenována na Miro. Tento source přehrávač Vám umoží přehrát přes 2000 kanálů včetně podcastů, RSS, YouTube, a video blogů.

  • Přečtěte si #Firewall. Potřebujete mít povoleny porty pro Bittorent. Toto můžete udělat v GUI pro firewall Firestarter. Po instalaci Miro používá porty 8400-8500. V sekci nastavení si můžete vybrat jiné. Pokud máte router, ujistěte se, že jsou tyto porty povolené i na něm.
  • Starší verze je v repositářích Ubuntu:
  • Nainstalujte Democracy Player
sudo apt-get install democracyplayer
  • Nainstalujte extra kodeky (pokud je třeba):
sudo apt-get install libxine-extracodecs
  • Spusťte:
Aplikace --> Zvuk a video --> Democracy TV
deb http://ftp.osuosl.org/pub/pculture.org/miro/linux/repositories/ubuntu feisty/
  • Znovu načtěte zdroje pokud používáte Synaptic nebo z příkazové řádky:
gksudo apt-get update
  • Najděte a nainstalujte balík miro buď v Synapticu nebo z příkazové řádky:
gksudo apt-get install miro

Internetové nástroje

Jak nainstalovat P2P BitTorrent klienta (Azureus)

  • Nainstalujte:
sudo apt-get install azureus
  • Spusťte:
Aplikace --> Internet --> Azureus

Jak nainstalovat P2P BitTorrent klienta (Deluge)

  • Stáhněte a nainstalujte (i386)
wget http://download.deluge-torrent.org/ubuntu/feisty/0.5.3/deluge-torrent_0.5.3-1_i386.deb && \
sudo apt-get install libboost-date-time1.33.1 libboost-filesystem1.33.1 libboost-thread1.33.1 && \
sudo dpkg -i deluge-torrent_0.5.3-1_i386.deb && \
rm deluge-torrent_0.5.3-1_i386.deb
  • Stáhněte a nainstalujte (amd64)
wget http://download.deluge-torrent.org/ubuntu/feisty/0.5.3/deluge-torrent_0.5.3-1_amd64.deb && \
sudo dpkg -i deluge-torrent_0.5.3-1_amd64.deb && \
rm deluge-torrent_0.5.3-1_amd64.deb
  • Spusťte program: Aplikace --> Internet --> Deluge BitTorrent Client
Jak používat µTorrent pod WINE
sudo apt-get install wine
wget http://download.utorrent.com/1.6.1/uTorrent-1.6.1-install.exe
wine uTorrent-1.6.1-install.exe

Jak nainstalovat P2P BitTorrent klient (KTorrent)

sudo apt-get install ktorrent

Toto je KDE aplikace, ale může běžet i v GNOME a Xfce. Je v hlavním repositáři a tak je plně udržován týmem Ubuntu.

Jak nainstalovat Pidgin 2.1.1 Instant Messenger

Toto je nástupceprogramu GAIM. Můžete si vybrat i jiné programy z menu Aplikace --> Přidat/Odstranit... (doporučeno).

  • Nainstalujte tcl a tk:
sudo aptitude install tk8.4 tcl8.4
  • Nainstalujte balík Pidginu:
wget http://download.ubuntu.pl/_Feisty_Fawn/pidgin/2.1.1/pidgin_2.1.1-1_i386.deb
sudo dpkg -i pidgin_2.1.1-1_i386.deb
Jak nastavit Google Talk pro Pidgin

Nastavení pro Pidgin/Gaim

Jak nainstalovat Ninan (NZB usenet klient)

whereis java

Dostanete něco takového:

java: /usr/bin/java /etc/java /usr/X11R6/bin/java /usr/bin/X11/java /usr/share/java /usr/share/man/man1/java.1.gz

Vložte tuto cestu do terminálu:

export JAVA_HOME=/usr/bin/java
  • Stáhněte a rozbalte Ninan:
wget http://easynews.dl.sourceforge.net/sourceforge/ninan/ninan-1.1.0.tar.gz
gunzip ninan-1.1.0.tar.gz
tar -xvf ninan-1.1.0.tar
  • Přesuňte jej tam, kde jej chcete mít nainstalován např. /usr/local/bin/ninan/
sudo mv ninan-1.1.0 /usr/local/bin/ninan
  • Zajistěte aby byl ninan.sh spustitelný
cd /usr/local/bin/ninan
chmod 755 ninancore.sh
  • Spusťte Ninan na pozadí:
nohup ./ninancore.sh &
  • Nyní k němu můžete přistupovat přez odkaz: http://127.0.0.1:9090/ninan/ s jménem: admin a heslem:password
  • Pokud chcete aby ninan startoval automaticky:
gksudo gedit /usr/local/bin/ninan/ninancore.sh

Přidejte (a nahraďte vlastní cestou):

cd /usr/local/bin/ninan

Vpravo mezi "fi" a "touch restart":

fi
cd /usr/local/bin/ninan
touch restart

Potom přidejte ninan do programů po spuštění:

Jděte na Systém --> Volby --> Sezení
Klikněte na tlačítko "Nový"
Napište "Ninan" (bez uvozovek) do jména
Napište (zase upravte cestu podle sebe) "nohup /usr/local/bin/ninan/ninancore.sh --> /usr/local/bin/ninan/nohup.out &" (bez uvozovek) do položky Příkaz
Klikněte na OK

Nyní by měl Ninan startovat po bootu.

Grafika

Blender 3-D modelovací program

Blender je špičkový open source 3-D modelovací program.

Pro normální (Linux32) uživatele
sudo apt-get install blender yafray
Pro uživatele 64-bit systému
  • Download and extract:
wget http://download.blender.org/release/Blender2.44/blender-2.44-linux-glibc236-py25-x86_64.tar.bz2
tar -xvjf blender-2.44-linux-glibc236-py25-x86_64.tar.bz2
  • Zkopírujte do odpovídajících adresářů a přidejte do menu:
sudo cp blender /usr/bin/blender
gksudo gedit /usr/share/applications/blender.desktop

Do nového souboru vložte následující:

[Desktop Entry]
Name=Blender
Comment=Blender
Exec=blender
Terminal=false
Type=Application
Categories=Graphics;3DGraphics;RasterGraphics;GTK;
  • Spusťte:
Aplikace --> Grafika --> Blender

Jak nainstalovat vektorový ilustrátor Inkscape

Inkscape je graficky open source program podobný Adobe Illustratoru.

  • Nainstalujte:
sudo apt-get install inkscape
  • Spusťte:
Aplikace --> Grafika --> Vektorový editor Inkscape

Systémy pro vytváření a správu webového obsahu

Systém pro vytváření a správu webového obsahu Drupal

Drupal je vedoucí open source systém pro vytváření a správu webového obsahu. Dovoluje tvorbu profesionálních webů a nabízí moduly se širokým spektrem funkcí jako např. blogy, online nakupování a téměř jakoukoliv myslitelnou funkci pro tworbu webu. Více informací najdete na webu Drupalu.

  • Nainstalujte balík drupal-5.1 pomocí Synaptica nebo z příkazové řádky:
sudo apt-get install drupal-5.1
  • Nastavte pro Drupal MySQL databázi Drupal
Pokud je to poprvé kdy používáte MySQL, výchozí globální heslo superuživatel nebude mít heslo. Měli byste jej teď nastavit. Instrukce pro nastavení práv MySQL najdete zde.
Ve zkratce:
mysql -u root
mysql> UPDATE mysql.user SET Password=PASSWORD('your_new_password') WHERE User='root';
mysql> FLUSH PRIVILEGES;
mysql> quit
Dodatečně můžete nastavit dalšího globálního uživatele MySQL (např. mysql_user) následováním těchto instrukcí. Takto si rezervujete roota pouze pro nouzová řešení.
Ve zkratce:
mysql -u root
mysql> CREATE USER 'mysql_user'@'localhost' IDENTIFIED BY 'mysql_user_passwd';
mysql> quit

Nyní musíte pro použití Drupalem vytvořit databázi MySQL. Toto je administrativní příkaz MySQL, takže musíte použít jednoho z Vašich globálních uživatelů (buď root nebo mysql_user, jak byl vytvořen v příkladě výše). Vaší databázi pro Drupal můžete dát i jiné jméno než drupdatabase.

mysqladmin -u root -p CREATE drupdatabase

nebo

mysqladmin -u mysql_user -p CREATE drupdatabase

Vytvořte pro databázi Drupal uživatele. Jako vždy, použijte uživatele root pro nouzové případy. I use the same password for root as I do elsewhere on my system. Then I also create a user named drup_user (but you could also create a user named mysql_user, to keep everything consistent). [I use a unique user here because this is a publicly displayed 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 drupdatabase.* TO 'drup_user'@'localhost' IDENTIFIED BY 'password';
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON drupdatabase.* TO 'root'@'localhost' IDENTIFIED BY 'password'; (I used my usual root password here).
mysql> quit
mysqladmin reload

Poznámka: příkazy mysql (čili ty zadané jako mysql> prikaz) musí končit středníkem. Pokud na něj zapomenete, nic se neprovede.

  • Spusťte Drupal:
http://localhost/drupal
  • Nastavte pro Drupal úlohy v cronu:
Nainstalujte GNOME plánovač úkolů pro Cron. Nainstalujte buď v Synapticu nebo z příkazové řádky:
apt-get install gnome-schedule 
Spusťte plánovač GNOME a přidejte úlohu pro Drupal:
Aplikace --> Systémové nástroje --> Naplánovat

Přidejte http://localhost/drupal/cron.php jako novou opakující se úlohu s popisem 'Drupal Cron'. Nechte položku Žádný výstup zaškrtnutou.

Hry

KDE hry

Metabalík obsahuje kolekci her založených na KDE frameworku. Je to to samé jako gnome-games pro GNOME. Instalace z terminálu:

sudo apt-get install kdegames

Tanto balík je dobře integrován v Kubuntu a je udržován bezpečnostním teamem Ubuntu. Instalace:

sudo apt-get remove kdegames
sudo apt-get autoremove

Frozen Bubble 2

Frozen-Bubble je puzzle hra podobná Bust-a-Move kde střílíte bubliny na útvary bublin různých barev.

sudo apt-get install frozen-bubble

Super Nintendo emulátor (ZSNES) 1.510 pro i386/AMD64

Podporu nebo odpovědi na dotazy hledejte prosím zde http://ubuntuforums.org/showthread.php?t=432642

echo "deb http://packages.dfreer.org feisty main" | sudo tee -a /etc/apt/sources.list
wget http://packages.dfreer.org/7572013D.gpg -O- | sudo apt-key add -
sudo apt-get update

Pro amd64:

sudo apt-get install zsnes32

Pro ostatní:

sudo apt-get install zsnes 
  • Aplikace --> Hry --> zsnes nebo zsnes32

Playstation 1 Emulator (pSX) 1.11 for i386/AMD64

Podporu nebo odpovědi na dotazy hledejte prosím zde http://ubuntuforums.org/showthread.php?t=394097

echo "deb http://packages.dfreer.org feisty main" | sudo tee -a /etc/apt/sources.list
wget http://packages.dfreer.org/7572013D.gpg -O- | sudo apt-key add -
sudo apt-get update

Pro amd64:

sudo apt-get install psx32

Pro ostatní:

sudo apt-get install psx
  • Aplikace --> Hry --> pSX or pSX32

Playstation 1 Emulator (ePSXe) 1.6.0 for i386/AMD64

Přečtěte si tento tutorial: http://www.ubuntuforums.org/showthread.php?t=95835

Office

Jak nainstalovat Clip-Art

  • Jak nainstalovat Open Source clip-art pro OpenOffice.org a ostatní programy.
sudo apt-get install openclipart

Jak nainstalovat windows písma třetích stran

  • Poznámka: Tyto instrukce jsou pouze pro specifické fonty. Základní fonty od Microsoftu mohou být nainstalovány jako součást balíku ubuntu-restricted-extras package. Přečtěte si návod #Jak nainstalovat kodeky multimédií pro informaci jak instalovat tento balík.
  • Jak nainstalovat windows písma třetích stran (jako např. Arial,...)
sudo apt-get install gsfonts-other msttcorefonts t1-xfree86-nonfree ttf-f500 ttf-isabella 
sudo apt-get install ttf-larabie-deco ttf-larabie-straight ttf-larabie-uncommon ttf-staypuft ttf-summersby
sudo apt-get install ttf-ubuntu-title ttf-xfree86-nonfree xfonts-artwiz xfonts-intl-european

Různé

Jak nainstalovat program rozpoznávající optické znaky (tesseract)

Tento komerční program byl otevřen (byly uvolněny jeho zdrojové soubory) v roce 2005.

  • Tesseract umí přečíst pouze obrázky .tif. Neodřezává obrázky, nerozeznává více sloupců, ale může dosáhnout úspěšnosti až 97%.
  • Nainstalujte tesseract-ocr buď v Synapticu nebo z příkazové řádky:
sudo apt-get install tesseract-ocr
  • Spusťte tesseract z příkazové řádky:
tesseract příklad.tif výstupní_soubor

Install 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.

  • 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
  • Stáhněte 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

  • Nainstalujte using the Debian package manager. (No other method seems to work.)
dpkg -i zoneminder_1.22.3-8_i386.deb
  • (Poznámka: 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
  • 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.
Ve zkratce:
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.
Ve zkratce:
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

Poznámka: mysql commands (i.e. any entered at the mysql> prompt) must end with a semicolon. If you forget the semicolon, nothing will happen.

Home automation programs

X10 and Insteon refers to the two protocols of communication between home automation devices. Devices are available from Smarthome (both Insteon and X10), X10.com (X10 only), and Leviton (X10).

Each company makes a handheld controller (and usually also sells MS Windows-based control software), and an interface for a PC. This is a list of the most widely used PC interfaces:

  • PowerLinc 1132CUP Controller (Smarthome) -- allows multiple macros storage and has long battery life. Uses X10 and Insteon protocols.
  • PowerLinc 1132CU Controller (Smarthome) -- similar to above but has fewer programmable features.
  • CM15A Interface (X10.com) -- connects by RF to C15A wireless modules. Has some bugs. Uses X10 protocol.
  • CM11A Interface (X10.com) -- connects through power lines. Reliable. Short battery life. Uses X10 protocol. Has been the standard interface for most Linux software.
  • C17A Firecracker computer interface for X10 (X10.com) -- Short battery life. Uses X10 protocol. Also a standard interface for Linux use.
  • CP290 is an older, now hard-to-find interface for X10.
  • Leviton devices can be controlled by any X10 controller.

Linux software largely has relied on one of two interfaces: the CM11A and the CM17A Firecracker. These both use the X10 protocol. There are now Linux modules for the PowerLinc interfaces that use either the Insteon or X10 protocol. Note that you can usually use any hand-held controller that uses the compatible protocol (X10 or Insteon), in parallel with the PC interfaces.

  • Heyu works with the CM11A interface. BlueLava allows you to access Heyu over the Internet for remote control. xtend is a frontend for Heyu.
  • HomeDaemon uses the CM11A interface.
  • Bottlerocket works with the C17A Firecracker device. There are several GUI frontends and web interfaces for it (see site.) bottlerocket is available as a module from Synaptic Package Manager, as is wmx10, an applet GUI for bottlerocket.
  • GtkX10 is a GUI for the C17A Firecracker.
  • The Tk (Wish)-based GUI for X10 is available as a Synaptic Package Manager package named x10-automate (which will also install the x10 interface package). It works with the the (older) CP290 interface.
  • Project WiSH provides drivers to control PowerLinc interfaces (version 1 USB and Serial, but not version 2), and CM11A. It is provided as a .tar.gz package. It can be used with x10web Java GUI.
  • Insteon PowerLinc support page -- you must like to get into the nuts and bolts! Not for the beginner.
  • MisterHouse is a collection of powerful perl scripts that is quite configurable, if you don't mind customizing perl scripts.
  • Zoneminder surveillance software can trigger X10 events using built-in perl scripts over a CM11A interface.
  • Commercial-grade Linux home automation software:
  • LinuxMCE -- open source whole home automation and multimedia manager, based on KDE (Kubuntu). An outgrowth of the Pluto project, for use on an existing Linux platform.
  • Pluto Software -- Linux based open source and commercial home automation software and multimedia manager for your entire home. Designed as a stand-alone server, it is distributed with its own integrated Debian distro.
  • ECS (Omnipotence Software) -- controls X10, Insteon, and many other types of devices (commercial).

Jak nainstalovat aplikace pro studium náboženských textů

Jak nainstalovat GNOMEsword (program pro studium Bible)
sudo apt-get install gnomesword sword-language-pack-en sword-text-web
  • Pokud vyžadujete jiné jazyky:
sudo apt-cache search bible
  • Hledejte sword-language-pack a sword-text pro dodatečné jazyky.

GNOMEsword najdete v Aplikace --> Příslušenství.

  • Pod KDE použijte kio-sword namísto GNOMEsword:
sudo apt-get install kio-sword
Jak nainstalovat nástroj pro studování Koránu (Zekr)

Zekr je otevřená platforma pro studium Koránu

sudo wget http://siahe.com/zekr/apt/sources.list.d/feisty.list -O /etc/apt/sources.list.d/zekr.lis
wget -q http://siahe.com/zekr/apt/zekr.debian.gpg -O- | sudo apt-key add -
sudo apt-get update 
sudo apt-get install ttf-farsiweb
sudo apt-get install ttf-me-quran ttf-sil-scheherazade zekr
sudo apt-get install zekr-quran-translation-extras

Editory Textu/Kódu

SciTE

  • Toto je alternativní editor textu. Ovládá zvýrazňování syntaxe pro mnoho programovacích jazyků.

Instalace:

sudo apt-get install scite

Geany

  • Toto je další alternativní textový editor se zvýrazňováním syntaxe.
  • Nainstalujte:
sudo apt-get install geany


Cross-platform enabling Applications

Virtualizční technologie

Virtualbox

Innotek VirtualBox je univerzální plný virtualizátor pro x86 hardware. Zamětřený na server, desktop a embedded je nyní jediné profesiální řešení virtualizace, které je zároveň Open Source Software.

VMWare Server / Workstation

VMware Server is a free virtualization product for Windows and Linux servers with enterprise-class support and VirtualCenter management. The free server doesn't allow for a "passthrough" share between the Ubuntu host and the Windows guest (you'll need to use samba etc. for that) but otherwise is a fully functioning virtual application. It also has the advantage that when running it is desktop independent - you can restart GNOME/KDE while it runs and reconnect with the guest session. The same installation instructions apply to both VMWare Server and Workstation.

VMWare Workstation is a paid commercial application and works without modification on Feisty, but needs patches for earlier versions. For more info see http://www.vmware.com.

Manual install (optional) for VMWare Server

Vyberte verzi the tar.gz, ne RPM (nemusíte ji pak převádět), stáhněte ji do nějakého adresáře a rozbalte.

  • Ujistěte se, že máte potřebné balíky:
sudo apt-get install build-essential linux-headers-`uname -r`
  • Jděte do adresáře s rozbaleným vmware a spusťte:
sudo ./vmware-install.pl

Tím se nainstalují všechny potřebné součásti, vyberte výchozí pokud nemáte důvod požadovat něco jiného. Po instalaci Vám bude nabídnuto spuštění nastavení. Vyberte "yes". Ponechte výchozí nastavení.

  • Pokud se při kompilaci vyskytnou problémy, potřebujete 2 patche.

Stáhněte:

wget -c http://icanthack.com/wp-content/uploads/2007/01/vmmon.tar
wget -c http://icanthack.com/wp-content/uploads/2007/01/vmnet.tar

Jako root je umístěte (pořád jako archivy tar) do /usr/lib/vmware/modules/source a přepište původní (ty staré uložte pod jiným jménem.)

Spusťte konfigurační skript jako root:

sudo vmware-config.pl

Jak nainstalovat CrossOver Linux pro spouštění aplikací Windows

Jak nainstalovat a spustit WINE

WINE je systém, který umožňuje běh mnoha programů z Windows pod linuxem. Označit WINE za emulátor není správné. WINE (WINE Is Not an Emulator - akronym) prostředí Windows neemuluje ale skutečně toto aplikační prostředí vytváří. Díky tomu je daleko výkonnější než emulátory, které mají nesrovnatelně vyšší režii, a může v některých ohledech výkonově Windows i překonávat.


Přidejte repositář WINE:

  • Přidejte klíč podepisující repositář WINEHQ:
wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add -
deb http://wine.budgetdedicated.com/apt feisty main
deb-src http://wine.budgetdedicated.com/apt feisty main

nebo z příkazové řádky:

sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/feisty.list -O /etc/apt/sources.list.d/winehq.list
  • Nainstalujte WINE pomocí programu Synaptic:
Systém --> Správa --> Správce balíků Synaptic --> Hledat --> wine
Systém --> Správa --> Správce aktualizací

nebo z příkazové řádky:

apt-get update
apt-get install wine
  • Nastavte volby podle přání:
Systém --> Volby --> WINE Configuration
  • Nastavte umístění Vašeho virtuálního disku "C:"
Systém --> Volby --> WINE Configuration --> Drives
Poznámka: Jako disk C: se použije adresář dle Vašeho příní. Jako výchozí se používá /home/uzivatel/.wine/drive_c ale můžete si vybrat i jiný včetně již existujícího adresáře Windows. Nicméně, tato měna není doporučována a může způsobovat problémy.
  • Taky můžete vytvořit odkaz do Vašeho domovského adresáře pro disk C: abyste jej pak snáze nalezli:
ln -s ~/.wine/drive_c ~/drive_c
  • Přidejte aplikace:
Systém --> Volby --> WINE Configuration --> Aplikace --> Přidat aplikace
Vaše přidané programy budou mít ikonu na ploše pro snadné spouštění.
Jak manuálně instalovat spouštět programy ve WINE (z příkazové řádky)
wine /PATH/EXENAME.exe
Jak nastavit WINE aplikace aby vypadaly jak Windows XP

Díky http://www.winehq.org/pipermail/wine-bugs/2004-August/010161.html

gedit ~/.wine/user.reg

Najděte řádek, který začíná [Control Panel\\Colors] nejaka_cisla, a vložte toto:

[Control Panel\\Colors] 1085191500
"ActiveBorder"="212 208 200"
"ActiveTitle"="10 36 106"
"AppWorkSpace"="128 128 128"
"Background"="58 110 165"
"ButtonAlternateFace"="181 181 181"
"ButtonDkShadow"="64 64 64"
"ButtonFace"="212 208 200"
"ButtonHilight"="255 255 255"
"ButtonLight"="212 208 200"
"ButtonShadow"="128 128 128"
"ButtonText"="0 0 0"
"GradientActiveTitle"="166 202 240"
"GradientInactiveTitle"="192 192 192"
"GrayText"="128 128 128"
"Hilight"="10 36 106"
"HilightText"="255 255 255"
"HotTrackingColor"="0 0 128"
"InactiveBorder"="212 208 200"
"InactiveTitle"="128 128 128"
"InactiveTitleText"="212 208 200"
"InfoText"="0 0 0"
"InfoWindow"="255 255 225"
"Menu"="212 208 200"
"MenuBar"="212 208 200"
"MenuHilight"="0 0 0"
"MenuText"="0 0 0"
"Scrollbar"="212 208 200"
"TitleText"="255 255 255"
"Window"="255 255 255"
"WindowFrame"="0 0 0"
"WindowText"="0 0 0"
Instalace Internet Explorer 6 pod WINE

IE 6 není doporučen pro běžné použití (proč byste to taky dělali, když máte lepší, že?) ale některé programy pro Windows jej potřebují. Navíc můžete testovat jak tento (zatím, bohužel) majoritní prohlížeč neumí pořádně zobrazit Vaše stránky a jak musíte W3C validní html zkriplit aby se zobrazoval korektně.

  • Nainstalujte potřebný balík cabextract pomocí Synaptica (nebo pomocí apt-get).
wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz
tar zxvf ies4linux-latest.tar.gz
cd ies4linux-*
./ies4linux

Ponechejte výchozí nastavení instalace.

Jak nainstalovat Windows Games (Cedega)

Jak nainstalovat Maple 11

  • Vložte instalační CD Maple 11 pro Linux a spusťte instalátor.
cd /cdrom
sudo sh ./installMapleLinux32
  • Nainstalujte do /usr/local/maple11 namísto do výchozího, pokud chcete.

Vytvořte symbolické odkazy:

cd /usr/local/bin
sudo ln -s /usr/local/maple11/bin/xmaple
sudo ln -s /usr/local/maple11/bin/maple
sudo ln -s /usr/local/maple11/bin/mint

Jak nainstalovat Win4Lin (Windows combinované s Linuxem)

Jak nainstalovat Citrix ICAClient 10

  • Nainstalujte Open Motif (>=2.2):
sudo apt-get install motif-clients
wget -c http://download2.citrix.com/en.linuxx86.tar.gz

nebo

wget -c http://download2.citrix.com/files/en/products/client/ica/current/linuxx86.tar.gz

Pokud wget nefunguje, jděte přímo na stránky a stáhněte jej následováním odkazů.

  • Rozbalte a nainstalujte (použijte správně staženou verzi):
gunzip en.linuxx86.tar.gz
tar xvfz en.linuxx86.tar
./setupwfc
  • Povolte ověřování certifikátů ve Firefoxu:
Applications --> Firefox Web Browser --> Advanced --> Encryption --> View Certificates --> Authorities
  • Najděte svoji crtifikační autoritu a klikněte na ni.
Upravit --> "Tento certifikát může identifikovat webové stránky."

Příklad povolení certifikační autority Thawte Consulting cc (použít ovšem můžete i Verisign, Geotrust, Equifax nebo některou z mnohých jiných).

Stáhněte certifikát z http://www.thawte.com/roots/. Rozbalte soubor, najděte potřebný certifikát (možná budete muset změnit příponu) a zkopírujte jej do certifikačního adresáře ICAClienta:

cp ThawteServerCA.cer ~/ICAClient/keystores/cacert/ThawteServerCA.crt 
  • Ujistěte se, že Váš Firewall (IPTables, nebo GUI Firestarter) jsou povolují porty pro Citrix (1494, někdy 443 a 1603).
Jak odinstalovat Citrix ICAClient 10
/usr/lib/ICAClient/setupwfc


Správa uživatelů

Jak se přepnout na uživatele root v konzoli

Pro přihlášení jako root:

sudo -i
Password: <napište heslo>

nebo

sudo su -
Password: <napište heslo>

Pro start shellu jako root při ponechání současného adresáře a různých uživatelských nastavení normálního uživatele:

sudo -s -H
Password: <napište heslo>

nebo

sudo su
Password: <napište heslo>

Jak nastavit/změnit/povolit heslo uživatele root

sudo passwd root

Tohle ale nedoporučuju. Bezpečnost systému beztak nezvýšíte a gksudo i gksu budou chtít pořád heslo uživatele ve skupině admin, ne roota.

Jak vypnout účet uživatele root

sudo passwd -l root

Jak přidat/editovat/mazat uživatele systému

Systém --> Správa --> Uživatelé a skupiny

nebo

sudo useradd jim
sudo userdel jim
  • Více informaví najdete v
man usermod

Jak přidat/editovat/mazat systémové skupiny

Systém --> Správa --> Uživatelé a skupiny
Skupiny --> Přidats skupinu...

Jak se automaticky přihlásit do GNOME

Systém --> Správa --> Přihlašovací okno
Zabezpečení --> Povolit automatické přihlášení

Vyberte uživatele z rozbalovacího menu.

How to allow more sudoers

EDITOR=gedit sudo visudo
  • Append the following line at the end of file
system_username	ALL=(ALL) ALL


or, since everyone in the admin group can use sudo:

sudo adduser a_username admin

This appends the admin group to the user's supplementary group list. They will now have sudo access.

Jak použít "sudo" bez vyzvání k zadání hesla (nebezpečné)

EDITOR=gedit sudo visudo
  • Najděte tento řádek:
jmeno_spravce	ALL=(ALL) ALL
  • Nahraďte jej tímto:
system_username	ALL=(ALL) NOPASSWD: ALL

Jak zabít sezení "sudo"

sudo -K

How to change files/folders permissions

Right click on files/folders --> Properties
Permissions Tab --> Read/Write/Execute (Checked the permissions for Owner/Group/Others)

How to change files/folders ownership

sudo chown system_username /location_of_files_or_folders

If you want to change ownership of all containing files and folders recursively, use the -R option like this:

sudo chown -R system_username /location_of_files_or_folders

How to change files/folders group ownership

sudo chgrp system_groupname /location_of_files_or_folders

If you want to change group ownership of all containing files and folders recursively, use the -R option like this:

sudo chgrp -R system_username /location_of_files_or_folders


Hardware

Myši

Activate side-mouse-buttons in FireFox

Just add two lines to xorg.conf will activate side-mouse-buttons in FireFox. This should work with most 5-button mouse. Here is a list of mice that worked with this instruction.

  • Logitech MX310
  • Logitech MX510
  • Logitech MX518
  • Logitech MX700
  • Logitech MX Revolution
  • Intellimouse Explorer (first edition)
  • Razer Copperhead


Backup X.org configuration file

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak

Modify the X.org configuration file

gksudo gedit /etc/X11/xorg.conf

Find the Input Device section for your mouse and add two lines as shown below. You may also increase the number of buttons if your mouse has more than 7, just fix the rest of the section based upon the number of buttons (remember back/forward, wheel click & tilt left/right all count as buttons)

Change:

Section "InputDevice"
	Identifier "Configured Mouse"
	Driver "mouse"
	Option "CorePointer"
	...
	Option "Protocol" "ExplorerPS/2"
	...
	Option "Emulate3Buttons" "true"
EndSection

to:

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "true"
Option "Buttons" "7"
Option "ButtonMapping" "1 2 3 6 7"
EndSection

Buttons still won't work in Nautilus unless you install the imwheel dameon.

Install & Configure IMWheel

  • Nainstalujte IMWheel
sudo apt-get install imwheel
  • Modify IMWheel configuration file
gksudo gedit /etc/X11/imwheel/imwheelrc
  • Insert the following at the bottom of this existing file
".*"
None, Up, Alt_L|Left
None, Down, Alt_L|Right 
"(null)"
None, Up, Alt_L|Left
None, Down, Alt_L|Right


  • Create IMWheel start-up script
sudo mkdir /home/login
gksudo gedit /home/login/mouse
  • Insert the following into this new file
#!/bin/sh
exec xmodmap -e "pointer = 1 2 3 4 5 6 7" &
exec imwheel -k -b "6 7" &
exec $REALSTARTUP
  • Grant execution for everyone to this new script
sudo chmod +x /home/login/mouse
  • Configure this script to be executed at start-up
    1. Select 'System' --> 'Preferences' --> 'Sessions'
    2. Click the StartUp tab
    3. Click Add, then input: /home/login/mouse
    4. Click OK, then Close
  • Reboot your computer or your GNOME environment and then test your back/forward mouse buttons in Nautilus

(Dont know why but the above worked flawlessly for me with Dapper but not with Feisty, to get it to work in Feisty had to enter a space between 6 and 7 on the line exec imwheel -k -b "67" & hope this helps)

Jak nastavit Apple Mighty Mouse

Apple Mighty Mouse works out of the box, this how to should cover setting up of horizontal scrolling using ball and sidebuttons.

This is placeholder only. Please, provide working howto.

Touchpad

Disable the touchpad while typing

The utility syndaemon can be used to temporarily disable a Synaptic touchpad while typing.

First you must edit /etc/X11/xorg.conf to allow the syndaemon utility to access the touchpad's settings. Make a backup of the file, then:

sudo gedit /etc/X11/xorg.conf

Find the touchpad section:

Section "InputDevice"
 Identifier "Synaptics Touchpad"
 Driver  "synaptics"
 Option  "SendCoreEvents" "true"
 Option  "Device" "/dev/psaux"
 Option  "Protocol" "auto-dev"
 Option  "HorizScrollDelta" "0"
 Option  "SHMConfig" "on"
EndSection

Add the SHMConfig option if it does not already exist.

After you restart X (log out and log in again), you will be able to run syndaemon.

syndaemon -t -d
You may have to restart your computer.

Use syndaemon -h to view additional options.

To have syndaemon start up automatically when you log on, add the command as a new startup program (Systém --> Volby --> Sessions --> Startup Programs).

Adjust touchpad sensitivity

Although gsynaptics allows you to adjust sensitivity, it still isn't sensitive enough for all users. This allows for greater fine tuning of touchpad sensitivity. First you must edit /etc/X11/xorg.conf. Make a backup of the file, then:

sudo gedit /etc/X11/xorg.conf

Find the touchpad section:

Section "InputDevice"
 Identifier "Synaptics Touchpad"
 Driver  "synaptics"
 Option  "SendCoreEvents" "true"
 Option  "Device" "/dev/psaux"
 Option  "Protocol" "auto-dev"
 Option  "HorizScrollDelta" "0"
 Option  "SHMConfig" "on"
EndSection

Add the following after SHMConfig:

Option		"MinSpeed"		"1.0"
Option		"MaxSpeed"		"1.3"
Option		"AccelFactor"		"0.3"

Modify the values to personal taste. After you restart X (log out and log in again), you will using the new sensitivity settings.

Enable vertical, horizontal and circular scrolling

This howto will explain the procedure to setup a Synaptics touchpad for vertical, horizontal and circular scrolling (The same procedure may work for other touchpads, but has not been confirmed)

  • First: Install gsynaptics
sudo apt-get install gsynaptics

Second you have to edit your /etc/X11/xorg.conf to allow gsynaptics to access the the touchpad's settings

  • Second: Backup /etc/X11/xorg.conf
cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
  • Third: Allow gsynaptics access to the touch pads settings
sudo gedit /etc/X11/xorg.conf

Find the touchpad section:

Section "InputDevice"
 Identifier "Synaptics Touchpad"
 Driver  "synaptics"
 Option  "SendCoreEvents" "true"
 Option  "Device" "/dev/psaux"
 Option  "Protocol" "auto-dev"
 Option  "HorizScrollDelta" "0"
 Option  "SHMConfig" "on"
EndSection

Add the SHMConfig option if it does not already exist.

After you restart X (log out and log in again), from the GNOME menu goto Systém --> Volby --> Touchpad

From the Touchpad window you can modify you touchpads settings

Graphics Card

How to setup nVidia drivers in 7.04

Systém --> Správa --> Restricted Devices Manager
Enable Driver
Apply Changes

Insert Ubuntu 7.04 Feisty Fawn CD-ROM

or

Cancel --> Close

Aplikace --> Add/Remove Applications

(Add / Remove apps will load up checking dependencies)

Click Preferences next to help in the bottom left of the add / remove applications windows.

Uncheck the "CD ROM With Ubuntu 7.04..." option from the list of installable CD-ROM volumes.

There, now every time you use the add / remove applications program to install things, it goes onto the internet to get the packages instead of the discs. The idea behind this is to get the LATEST updates.

Close the options, close the next box, then click OK to exit out of add / remove applications and save the changes we just made.

Make sure the nVidia glx is downloaded and installed from either the internet or the install CD, or the next step wont work, as the command will have nothing to execute. thats right, you really need NVIDIA GLX. :)

With the nVidia Driver enabled in the restricted devices manager, we can safely go into the console and mess with the newly loaded drivers' settings to get a nice looking desktop with an acceptable resolution, color depth and refresh rate. These drivers also let us adjust the positioning of multiple monitors much like the forceware drivers in windows, but totally not like windows at the same time. You'll see what I mean when you see the layout and complexity of the panel! Now we must reboot.

Systém --> Quit --> Restart
Load up Aplikace --> Accessories --> Terminal

If you haven't already done so you may right click on Terminal under Aplikace --> Accessories --> Terminal and then add the application to the panel, to make the terminal easier to access in the future.

Load up the terminal, and type in...

sudo nvidia-settings

Then type in your root password (whatever that is)

Be careful about cranking the resolution or refresh too high.

If you want to enable dual monitors then try twinview.

How to setup Dual Monitors with NVidia in Feisty Fawn

From Dual Monitors with NVidia in Ubuntu - Ubuntu Geek

  • Install nvidia-glx driver
sudo apt-get install nvidia-glx
  • Make a backup of xorg.conf
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
  • Edit xorg.conf
sudo gedit /etc/X11/xorg.conf
    • Under the "Module" section, replace "nv" with "glx"
    • Under the "Device" section, make sure that "Driver" says “nvidia”
    • Under the "Screen" section, add the following line:
Option "RenderAccel" "true"
  • Save xorg.conf
  • Restartujte X with Ctrl+Alt+Backspace
    • If X will not start, type the following to restore xorg.conf to working status:
sudo cp /etc/X11/xorg.conf.bak /etc/X11/xorg.conf

and reboot.

  • Assuming everything went well, we’re quite close to having dual screens working. Edit xorg.conf again
sudo gedit /etc/X11/xorg.conf
  • Under the "Screen" section, add these lines:
##This turns on NVidia’s TwinView
Option "TwinView"
##Here I’m setting the resolution to the individual monitors.
Option "MetaModes" "1280×1024 1280×1024"
  • Restartujte X with Ctrl+Alt+Backspace

You should now have dual monitors


How to align monitors left-to-right

Method 1:

  • Edit xorg.conf
  • Under the "Screen" heading, add:
##Orientation Options are: LeftOf, RightOf, Below, Above, or Clone
Option “TwinViewOrientation” “LeftOf”
  • Save xorg.conf
  • Restartujte X with Ctrl+Alt+Backspace


Method 2:

  • Run nVidia Settings
gksudo nvidia-settings
  • In X Server Display Configuration, drag the visible displays around
  • Apply and Save to X Configuration File when you're happy with the settings


How to change primary display from CRT to LCD

From: First display on TwinView - nV News Forums and nVidia Readme and Dual Monitors HOWTO - Zulu's Tips

  • Get the nVidia driver working, as per the howto above
  • Run nVidia Settings
gksudo nvidia-settings
  • Click the Save to X Configuration File button to tidy up the config
  • Restartujte X with Ctrl+Alt+Backspace
  • Backup xorg.conf
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
  • Open xorg.conf in an editor
sudo gedit /etc/X11/xorg.conf
  • Add the following line at the bottom of the "Screen" section:
Option  "TwinViewXineramaInfoOrder" "DFP, CRT"
Option  "UseDisplayDevice" "DFP, CRT"
  • Save xorg.conf
  • Restartujte X with Ctrl+Alt+Backspace

Jak nainstalovat Beta Graphics Driver (NVIDIA)

  • Thanks to Alberto Milone
gksudo gedit /etc/apt/sources.list
  • Add ONE of the following lines based on your architecture
deb http://www.albertomilone.com/drivers/edgy/latest/32bit binary/
deb http://www.albertomilone.com/drivers/edgy/latest/64bit binary/
deb http://www.albertomilone.com/drivers/edgy/newlegacy/32bit binary/
deb http://www.albertomilone.com/drivers/edgy/newlegacy/64bit binary/
  • Uložte editovaný soubor
  • Add the GPG key
wget http://albertomilone.com/drivers/tseliot.asc
gpg --import tseliot.asc
gpg --export --armor albertomilone@alice.it | sudo apt-key add -
  • Update and install
sudo apt-get update
sudo apt-get install nvidia-glx
sudo apt-get upgrade
  • The upgrade should update your linux-restricted-modules & linux-restricted-modules-common packages.
sudo nvidia-xconfig
  • Add a menu option for nVidia Settings
gksudo gedit /usr/share/applications/NVIDIA-Settings.desktop
  • Insert these lines in the new file and save
[Desktop Entry]
Name=NVIDIA Settings
Comment=NVIDIA Settings
Exec=nvidia-settings
Icon=
Terminal=false
Type=Application
Categories=Application;System;
  • Restartujte the computer and your new drivers should be installed.
  • Test the install with these 2 programs
glxinfo
glxgears

How to setup pivot (screen rotation) with default X.org NVIDIA drivers

  • Some LCD monitors are equipped with the pivot feature, to take advantage of it the display has to be rotated 90 degrees. The default nVidia drivers shipped with X.org ("nv") support software screen rotation. Note that it's unaccelerated and can be slow, read #Jak nainstalovat Graphics Driver (NVIDIA) if you decide to install the proprietary driver.
  • To rotate the screen find the "Device" section for the "nv" driver in the /etc/X11/xorg.conf file:
Section "Device"        
Identifier "NVIDIA Corporation NV34 [GeForce FX 5200]"
Driver  "nv"
  • Add the following options to this section:
Option "Rotate" "CW"

Where the "Rotate" option has two possible values (depending on the orientation of the monitor):

  1. CW - rotate the display clockwise (right).
  2. CCW - rotate the display counterclockwise (right).

How to setup pivot (screen rotation) with proprietary NVIDIA drivers

  • Some LCD monitors are equipped with the pivot feature, to take advantage of it the display has to be rotated 90 degrees. The proprietary nVidia drivers support hardware rotation with the Xrandr extension.
  • To enable rotation support find the "Device" section for the "nvidia" driver in the /etc/X11/xorg.conf file:
Section "Device"        
Identifier "NVIDIA Corporation NV34 [GeForce FX 5200]"
Driver  "nvidia"
  • Add the following option to this section:
Option  "RandRRotation" "on"
  • Then the display can be rotated (direction depends on the orientation of the monitor) by:
  1. Setting the "Rotation" property to either "Left" or "Right" in the "Systém --> Volby --> Screen Resolution" dialog.
  2. Issuing either "xrandr -o left" or "xrandr -o right" command.

How to disable NVIDIA graphics logo on GNOME startup

  • The easy way
sudo nvidia-xconfig --no-logo
  • Alternative method
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup
gksudo gedit /etc/X11/xorg.conf
  • Nalezněte tuto sekci
...
Section "Device"
	Identifier	"NVIDIA Corporation NV11 [GeForce2 MX/MX 400]"
	Driver		"nvidia"
	BusID		"PCI:1:0:0"
...
  • Add the following line below it
Option		"NoLogo"

Jak nastavit dual head on NVIDIA based cards

  • Nainstalujte binary driver
  • Make a backup of xorg.conf
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
  • Edit xorg.conf
sudo nano /etc/X11/xorg.conf
  • Add these lines to the "Device" section
Option "TwinView" "True"
Option "TwinViewOrientation" "RightOf" 
Option "UseEdidFreqs" "True"
Option "MetaModes" "1280x1024,1280x1024; 1024x768,1024x768"
Option "UseDisplayDevice" "string" #replace 'string' with either 'DFP' (Digital flat panel connected via DVI port), 
'CRT' (any monitor that is connected via VGA ports), or 'TV'
  • Save and close xorg.conf
  • Restart X-Windows or reboot
  • This was tested on an NVIDIA FX 5200 and known to work using "CRT" as an option for the second monitor
  • If you run into trouble where X is hosed and can get back to the command line, replace xorg.conf with the backup copy
sudo cp /etc/X11/xorg.conf.backup /etc/X11/xorg.conf

Jak nainstalovat Graphics Driver (ATI)

How to Correct the Graphics Resolution (Intel)

  • Intel 915g, 945g, etc. graphics chipsets only have a limited set of resolutions initially installed, despite the correct driver being detected.
  • Nainstalujte the resolution altering tool:
sudo apt-get install 915resolution
  • Run the following to see the availible modes:
915resolution -l
  • Choose a resolution you don't need and replace, for example the following changes 1920x1440 to 1920x1200
915resolution 5c 1920 1200
  • Restart X-Windows.
  • To confirm resolution change look at the "System>Preferences>Screen Resolution" tool.
  • If it works correctly then you can make the change permanent:
sudo gedit /etc/default/915resolution
  • Nalezněte tento řádeks:
MODE=Auto
XRESO=
YRESO=
BIT=
  • And replace with the following lines:
mode=5c
XRESO=1920
YRESO=1200
BIT=24
  • Save and restart your computer to confirm it works.


  • Another way to get the resolution you want is to do this(doesn't always work):
sudo apt-get install xserver-xorg-video-intel
  • With this you don't need the 915resolution anywhere in your Feisty as your resolution will now be handled by X, the windowing system in Linux.

How to show nvidia GPU temperature (nvidia-settings)

At a terminal, type

nvidia-settings

How to detect CPU temperature, fan speeds and voltages (lm-sensors)

sudo apt-get install lm-sensors

Create file called mkdev.sh, and paste in the following

#!/bin/bash
# Here you can set several defaults.
# The number of devices to create (max: 256)
NUMBER=32
# The owner and group of the devices
OUSER=root
OGROUP=root
# The mode of the devices
MODE=600
# This script doesn't need to be run if devfs is used
if [ -r /proc/mounts ] ; then
if grep -q "/dev devfs" /proc/mounts ; then
echo "You do not need to run this script as your system uses devfs."
exit;
fi
fi
i=0;
while [ $i -lt $NUMBER ] ; do
echo /dev/i2c-$i
mknod -m $MODE /dev/i2c-$i c 89 $i || exit
chown "$OUSER:$OGROUP" /dev/i2c-$i || exit
i=$[$i + 1]
done
#end of file

Make this file executable, then run it

sudo chmod +x mkdev.sh
sudo ./mkdev.sh

Now detect sensors, and answer "y" to all questions.

sudo sensors-detect

To load the manual modules, type

sudo /etc/init.d/module-init-tools

Load the modules into kernel with

sudo sensors -s

And check the output

sudo sensors

How to control fan speed (lm-sensors)

Install and config lm-sensors first, see section above. Then run pwmconfig to test your fans

pwmconfig

If you can control fan speeds, great. Now creat a file called /etc/init.d/fancontrol, and paste in the following

#!/bin/sh
#
# Fancontrol start script.
#
set -e
# Defaults
DAEMON=/usr/sbin/fancontrol
PIDFILE=/var/run/fancontrol-pid
PATH=/sbin:/bin:/usr/sbin:/usr/bin
test -f $DAEMON || exit 0
. /lib/lsb/init-functions
case "$1" in
start)
 log_begin_msg "Starting fancontrol daemon..."
 start-stop-daemon --start -o -q -m -b -p $PIDFILE -x $DAEMON
 log_end_msg $?
 ;;
stop)
 log_begin_msg "Stopping fancontrol daemon..."
 start-stop-daemon --stop -o -q -p $PIDFILE
 log_end_msg $?
 ;;
force-reload|restart)
 sh $0 stop
 sh $0 start
 ;;
*)
 log_success_msg "Usage: /etc/init.d/fancontrol {start|stop|restart|force-reload}"
 log_success_msg " start - starts system-wide fancontrol service"
 log_success_msg " stop - stops system-wide fancontrol service"
 log_success_msg " restart, force-reload - starts a new system-wide fancontrol service"
 exit 1
 ;;
esac
exit 0

Make it excutable

sudo chmod +x /etc/init.d/fancontrol

Test it

/etc/init.d/fancontrol start

and

/etc/init.d/fancontrol stop

If it works fine, autoload it when you reboot. Insert the following line into /etc/rc.local, before "exit 0"

/etc/init.d/fancontrol start

How to monitor CPU, GPU temperatures, fan speeds and voltages (GKrellM)

  • Nainstalujte hddtemp first to monitor hard drive temperatures
sudo apt-get install hddtemp

GKrellM is a hardware monitor that can display CPU and GPU temperatures, fan speeds, voltages, CPU load, network load, disk activity, disk temperature, memory usage, and swap usage. The installation is very easy, and configuration is just a few mouse-clicks. You can set alerts to warn you if the CPU is too hot or there is a fan failure. The hddtemp utility works with GKrellM to allow it to sense the disk temperature, as keeping your disks cool (e.g. less than around 40C) will allow them to last longer than if they run continually at higher temperatures (e.g. above 50C).

sudo apt-get install gkrellm

To run the program

Click Aplikace --> Systémové nástroje --> GKrellM

To configure the settings,

Right click on GKrellM --> Configuration

I was struggling with lm_sensors before, but it doesn't detect all of the sensors on my computer. Later I found "GKrellM". It displays the GPU temperature on my nVidia 6600 GT out of the box. GKrellM also has plugins that show weather info, set reminders, etc.

Add an audio alert (optional Step): Here is how to play an audio message when the CPU is too hot or a fan fails. First you need to find or record your own audio alert files. (I use Audacity to record my own.) Then go to:

Configuration --> Builtins folder (Left side)-> Sensors --> Temperatures folder (Right side)-> CPU --> Alerts Button

Paste ONE of the following lines into a Terminal window first to test the sound. If you have two sound cards, you can use "-ao oss:/dev/dsp1" option to route the sound to the second sound card. Modify the file path and name so it points to the correct file. If you can hear the sound, then copy that line to a command line text field on the GKrellM's Alerts window.

mplayer /home/myfolder/alert_messages/heat_alert.mp3
mplayer -ao oss:/dev/dsp1 /home/myfolder/alert_messages/heat_alert.mp3

How to detect CPU temperature, fan speeds for Dell Laptops and install Gkrellm plugin (i8kutils, gkrellm-i8k)

Install i8k utilities

apt-get install i8kutils gkrellm-i8k

To load the module automatically run the following in a terminal window

sudo gedit /etc/modules

Add the following to the end of the file

i8k force=1

Load the module by restarting or

modprobe i8k
  • To monitor with Gkrellm,

Load Gkrellm, goto Gkrellms configuration page, enable the Dell i8k Plugin in the Plugins section. You should now see a new section on the Gkrellm panel with fan controls, CPU temperature, service tag etc

CPU

How to enable your CPU's Power Saving/Frequency Scaling features

  • Check whether or not you already have working power-save (it should install automatically!)

Open a Terminal window (in Aplikace --> Accessories) and type,

cat /proc/cpuinfo

Look for the reference to "cpu MHz" and compare it to the official MHz of your processor. If it is considerably lower, e.g. a 2.0 GHz processor reporting as 1.0 GHz, then the power-save frequency scaling is probably already working. You can further test this by running a cpu intensive process, e.g. glxgears, and then retesting the cpu speed -- if it has increased to the official MHz then the automatic scaling is already working. (Poznámka: the instructions below can also allow you to manually set the cpu speed.)

  • Step 1: Enable BIOS Support

Enter your BIOS at boot and make sure both ACPI and Cool'n'Quiet (AMD) or SpeedStep (Intel) are enabled. Some BIOSes may not have option at all. If that is the case it is probably enabled by default. Other BIOSes may have the option but it is listed as another name altogether. If that is the case check your BIOS manual for more info.

  • Step 2: Remove Userspace Scaling Software

powernowd

sudo apt-get remove powernowd

cpudyn

sudo apt-get remove cpudyn
  • Step 3: Install CPU Module

Identify your cpu type by running the command

cat /proc/cpuinfo

You can also Check the following links AMD CPU Chart - [[2]] Intel CPU Chart - [[3]]

AMD Sempron/Athlon/MP ( K7 )

Socket Types: A, Slot A

sudo modprobe powernow-k7

AMD Duron/Sempron/Athlon/Opteron 64 ( K8 )

Socket Types: 754, 939, 940, S1 ( 638 ), AM2 ( 940 ), F ( 1207 )

sudo modprobe powernow-k8

Intel Core Duo

sudo modprobe speedstep-centrino

Intel Pentium M

sudo modprobe speedstep-centrino

Intel Pentium 4

sudo modprobe p4_clockmod

Others (Unknown)

I'm not entirely sure which cpus are supported using this module. If your cpu doesn't work with one of the above methods try this one.

sudo modprobe acpi-cpufreq
  • Step 4: Scaling Modules
sudo modprobe cpufreq_conservative
sudo modprobe cpufreq_ondemand
sudo modprobe cpufreq_powersave
sudo modprobe cpufreq_stats
sudo modprobe cpufreq_userspace
  • Step 5: Testing/Configuration

Show Available Governors

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors

You should see output similar to

powersave conservative ondemand performance
  • Step 6: Load Modules at Boot

Add the following lines to the end of /etc/modules

cpufreq_conservative
cpufreq_ondemand
cpufreq_powersave
cpufreq_stats
cpufreq_userspace
Also add the module you selected in Step 3
  • Step 7: Install cpufrequtils

This is a simple, effective tool for using the modules z příkazové řádky.

sudo apt-get install cpufrequtils

Test that it's working.

cpufreq-info
  • Step 8: Select a governor

The different governors control how the CPU speed is scaled. Your choices are:

ondemand

CPU frequency is scaled based on load.

conservative

The CPUfreq governor "conservative", much like the "ondemand" governor, sets the CPU depending on the current usage. It differs in behaviour in that it gracefully increases and decreases the CPU speed rather than jumping to max speed the moment there is any load on the CPU. This behaviour more suitable in a battery powered environment.

performance

CPU only runs at max frequency regardless of load.

powersave

CPU only runs at min frequency regardless of load.

See [[4]] for more details.

I typically use ondemand. You get a very slight performance hit and save a lot of power (and produce a lot less heat when idle).

Try it out:

cpufreq-set -g ondemand

On systems with more than one CPU you need to repeat the last command for every other CPU you have with specifying the parameter -c (CPU). To set the governor for the second CPU write:

cpufreq-set -c 1 -g ondemand

To see how many CPUs you have type:

ls /sys/devices/system/cpu/ 
  • Step 9: Configure cpufrequtils to automatically set this governor on boot

Edit the file /etc/default/cpufrequtils. Change the line:

ENABLE="false"

to

ENABLE="true"

Set the GOVERNOR value to the governor name you chose in Step 8.

Sources: [[5]] [[6]]

Modems / Network

How to identify Modem chipset

wget -c http://easylinux.info/uploads/scanModem.gz
gunzip -c scanModem.gz --> scanModem
chmod +x scanModem
sudo cp scanModem /usr/bin/
  • To identify Modem chipset
sudo scanModem
gedit Modem/ModemData.txt

Jak nainstalovat Atheros Wireless Drivers

  • You may have received a message about the restricted drivers manager, in which the atheros HAL has been enabled. You can configure the wireless using the Network Settings Manager
Systém --> Správa --> Síť
  • If, after configuration the wireless still does not work, it is because the wrong driver (ath_pci) has been loaded. To correct this, remove the unwanted module:
sudo rmmod ath_pci
  • Reboot

Jak nainstalovat Windows Wireless Drivers (Ndiswrapper)

  • Přečtěte si #Základní poznámky
  • In order to install ndiswrapper you need a copy the windows drivers for your Wireless ethernet device.
  • This is only meant to be installed if your card isn't supported by Ubuntu, check Ubuntu's list of natively supported wireless cards.
  • Check ndiswrapper's list of supported wireless cards if your card isn't supported natively, please visit Ndiswrapper's official supported cards list
  • If your card is supported by ndiswrapper, you can install and configure it via a gui tool (ndisgtk) very easily. Use the Add/Remove Applications tool and search for "Ndiswrapper driver installation tool". Once installed, you can configure the wireless connection by going to Systém --> Správa --> Windows Wireless Drivers. Some more information on this here.


To Install manually follow the steps below:

  • Find out if you have acx module loaded. Because acx module interferes with windows driver, we need to remove it if it is found.
lsmod | grep acx
  • Remove the acx module if found. It could also be acx_pci or similar. Please Poznámka: New kernel updates will auto load the acx module again. So repeat the following two commands every time the kernel is updated.
sudo rmmod acx
sudo nano /etc/modprobe.d/blacklist
  • Add a new list at the end of the file like this:
# drivers wireless ACX
blacklist acx
  • Nainstalujte ndiswrapper and drivers (due to a bug in Edgy, you need to specify ndiswrapper-utils-1.8)
sudo apt-get install ndiswrapper-utils-1.8
sudo ndiswrapper -i /location_of_your_wireless_driver/your_driver.inf
sudo ndiswrapper -l
sudo modprobe ndiswrapper
  • Set ndiswrapper to load on startup
sudo ndiswrapper -m
gksudo gedit /etc/modules
  • Add the following module to the list
ndiswrapper
  • Now you can configure your wireless card with ifconfig and iwconfig.
e.g. Supposing wlan0 is your wireless device.
sudo iwconfig wlan0 essid "AP" key ababababababababab mode Managed
iwconfig
  • You sould now be able to see the MAC address of the access point and signal rate.
  • Please note that certain card drivers have re-association errors when used with ndiswrapper. This means that whenever you restart Ubuntu, your internet connection does not work, even if it is set to load on startup. To combat this, use this line in the terminal (also assuming wlan0 is your wireless device).
sudo iwconfig wlan0 essid x mode Managed
  • Using an RTL8180 card and ndiswrapper, swapping the order of the key and essid in the configuration command is required to get a connection.
e.g. Supposing wlan0 is your wireless device.
sudo iwconfig wlan0 key ababababababababab essid "AP" mode Managed

Ndiswrapper for Broadcom 43xx wireless chipset

  • The Broadcom 43xx (bcm43xx) wireless chipset is one of the most common chipsets, so special scripts have been written for it.
  • Only follow this if you have a bcm43xx device. To check in the Terminal type:
lspci | grep Broadcom\ Corporation

If it displays a line similar to this,

0000:02:02.0 Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller (rev 03)

you have a Broadcom wireless chipset. Please proceed with the instructions.

  • Put the Ubuntu CD that you installed Ubuntu with in the CD drive.
  • Download this to the desktop (the Firefox default, so if you haven't changed it, that's where it went/will go).

Note - you will have to register to get this file. Registration is free so please don't report a broken link.

  • In a terminal type
cd ~/Desktop (or wherever you downloaded the file)
tar -xf bcm4318*.tar.gz
sudo ./ndiswrapper_setup

Your wireless chipset should now work. Try rebooting if you have problems. Please see this thread if you have problems: http://ubuntuforums.org/showthread.php?t=197102&highlight=install+ndiswrapper

Edit : The above guide did not work for me (Pete) on 64 bit ubuntu. My lspci output read:

03:02.0 Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller (rev 03)

However I found a much easier way to install the drivers, this will probably work on 32 bit as well (someone please confirm).

Edit: I (Dun) confirm this. In my Feisty it worked but when I tested the same method in Edgy it did not work as in Feisty.

Code in terminal :

sudo apt-get install bcm43xx-fwcutter

fwcutter asks if you would like it to extract the firmware as part of the setup. Say yes. After this type:

sudo modprobe bcm43xx

Unplug you Wired connection, wait 30-60 seconds and then enjoy wireless using network manager by the clock.

Poznámka: I (mobius) found the fwcutter method to work well, except at a very limited speed (100kb/s max, as opposed to the 6.75mb/s max in a G network). Ndiswrapper is a bit less reliable, but gives much greater speeds at the moment.

Anouther edit by pete: Sorry Someone just let me know that this method no longer works as the link http://boredklink.googlepages.com/wl_apsta.o no longer exists. Sorry I didnt realise this sooner for those of you without wireless for the past month. Do this instead for now:

Add the repositories listed here : http://ubuntu.cafuego.net/dists/feisty-cafuego/bcm43xx/ to the top of your sources.list file.

Type:

sudo apt-get install bcm43xx-firmware 

Thats it! Reboot and enjoy. You dont need to install bcm43xx-fwcutter.

Pete

How to enable WPA with Ndiswrapper driver

Make sure on your own that the Ndiswrapper driver works by itself without encryption.

  • Create a file called /etc/wpa_supplicant.conf, and paste in the following. Modify the ssid and psk values.
ctrl_interface=/var/run/wpa_supplicant
network={
ssid="YourWiFiSSID"
psk="YourWiFiPassword"
key_mgmt=WPA-PSK
proto=WPA
pairwise=TKIP
}


  • Run the following code to test it and make sure your router is broadcasting its SSID.
sudo wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -dd

(If your wireless interface is not named "wlan0", replace "-iwlan0" with "-i[name-of-your-wireless-interface]". E.g. "-ieth1")


  • If your WPA works, change your configuration file so Ubuntu automatically connects you to your network. Run:
gksudo gedit /etc/network/interfaces

In the editor, change your wlan0 (or whatever your wireless interface is) section to the following:

If you are using static IP:

auto wlan0
iface wlan0 inet static
address 192.168.1.20
netmask 255.255.255.0
gateway 192.168.1.1
pre-up wpa_supplicant -Bw -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant

or this, if you are using dhcp.

auto wlan0
iface wlan0 inet dhcp
pre-up wpa_supplicant -Bw -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant


  • Reload your network configuration:
sudo /etc/init.d/networking restart

Alternately, you can follow the instructions in /usr/share/doc/wpasupplicant/README.modes.gz to configure roaming WPA authentication.

Jak nainstalovat Modem Driver (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

Using mobile phone/GPRS/EDGE as Internet modem

"GPRS Easy Connect" (GPRSEC) is a free program for Linux which configures and manages Internet connection via mobile phones. GPRSEC supports COM, USB, IrDA and Bluetooth connections on GPRS, EDGE and UMTS technologies.

Palm

Jak nastavit PalmOS Devices

First, if you are syncing via USB, try changing "/dev/pilot" to "usb:" in your sync software. This works with JPilot with a variety of PalmOS Devices. If that doesn't work, follow the instructions below.

gksudo gedit /etc/udev/rules.d/10-custom.rules
  • Insert the following line into the new file
BUS="usb", SYSFS{product}="Palm Handheld*", KERNEL="ttyUSB*", NAME{ignore_remove}="pilot", MODE="666"
  • Uložte editovaný soubor
  • Add the pilot-applet to the Taskbar by Right-Clicking on an empty spot
  • Follow the instructions on screen

Hard Drive

The Disk utility was removed from GNOME. To manipulate the hard drive partitions, you can use one or both utilities: Gparted (GNOME Partition Manager) and/or Pysdm. Gparted is also available as a Live CD. Any manipulation of the partitions of your hard drive risks data loss. Be careful.

  • To install Gparted:
sudo apt-get install gparted
  • To run Gparted
Systém --> Správa --> GNOME Partition Editor
  • To install Pysdm
sudo apt-get install pysdm
  • To run pysdm:
sudo pysdm 

How to list partition tables

sudo fdisk -l

How to list filesystem disk space usage

df -Th

How to list mounted devices

mount

How to remount /etc/fstab without rebooting

mount -a

How to spin down a hard drive

  • For an ide drive (assuming the hard drive is at hda)
hdparm -y /dev/hda
  • For an sata or scsi drive (assuming the hard drive is at sda)
sudo apt-get install sdparm
sdparm --command=stop /dev/sda

How to use Logical Volume Manager (LVM2)

The Logical Volume Manager allows a logical drive distributed over different physical media, such as hard drives, USB drives, etc. It allows expandability of storage without the need to rename the drive. It is installed as part of the kernel. However, to use it, free space on a hard drive must be partitioned for use as a LVM device. Either one of the 4 primary partitions on your hard drive must be free to use for LVM, or a logical partition contiguous to other logical partitions must be available for LVM use.

  • Using Partman as the partition manager that is included as part of the Ubuntu installation package (i.e. the Live CD), create an LVM-formatted partition in unused free space on your hard drive. To do this, you must pretend to be installing to the hard drive, and complete all the steps until partitioning. After writing the partition changes, abort the installation to prevent installing a new system over your old one (unless this is a new install for you.)
  • Create a Volume Group on the LVM partition, still using Partman on the Ubuntu Installation Live CD.
  • Create one or more logical drives in the Volume Group, still using Partman.
  • Write the partition changes to disk. (If you already have a system installed, abort the installation at this point.)
  • Restartujte your computer.

LVM2 (the Logical Volume Manager) is installed by default in Ubuntu Feisty. You can confirm this by searching Synaptic Package Manager for the packages lvm2 and lvm-common. If they are not installed, install them.

  • As root user, look in the /dev folder. Find the Volume Group you created with GParted. Make sure the permissions for the Volume Group folder are owner:root:read and write, group:root:access files, others:access files. You should see the logical volumes created previously by Gparted within that volume group folder.
  • Confirm and activate the Volume Group (substitute your volume group name for VolGroup00):
sudo modprobe dm-mod
sudo vgscan
sudo vgchange -ay VolGroup00
  • Confirm your logical volumes:
sudo lvs
  • Place the ext3 filesystem (or whichever filesystem you are using) on each logical volume (substitute each logical volume name for LogVol00):
sudo mkfs -t ext3 /dev/VolGroup00/LogVol00
  • Create a mount folder for each logical volume, with desired permissions (substitute your desired mount name for each logical volume for logdrv0).
sudo mkdir /media/logdrv0

Permissions should be owner:root:create and delete files, group:users:create and delete files, others:access. Make sure you have the users group created and with appropriate members.

  • Add entries to /etc/fstab so that the logical volumes are mounted each time at bootup.
sudo gedit /etc/fstab

Add a line for each logical volume:

/dev/VolGroup00/LogVol00 /media/logdrv0 ext3 defaults,rw,user 0 0
  • Remount all partitions (with configuration saved in fstab):
mount -a

Jak nainstalovat software RAID

RAID controls hard drive access when logical volume partitions are spread over two or more hard drives. A logical volume can span multiple drives, and therefore can be expanded by adding hard drives to your system. Although you can use RAID on a single hard drive, there is no advantage to doing so unless you anticipate expanding in the future. RAID is similar to LVM2 (discussed above).

There are RAID "levels" or schemes of storing data that allow for distribution of data across drives, and mirroring of data as a backup across drives, to protect against loss of data in the event of a single hard drive failure. See this discussion for more details. Again, a single hard drive user would not benefit from these levels.

Any hardware RAID controller on a hard drive can be used with the Linux RAID software manager, except for Windows-based "pseudo-RAID" drivers (such as WinModem).

RAID partitions under Ubuntu can be created with the Ubuntu Installation Live CD.

  • The Ubuntu installation Live CD is used. The Partman partition manager included on the Ubuntu Installation Live CD will be used to create the RAID partitions. Start installation with the "Install to the Hard Disk option." Go through the initial steps until you come to the partioning options.
  • When asked about disk partitioning, select "Manual"
  • Delete any undesired partitions. (Be careful if this is a multi-boot system!)
  • Select Free Space and create a 'partition' of Type = "physical disk for RAID".
  • It is recommended that your base system (root or /) remain on an ext3 partition. However, you may put a second boot system on a RAID partition, and you may put other mount points (e.g. /tmp and /home) on the RAID partitions.
  • If you are not installing a new system at this time, you may write the partition changes to disk and then abort the installation. Your previous system should remain intact (except for the partition changes, of course).
  • If you are installing a new system, you may continue as normal.

Install EVMS GUI for LVM2 and RAID

  • EVMS (Enterprise Volume Management System). This is an official Ubuntu package which manages your LVM and RAID logical drives from a menu. Install evms-gui from Synaptic Package Manager, or z příkazové řádky:
apt-get install evms-gui

Other GUIs for LVM2 and RAID

How to Increase ext3 and ReiserFS filesystems Performance

How to backup/mirror/synchronize directories using rsync

  • Poznámka: To merely update the files from one directory to another directory, use:
cp -u <source> <destination>

The -u or --update flag means to copy only when the SOURCE file is newer than the destination file or when the destination file is missing.

USB

How to list USB devices

lsusb

Workaround for random device disconnections

Random disconnection is a kernel bug that is not fixed yet. Some users report randomly disconnecting USB devices, especially external hard drives. One solution is to start the system with the option "irqpoll" in grub, but this doesn't work for everybody, and is believed to make the whole system slower. The other solution is to disable USB 2.0. This will result in way slower read/write, but the connection remains stable.

To disable USB 2.0, type this in the terminal:

sudo modprobe -r ehci_hcd

Test if the copy/write process is stable, and if you want to disable USB 2.0 upon boot, type:

sudo sh -c 'echo blacklist ehci_hcd --> /etc/modprobe.d/blacklist-ehci'
sudo update-initramfs -u -k `uname -r`

How to recover lost disk space

This error appears to be related to deleting files outside of Ubuntu, and has several Bug listings. If the free disk space on your USB drive is being reported as less than actual, try this:

Unmount the volume (if the device is a Sony PSP or other device where the USB port must be enabled, leave the port enabled)

sudo umount /media/disk

Run Dosfsck

sudo dosfsck -a /dev/sda1

Turn the device off then on again


How to Add Logitech USB audio device

The USB audio device can be easily added and set as default audio device using the following steps.

cat /proc/asound/modules

This displays the available audio devices. Please check if your USB audio device is listed in here. Assuming your in-built audio card is the default device (audio) . First check if the USB audio is working.

cat /bin/bash --> /dev/audio1

Then type the following command

sudo gedit /etc/asound.conf

Key in the following text into the opened blank file


pcm.!default {
type hw
card 1
} 
ctl.!default {
type hw
card 1
}

Save the file and restart the Alsa using the following command

sudo /etc/init.d/alsa-utils restart

Optical Drives

How to speed up CD/DVD-ROM

e.g. Assumed that /dev/cdrom is the location of CD/DVD-ROM
sudo hdparm -d1 /dev/cdrom
sudo cp /etc/hdparm.conf /etc/hdparm.conf_backup
gksudo gedit /etc/hdparm.conf
  • Na konec souboru přidejte tyto řádky
/dev/cdrom {
dma = on
}
  • Uložte editovaný soubor

How to mount/unmount CD/DVD-ROM manually, and show all hidden and associated files/folders

e.g. Assumed that /media/cdrom0/ is the location of CD/DVD-ROM
  • Pro připojení CD/DVD-ROM
sudo mount /media/cdrom0/ -o unhide
  • Pro odpojení CD/DVD-ROM
sudo umount /media/cdrom0/

How to forcefully unmount CD/DVD-ROM manually

e.g. Assumed that /media/cdrom0/ is the location of CD/DVD-ROM
sudo umount /media/cdrom0/ -l


Monitors / Displays

How to enable Large Widescreen Support

  • 24/23" widescreen monitors sometimes have issues running 1920x1200.
  • Examples include: Dell 2405, HP 2335 or an Apple Cinema Display.
gksudo gedit /etc/X11/xorg.conf
  • CAUTION: Feisty has something called Desktop Effects which can reconfigure your xorg.conf file automatically. If you manually edit the file, Desktop Effects may not work properly. (Always make a copy of the xorg.conf file before editing: cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak )
  • Add the following line to the appropriate "Monitor" section:
Modeline	"1920x1200" 154 1920 1968 2000 2080 1200 1203 1209 1235
  • For example the HP2335 should now look like:
Section "Monitor"
	Identifier	"hp L2335"
	Option		"DPMS"
	Modeline	"1920x1200" 154 1920 1968 2000 2080 1200 1203 1209 1235
EndSection

How to enable CRT output (external monitor/projector) for notebooks (Intel)

Poznámka: Valid for Intel® graphics controller-based products only

sudo apt-get install i810switch

Turn on CRT output

i810switch crt on

Turn off CRT output

i810switch crt off

Sound

How to make sound work with Intel Integrated Sound Cards

  • Edit the file /etc/modprobe.d/alsa-base:
gksudo gedit /etc/modprobe.d/alsa-base
  • Add the following line to the end of the file, replacing '3stack' with your flavor (see below)
options snd-hda-intel model=3stack

How to setup surround-sound speakers (5.1 and others) with ALSA

  • Edit the ~/.asoundrc file (create it if it doesn't exist):
gksudo gedit ~/.asoundrc
  • Enter the following section:
pcm.!default {
type plug
slave.pcm "surround51"
slave.channels 6
route_policy duplicate
}
  • This will play the surround output by duplicating the stereo output to all 6 channels (not only the front ones).

How to change the default soundcard

  • View available soundcards:
gksudo asoundconf list
  • You should get something like this:
Names of available sound cards:
Live
V8237
  • Set the default soundcard (use your desired soundcard in place of example_soundcard):
gksudo asoundconf set-default-card example_sndcard

How to setup PulseAudio Sound Server

PulseAudio, previously known as Polypaudio, is a proxy for your sound applications. It allows you to do advanced operations on your sound data, like transferring the audio to a different machine, changing the sample format or channel count and mixing several sounds into one. For more info: http://pulseaudio.org/

  • Nainstalujte:
sudo apt-get install "pulseaudio-*" paman padevchooser paprefs pavucontrol

Optionally, also install the GStreamer 0.10 plugin for PulseAudio:

sudo apt-get install gst-pulse
  • If you have Flash Player, install support for PulseAudio:
wget http://pulseaudio.vdbonline.net/libflashsupport/libflashsupport_1.0~2219-1_i386.deb
sudo dpkg -i libflashsupport_1.0~2219-1_i386.deb

Here is an alternative mirror for the package in case the link above dies:

libflashsupport_1.0-2219-1_i386.deb

  • Edit the ALSA configuration file:
sudo mv /etc/asound.conf /etc/asound.conf.backup
gksudo gedit /etc/asound.conf

Add this to asound.conf:

pcm.pulse {
type pulse
}
ctl.pulse {
type pulse
}
pcm.!default {
type pulse
} 
ctl.!default {
type pulse
}
  • Go to System->Preferences->Sounds and check “Enable Software Mixing”

Mixer screenshot

  • Go to Applications->Zvuk a video->PulseAudio Preferences (or in a terminal type):
paprefs

Set the following settings:

Settings screenshot

Make sure that Multicast/RTP is off or else you’ll have problems with skipping and latency. Reboot or in a terminal type:

pulseaudio
  • Go to Applications->Zvuk a video->PulseAudio Device Chooser if you have more than one PC with this setup. You’ll be able to choose which computer to send the audio to.
  • Add everyone to the pulse-access group:
System->Administration->Users and Groups->Manage Groups
pulse-access->Properties

Check everyone in the list. Otherwise, you’ll get weird “no-sound” errors and lockups.

Users screenshot

  • To control the volume:
Applications->Zvuk a video->PulseAudio Volume Control

Volume screenshot

  • Final Notes

PulseAudio still has some bugs. Skype doesn't work well with PulseAudio (it's better to killall pulseaudio before trying to make a Skype call, although I did get it working through OSS and padsp).

  • More info:

The Perfect Setup Revolution Linux wiki http://blog.paulbetts.org

Printers

Which default printer drivers are provided in Ubuntu Linux?

How to add a printer

Hewlett Packard (HP) Printers / Scanners / Copiers

Brother Printers / Scanners / Copiers

  • Brother provides Linux drivers for both lpr and CUPS their printer and MFC models. Debian/Ubuntu installation packages are provided. They provide fax, scanning, and printing functions for local use as well as network use. See their Linux driver website at http://solutions.brother.com/linux/en_us/index.html.

Misc

How to list PCI devices

lspci


Jak nainstalovat a Wacom tablet

For a detailed guide with screenshots about Jak nastavit 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.

  • 1. Using Synaptic package manager, 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 :
gksudo 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.


How to fix strange mouse behavior when using a KVM switch

Some 2-way KVM switches with PS/2 connectors (Keyboard-Video-Mouse switches which allow sharing of these peripherals between different machines) do not function properly. The mouse may jump around on the screen and randomly activate functions.

When the KVM switch is activated, power is briefly lost to the mouse. This resets the kernel's mouse driver (psmouse) to 'basic (base)' mode even if it had been set to 'advanced' mode previously (imps or exps protocols).

  • Check whether your psmouse kernel driver supports the options needed:
modinfo psmouse
  • Look for the line:
parm: resetafter:Reset(...)

The resetafter parameter tells the mouse driver how many bad packets are accepted before the mouse is told again which protocol to use. In this case you want to change from the default (= never) behavior.

  • Edit the /etc/modprobe.d/options file:
gksudo gedit /etc/modprobe.d/options
  • Add:
options psmouse resetafter=1
  • Restartujte the mousedriver:
sudo modprobe -r psmouse
sudo modprobe psmouse


CD/DVD Burning

How to blank CD-RW/DVD-RW

e.g. Assumed that /dev/cdrom is the location of CD/DVD-ROM
sudo umount /dev/cdrom
cdrecord dev=/dev/cdrom blank=fast

How to burn files/folders into CD/DVD

Places --> CD/DVD Creator
  • Drag files/folders into window
File Menu --> Write to Disc... --> Write

How to burn Image (ISO) files into CD/DVD

Right click on Image (ISO) file --> Write to Disc... --> Write

How to duplicate CD/DVD

How to create Image (ISO) files from CD/DVD

e.g. Assumed that /dev/cdrom is the location of CD/DVD-ROM
sudo umount /dev/cdrom
readcd dev=/dev/cdrom f=file.iso
You can also use embedded Linux command
dd if=/dev/cdrom of=file.iso

How to create Image (ISO) files from folders

mkisofs -r -o file.iso /location_of_folder/

How to generate MD5 checksum files

md5sum file.iso --> file.iso.md5

How to check MD5 checksum of files

e.g. Assumed that file.iso and file.iso.md5 are in the same folder
md5sum -c file.iso.md5

How to mount/unmount Image (ISO) files without burning

sudo mkdir /media/iso
sudo modprobe loop
sudo mount file.iso /media/iso/ -t iso9660 -o loop
  • Pro odpojení Image (ISO) file
sudo umount /media/iso/
  • If you want to mount/unmount your ISO image directly right-clicking on it, you can do this from your home dir:
cd .gnome2/nautilus-scripts/
gksudo gedit Mount 

Copy this script into Mount file

#!/bin/bash 
# 
for I in "$*" 
do 
foo=`gksudo -u root -k -m "Enter your password for root terminal access" /bin/echo "got r00t?"` 
sudo mkdir /media/"$I" 
sudo mount -o loop -t iso9660 "$I" /media/"$I" && nautilus /media/"$I" --no-desktop 
done 
done 
exit0

Save and close, than do the same with unmount file:

gedit Unmount

Copy these script into Unmount file

#!/bin/bash 
# 
for I in "$*" 
do 
foo=`gksudo -u root -k -m "Enter your password for root terminal access" /bin/echo "got r00t?"` 
sudo umount "$I" && zenity --info --text "Successfully unmounted /media/$I/" && sudo rmdir "/media/$I/" 
done 
done 
exit0

Make them executable with:

chmod +x Mount
chmod +x Unmount
  • Or a graphical tool type in terminal:
sudo apt-get install gisomount 

to run type in terminal:

sudo gisomount

How to set/change the burn speed for CD/DVD Burner

  • Přečtěte si #Základní poznámky
  • Aplikace --> Systémové nástroje --> Configuration Editor
  • Configuration Editor
/ --> apps --> nautilus-cd-burner --> default_speed (set/change the burn speed)

How to enable burnproof for CD/DVD Burner

  • Přečtěte si #Základní poznámky
  • Aplikace --> Systémové nástroje --> Configuration Editor
  • Configuration Editor
/ --> apps --> nautilus-cd-burner --> burnproof (Checked)

How to enable overburn for CD/DVD Burner

  • Přečtěte si #Základní poznámky
  • Aplikace --> Systémové nástroje --> Configuration Editor
  • Configuration Editor
/ --> apps --> nautilus-cd-burner --> overburn (Checked)

Jak nainstalovat K3b (CD/DVD burning software)

sudo aptitude install k3b
Jak nainstalovat MP3 support for K3b
sudo aptitude install libk3b2-mp3


How to Burn .img DVD Images

First, Install the udftools package:

sudo apt-get install udftools


Here is the command-line method to burning .img images to a dvd:

growisofs -Z /dev/dvd=full_path_to_mydvd.img


Networking


How to activate/deactivate síťová připojení

Connections Tab --> Select "Ethernet connection" --> Activate/Deactivate

Poznámka: in Feisty, the network names have changed. Instead of "Ethernet connection", you may have "Wireless connection", "Wired connection" and "Modem connection". Also, they don't have an Activate/Deactivate option. Instead, go to "Properties", and activate or deactivate from there.

Jak nastavit síťová připojení

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

Jak nastavit dialup connections

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

Jak nastavit broadband connections

sudo pppoeconf

How to change computer name

General Tab --> Host Settings --> Hostname: Specify the computer name 
  • Save and close all opened applications, Reboot computer

Alternatively

gksudo gedit /etc/hostname

Change your hostname Also take a look at /etc/hosts. And change your old name to your new one too.

How to change computer descriptions

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
gksudo gedit /etc/samba/smb.conf
  • Nalezněte tento řádek
...
server string = %h server (Samba, Ubuntu)
...
  • Replace with the following line
server string = new_computer_descriptions
  • Uložte editovaný soubor
sudo testparm
sudo /etc/init.d/samba restart

How to change computer Domain/Workgroup

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
gksudo gedit /etc/samba/smb.conf
  • Nalezněte tento řádek
...
workgroup = MSHOME
...
  • Replace with the following line
workgroup = new_domain_or_workgroup
  • Uložte editovaný soubor
sudo testparm
sudo /etc/init.d/samba restart

How to use dynamic IP addressing for your host using the free DynDNS service

Maintain Dynamic IP address with IPcheck utility
sudo apt-get install ipcheck
gksudo gedit /etc/ppp/ip-up.d/dyndns_update
  • Insert the following lines into the new file, replacing "myusername" and "mypassword" with your unique username and password.
 #!/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
  • Uložte editovaný soubor
sudo chmod 700 /etc/ppp/ip-up.d/dyndns_update
sudo sh /etc/ppp/ip-up.d/dyndns_update
Maintain Dynamic IP address with ddclient utility
  • Nainstalujte ddclient from Synaptic Package manager or z příkazové řádky:
sudo apt-get install ddclient
  • Edit the ddclient configuration file:
sudo gedit /etc/ddclient.conf
  • Place the following in the file:
protocol=dyndns2
use=web, web=checkip.dyndns.org
server=members.dyndns.org
#
login=my_dyndns_id # (Use the Account Login username you set up at DynDNS)
password='my_dyndns_password' # (Use the Account Login user password you set up at DynDNS)
# (include the quotation marks)
foobar1.dyndns.org # (Use the URL you selected at DynDNS)
# foobar2.dyndns.org # (Use the second URL you selected, if any)
# foobat3.dyndns.org # (Use the third URL you selected, if any)
# fooball4.dyndns.biz # (Use the fourth URL you selected, if any)
# toaster5.homelinux.org # (Use the fifth URL you selected, if any)
  • Restartujte ddclient:
sudo /etc/init.d/ddclient restart

How to share folders the easy way

Klikněte pravým tlačítkem myši on folder --> Share folder
Shared folder --> Share with: Select "SMB"
Share properties --> Name: Specify the share name

How to browse network computers

Places --> Síť Servers

How to access network folders without mounting

  • In this example:
Network computer's IP: 192.168.0.2
Shared folder's name: linux
  • Press 'Alt+F2' (Run Application...) and enter:
smb://192.168.0.2/linux

How to mount/unmount network folders manually, and allow all users to read

  • In this example:
Network computer's IP: 192.168.0.2
Network computer's Username: myusername
Network computer's Password: mypassword
Shared folder's name: linux
Local mount folder: /media/sharename
  • Pro připojení network folder:
sudo mkdir /media/sharename
sudo mount //192.168.0.2/linux /media/sharename/ -o username=myusername,password=mypassword
  • Pro odpojení network folder:
sudo umount /media/sharename/

How to mount/unmount network folders manually, and allow all users to read/write

  • In this example:
Network computer's IP: 192.168.0.2
Network computer's Username: myusername
Network computer's Password: mypassword
Shared folder's name: linux
Local mount folder: /media/sharename
  • Pro připojení network folder:
sudo mkdir /media/sharename
sudo mount //192.168.0.2/linux /media/sharename/ -o username=myusername,password=mypassword,dmask=777,fmask=777
  • Pro odpojení network folder:
sudo umount /media/sharename/

How to mount network folders on boot-up, and allow all users to read

apt-get install smbfs
  • In this example:
Network computer's IP: 192.168.0.2
Network computer's Username: myusername
Network computer's Password: mypassword
Shared folder's name: linux
Local mount folder: /media/sharename
sudo mkdir /media/sharename
gksudo gedit /root/.smbcredentials
  • Insert the following lines into the new file:
username=myusername
password=mypassword 
  • Change the privileges of the saved file:
sudo chmod 700 /root/.smbcredentials
  • Copy a backup of the fstab file then edit the fstab file with the mounting options:
sudo cp /etc/fstab /etc/fstab_backup
gksudo gedit /etc/fstab
  • Append the following line at the end of file:
//192.168.0.2/linux /media/sharename smbfs credentials=/root/.smbcredentials 0 0

How to mount network folders on boot-up, and allow all users to read/write

  • In this example:
Network computer's IP: 192.168.0.2
Network computer's Username: myusername
Network computer's Password: mypassword
Shared folder's name: linux
Local mount folder: /media/sharename
sudo mkdir /media/sharename
gksudo gedit /root/.smbcredentials
  • Insert the following lines into the new file:
username=myusername
password=mypassword
  • Change the rpivileges of the .smbcredentials file:
sudo chmod 700 /root/.smbcredentials
  • Make a backup copy and then edit the fstab file (which has the mounting options):
sudo cp /etc/fstab /etc/fstab_backup
gksudo gedit /etc/fstab
  • Append the following line at the end of file:
//192.168.0.2/linux /media/sharename smbfs credentials=/root/.smbcredentials,dmask=777,fmask=777 0 0

How to get ipw2200 and WPA to work

Under Feisty, WPA works right out of the box with network manager.

How to get ipw3945 and wep/wpa to work

Under Feisty, the driver for Intels ipw3945 is loaded by default, no configuration is needed.

How to get Broadcom BCM4318 wireless card to work

Install the driver::

sudo apt-get install BCM43xx-fwcutter

Jak nastavit and start PPTP tunnels (VPN)

You can use NetworkManager which comes with Feisty.

  • Configure VPN with Network Manager

In a terminal

sudo apt-get install network-manager-pptp

Restart after install.

To setup a VPN:

NetworkManager Icon in the tray --> VPN Connections->Configure VPN

Use the defaults and be sure to check the box:

Authentication: Refuse EAP

To get my connection to work I also had to check:

Compression & encryption: Require MPPE Encryption

Alternative programs:

OR
  • Nainstalujte manually
wget -c http://linux.edu.lv/uploads/content/pptp.tar.gz
tar zxvf pptp.tar.gz
cd ./pptp/
sudo sh install
cd ..
  • Configure a PPTP Client:
gksudo 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 an icon appears in the menu.
  • Start the client:
Aplikace --> Internet --> PPTP Client

How to setup a PGP key with Seahorse and Evolution

  • Install:
apt-get install seahorse
Aplikace --> Accessories --> Passwords and Encryption Keys
Key --> Create New Key
  • Select "PGP Key", then fill out information. Ensure that you use your real email address.
  • Klikněte pravým tlačítkem myši on the key entry to export, sync or publish your key.
  • Evolution should now hopefully see the key transparently.

How to Setup BIND DNS Server

  • The BIND DNS Server is installed as a meta-package in Feisty.
Systém --> Správa --> Správce balíků Synaptic --> Mark packages by task --> DNS server

This will install all dependencies and configuration files.

  • Alternatively, you can install z příkazové řádky (see this reference):
sudo apt-get install bind9
  • Configure the main Bind files. Usually, if you install Bind from the source code, you will have to edit the file named.conf. However, Ubuntu provides you with a pre-configured Bind, so we will edit another file:
gksudo gedit /etc/bind/named.conf.local

A zone is a domain name that is referenced in the DNS server. Insert the zones in the named.conf.local file:

# This is the zone definition. replace example.com with your domain name
zone "example.com" {
 type master;
 file "/etc/bind/zones/example.com.db";
};
# This is the zone definition for reverse DNS. replace 0.168.192 with your 
# network address in reverse notation - e.g my network address is 192.168.0
zone "0.168.192.in-addr.arpa" {
 type master;
 file "/etc/bind/zones/rev.0.168.192.in-addr.arpa";
};
  • Ok, now, let's edit the options file:
sudo -e /etc/bind/named.conf.options
  • We need to modify the forwarder. This is the DNS server to which your own DNS will forward the requests he cannot process.
forwarders {
 # Replace the address below with the address of your provider's DNS server
 123.123.123.123;
};
  • Now, let's add the zone definition files (replace example.com with your domain name):
sudo mkdir /etc/bind/zones
sudo -e /etc/bind/zones/example.com.db
  • The zone definition file is where we will put all the addresses / machine names that our DNS server will know. You can take the following example:
// replace example.com with your domain name. do not forget the . after the domain name!
// Also, replace ns1 with the name of your DNS server
example.com. IN SOA ns1.example.com. admin.example.com. (
// Do not modify the following lines!
       2006081401
       28800
       3600
       604800
       38400
 )
// Replace the following line as necessary:
// ns1 = DNS Server name
// mta = mail server name
// example.com = domain name
example.com. IN NS  ns1.example.com.
example.com. IN MX 10 mta.example.com.
// Replace the IP address with the right IP addresses.
www  IN A 192.168.0.2
mta  IN A 192.168.0.3
ns1  IN A 192.168.0.4
  • Create the reverse DNS zone file:
sudo -e /etc/bind/zones/rev.0.168.192.in-addr.arpa
  • Copy and paste the following text, modify as needed:
//replace example.com with yoour domain name, ns1 with your DNS server name.
// The number before IN PTR example.com is the machine address of the DNS server. in my case, it's 4, as my IP address is 192.168.0.4.
@ IN SOA ns1.example.com. admin.example.com. (
   2006081401;
   28800; 
   604800;
   604800;
   86400 
)
   IN NS ns1.example.com.
4   IN PTR example.com
  • Restartujte bind:
sudo /etc/init.d/bind9 restart
  • Test the new DNS server...
  • Modify the file resolv.conf with the following settings:
sudo -e /etc/resolv.conf
  • Enter the following:
// replace example.com with your domain name, and 192.168.0.4 with the address of your new DNS server.
search example.com
nameserver 192.168.0.4
  • Test your DNS:
dig example.com

Connect to Internet using mobile phone/GPRS/EDGE

How to set up internet connection sharing

How to resolve Netbios hostnames

sudo gedit /etc/nsswitch.conf
  • Nalezněte tento řádek
hosts:  files dns
  • Replace with the following line
hosts:  files dns wins
  • Uložte editovaný soubor
sudo apt-get install winbind


Remote Access

Poznámka: By themselves, neither XDMCP nor Remote Desktop sharing (VNC) are secure methods of sharing. Both send unencrypted data. They are recommended only for use within your firewall-protected LAN, or coupled with secure tunnels such as SSH or VPN.

Remote Login via XDMCP

What is XDMCP?
  • GNOME (like other display managers) supports multiple simultaneous users. XDMCP is a thin client that allows multiple remote GNOME (and other display manager) users to log into a host machine, even if a local user is signed in there. There is no screen sharing with the local user; each login has their own session. (This is in contrast to VNCviewer (Remote Desktop), which merely duplicates the host screen for display on the remote client and provides screen sharing capabilities with the remote computer.)

The thin client features of XDMCP allows users on the LAN to login to a host to use CPU-intensive applications on a host server.

  • XDMCP uses UDP port 177 and TCP port 6000. You should make sure that your router does not allow these ports to be accessed from the Internet, or your system will be potentially accessible from the Internet. If you have Firestarter installed as a local firewall, make sure that you open the ports for your LAN only by specifying incoming/outgoing traffic on these ports for your LAN:

192.168.0.1/24 (if your LAN is on 192.168.0.1-192.168.0.254, for example).

You are strongly urged to learn how to use IPTables (or the Firestarter GUI which manages IPTables) before using XDMCP.

How to turn on the XDMCP feature
  • To turn on the XDMCP feature on the host computer:
Systém --> Správa --> Přihlašovací okno --> 
Remote --> Style:Same as Local

Reboot.

How to login from another PC running Ubuntu
  • Poznámka: XDMCP is not encrypted and is not secure outside of a firewall-protected LAN. If you are attempting to use XDMCP over the Internet, it should be used with VPN secure tunneling. Unfortunately, UDP port forwarding is not available with SSH, so XDMCP cannot be used with SSH.

At the login screen:

Options --> Remote Login via XDMCP

Type in the host name or IP address (example: 192.168.0.2) of the remote computer.

Run an Ubuntu host from a Windows Client machine

  • Xming is a full X-client for the Windows platform, that allows a windows user to access applications on a Linux host. For full information, see the Xming website.

Remote Desktop Sharing/Duplication using VNC

Unlike the GNOME thin-client XDMCP, VNC (Remote Desktop) is merely a screen sharing solution. It allows a remote user to view and manipulate the desktop of a single user logged into the host computer. Combined with an SSH tunnel, however, it can allow secure remote access to the host computer's GNOME (or other GUI) desktop.

Jak nastavit a Remote Desktop host
  • Poznámka: By itself, Remote Desktop (VNC) hosting is not a secure method of sharing your desktop because communications are not encrypted. Simple password authentication is also used (which can be broken by simple hacking programs). It should therefore not be used outside of a firewall-protected LAN unless it is coupled with a secure SSH or VPN data tunnel.
  • Remote Desktop will only work if a user is currently logged in to GNOME
  • Leaving a computer with an unattended GNOME session is not secure. It is recommended to use Systém --> Lock Screen and switch off the monitor when the computer is left unattended.
  • Enable Remote Desktop (VNC):
Systém --> Volby --> 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 desktop or VNC host from a Ubuntu/Linux machine
  • In this example, the remote host computer has an IP address on the LAN of 192.168.0.2.
vncviewer -fullscreen 192.168.0.2

The -fullscreen option creates a fullscreen replica of the remote computer's screen on your screen. To run the viewer in a window, do not add this option.

  • To quit vncviewer
Press 'F8' --> Quit viewer
How to connect into a remote Ubuntu desktop host from a Windows machine
  • Přečtěte si #Základní poznámky
  • The remote Ubuntu host must have Remote Desktop configured (read #Jak nastavit a Remote Desktop host)
  • Poznámka: This method is not encrypted and should not be used outside of a LAN unless secured through an SSH (or VPN) tunnel. Opening a VNC server on port 5900 to the Internet is very risky.
  • Port 5900 should be opened for use within your LAN only. If more than one VNC/Remote Desktop session is to be used, you must open more ports (5901, 5902, etc.) In Firestarter, this can be done by selecting the appropriate ports (5900-5904, for example) and restricting this port range for incoming and outgoing usage to your LAN, 192.168.0.1/24 for example). See Wikipedia port forwarding and the Firestarter instructions.
  • Several VNC clients are available for Windows. Download and install one.
Tight VNC: http://www.tightvnc.com/ (Recommended. Best for low bandwidth solutions such as DSL or wireless.)
RealVNC: http://www.realvnc.com/products/personal/ (The original VNC. Also available in an enterprise edition.)
DotNetVNC: http://dotnetvnc.sourceforge.net/ (Requires the Microsoft DotNet framework.)
  • Run the VNC application. You can enter the IP address of your remote computer (192.168.0.2 in the example) in any of these formats:
192.168.0.2
192.168.0.2:0 (assuming this is the first connection. Use 192.168.0.2:1 for the second connection, and so on.)
192.168.0.2:5900 (assuming this is the first connection. Use 192.168.0.2:5901 for the second connection, and so on.)

If you wish to connect with VNC over the Internet, you must tunnel VNC through SSH (or VPN). Ubuntu has the OpenSSH server installed by default, but the service must be started. PuTTY is an SSH client for Windows that will connect to OpenSSH. Once an SSH tunnel is established, VNC can be run through the SSH tunnel port (and not port 5900) in an encrypted, secure fashion.

How to connect into a remote Ubuntu desktop host from OS X
  • Přečtěte si #Základní poznámky
  • Remote Ubuntu host machine must have Remote Desktop configured (read #Jak nastavit a Remote Desktop host)
  • Poznámka: This method is not encrypted and should not be used outside of a LAN unless secured through an SSH (or VPN) tunnel. Opening a VNC server on port 5900 to the Internet is very risky.
  • Port 5900 should be opened for use within your LAN only. If more than one VNC/Remote Desktop session is to be used, you must open more ports (5901, 5902, etc.) In Firestarter, this can be done by selecting the appropriate ports (5900-5904, for example) and restricting this port range for incoming and outgoing usage to your LAN, 192.168.0.1/24 for example). See Wikipedia port forwarding and the Firestarter instructions.
  • Stáhněte and install:

ChickenOfTheVNC: http://sourceforge.net/projects/cotvnc/

  • Run the VNC application. You can enter the IP address of your remote computer (192.168.0.2 in the example) in any of these formats:
192.168.0.2
192.168.0.2:0 (assuming this is the first connection. Use 192.168.0.2:1 for the second connection, and so on.)
192.168.0.2:5900 (assuming this is the first connection. Use 192.168.0.2:5901 for the second connection, and so on.)

If you wish to connect with VNC over the Internet, you must tunnel VNC through SSH (or VPN). Ubuntu has the OpenSSH server installed by default, but the service must be started. MacSSH is an SSH client for OS X that will connect to OpenSSH. Once an SSH tunnel is established, ChickenOfTheVNC can be run through the SSH tunnel port (and not port 5900) in an encrypted, secure fashion.

How to Run a Windows machine from Ubuntu securely using VNC
  • By itself, VNC is not a secure solution over the internet. SSH (or VPN) tunneling is recommended in combination with VNC. OpenSSH is the SSH hosting/tunneling package used for both Ubuntu and Windows. OpenSSH is installed by default in Ubuntu, but must be installed (with Cygwin) on a Windows machine.
  • To set up a secure SSH tunnel on a Windows machine, you should set up Cygwin (a mini-Linux installation for Windows) first, selecting OpenSSH under Cygwin as part of the installation process. Read Installing OpenSSH and Cygwin on Windows. Follow the instructions exactly.
  • Make sure you open the appropriate ports in IPTables (using Firestarter, for example) for SSH tunneling on your Ubuntu client. Also open the port in the Windows Firewall for your Windows host. Port 22 is the standard SSH port, but if you want extra security, you can change the SSH port (see the OpenSSH configuration instructions) to an alternate port number. Make sure the router on your host LAN forwards the chosen SSH port (e.g. 22) to the Windows host computer. For example, if your Windows SSH host on your LAN is at 192.168.0.71, your router must forward port 22 to 192.168.0.71. (If you have multiple SSH hosts on your LAN, each individual host can have its own dedicated SSH port to be forwarded by the router. Change the OpenSSH configuration file on each host to reflect the chosen dedicated alternate SSH port number.)
  • Přečtěte si #How to SSH into remote Ubuntu host. When you request an SSH tunnel from your remote Ubuntu client, you must SSH to the IP address of the router, not the host. If the router's IP address changes dynamically, you must set up Dynamic DNS addressing for the host LAN through a service such as DynDNS. You would then create the SSH tunnel to the DynDNS URL assigned to your LAN instead of to the actual IP address (which constantly changes with dynamic IP addressing).
  • Přečtěte si #Using SSH to Port Forward. Create a tunnel over SSH for port 5900 (the port that VNC uses by default) to either your host LAN's static IP or to the DynDNS URL you have set up. This will direct any calls to port 5900 from the remote Ubuntu client through the SSH tunnel, instead of sending them over the Internet directly over port 5900 (a risky proposition).
ssh -L <local port>:<remote computer>:<remote port> <user>@<remote ip>
In this example, port 5900 is used locally for VNC on both the host and client computers, but data is passed through the SSH tunnel (on port 22 by default). The user named foowho has an account on the host computer. The host is on a LAN that has dynamic IP addressing through the DynDNS service and has a URL foobar.dyndns.org. The router forwards port 22 to the host, where the TightVNC server is listening on remote port 5900.
ssh -L 5900:foobar.dyndns.org:5900 foowho 
In this example, port 5900 is again used by VNC on both sides of the tunnel. This time the host LAN has a static IP address of 94.97.2.18. The host OpenSSH is set to listen on port 11022 in the ssdh_config file. The TightVNC server is listening on remote port 5900.
ssh -L 5900:94.97.2.18:5900 foowho -p 11022
  • On your Ubuntu remote machine, VNC to 127.0.0.1, the loopback address.
vncviewer 127.0.0.1

VNCViewer will then (by default) look for local port 5900 in the loopback, on which the SSH tunnel is running from the previous step. The Ubuntu SSH client will now send the VNC connection data over port 22 (instead of over port 5900) to the Windows OpenSSH host server, which is listening on port 22 (unless you have changed it). The Windows OpenSSH server (in Cygwin) will then internally redirect port 5900 communications to the TightVNC server on your Windows host. By using this tunnel for all VNC/port 5900 communications, port 5900 on your router needs never be open to the Internet, since all port 5900 communications are handled only locally on each end, and sent over the internet through the tunnel. In fact, port 5900 ought to be remain closed on your router, to prevent non-secure VNC connection attempts from the Internet (by hackers/crackers).

  • Routine usage requires staring the SSH tunnel to your Windows host first, then starting the vnc client (vncviewer 127.0.0.1). You can write a simple two line script file to automate the process.


Windows

How to Mount Windows Partitions

How to Mount NTFS Partitions

Step By Step Guide How to Mount Windows Partitions in Feisty


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

  • In this example:
/dev/hda1 is the location of Windows partition (NTFS)
Local mount folder: /media/windows
  • Pro připojení a Windows partition:
sudo mkdir /media/windows
sudo mount /dev/hda1 /media/windows/ -t ntfs -o nls=utf8,umask=0222
  • Pro odpojení a Windows partition
sudo umount /media/windows/

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

  • In this example:
/dev/hda1 is the location of the Windows partition (FAT)
Local mount folder: /media/windows
  • Pro připojení a Windows partition
sudo mkdir /media/windows
sudo mount /dev/hda1 /media/windows/ -t vfat -o iocharset=utf8,umask=000
  • Pro odpojení a Windows partition
sudo umount /media/windows/

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

  • In this example:
/dev/hda1 is the location of the Windows partition (NTFS)
Local mount folder: /media/windows
sudo mkdir /media/windows
sudo cp /etc/fstab /etc/fstab_backup
gksudo 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

  • In this example:
/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
gksudo 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: The software you will use is still in Beta. You should not enable it on production machines

  • Aplikace --> Add/Remove --> search for 'NTFS', you should find NTFS Configuration Tool, install it.
  • Aplikace --> Systémové nástroje --> NTFS Configuration Tool --> Enable Write Support (depending on your device internal/external)


Security

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

  • Přečtěte si #Základní poznámky
  • 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
    • Not create a password with just a single or just a typical union of main languages (english, german, french, spanish...) dictionary words
  • 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
  • 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)
    • Přečtěte si #How to disable root user account
  • Nainstalujte a Firewall
  • Perform vulnerability test

How to disable all interactive editing control for GRUB menu

  • Run This:
grub-md5-crypt 
Password: 
Retype password: 
$1$tumnZ1$xB/shuXs7MlawZXkLiBDV/
  • Backup your current configuration file
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
gksudo gedit /boot/grub/menu.lst
  • Nalezněte tuto sekci
...
## 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$tumnZ1$xB/shuXs7MlawZXkLiBDV/
# password topsecret
...
  • Add the following line below it
password --md5 $1$tumnZ1$xB/shuXs7MlawZXkLiBDV/ (encrypted password above)
  • Nalezněte tuto sekci
...
## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false
...
  • Make the following change:
...
## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=true
...
  • Uložte editovaný soubor then run update-grub:
sudo update-grub

This will make it so your grub console will require a password to edit the lines, and the recovery modes won't work unless the password is typed. To access the other grub options at the menu, follow the instructions at the bottom of the screen. It will be something like pressing p and typing your password.

How to disable history listing in Console mode

rm -f .bash_history
gedit ~/.bash_profile
  • Add the following:
export HISTFILESIZE=4
unset HISTFILE
# Change this to a reasonable number of lines to save, I like to save only 100.
export HISTSIZE=1
# Ignores duplicate lines next to each other
export HISTCONTROL=ignoredups

This will disable Bash history for the user, retaining keystroke history and recall to use while limiting recall history to 100 lines. This will also not record duplicate lines next to each other.

How to disable recently used documents

  • To disable run this in your user directory. Example: /home/username/
sudo rm ~/.recently-used ~/.recently-used.xbel && mkdir ~/.recently-used.xbel

How to clear history listing in Console mode

history -c

This will just clear your current history.

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

sudo cp /etc/inittab /etc/inittab_backup
gksudo gedit /etc/inittab
  • Nalezněte tento řádek
...
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
...
  • Replace with the following line
#ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
  • Uložte editovaný soubor
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
gksudo gedit /etc/bash.bashrc
  • Na konec souboru přidejte tyto řádky
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
  • Uložte editovaný soubor

How to setup a LoJack system for your laptop

  • If your laptop is stolen and then subsequently connected to the Internet, you will be able to find out from which IP address it connects to the Internet, by this method.
  • The hostname (yourhostname.dyndns.org in the example) that you registered with your dynamic IP service (i.e. DynDNS) should be updated whenever someone runs your computer, stolen or not. You can find out from which IP address the computer was last run by using the ping command:
ping yourhostname.dyndns.org
  • You can then look up the IP address with a reverse IP service and at least get an idea in what city your laptop is in. Of course, if the IP address resolves to one of a large bank of addresses used by an ISP provider, such as AT&T, you may not be helped much by this method.

How to get advanced protection against buffer overflows with grsecurity

  • You can get advanced protection against buffer overflows by using a PaX/grsecurity enabled kernel. You can get a precompiled version for Ubuntu at kernelsec

How to add Access Control Lists (ACLs)

  • You can obtain finer control of permissions over files and folders similar to NTFS in Windows by installing acl. Additionally, Eiciel will add an Access Control List tab to file and folder properties in Nautilus. Original instructions were found here. See the serfacl command manual for information on setting ACLs from the console.
sudo apt-get install acl
  • After installing, modify your /etc/fstab to add the "acl" option to each device/partition you want to have ACL functionality. It should look like something similar to this:
# /dev/hda3
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx / ext3 defaults,acl,errors=remount-ro 0 1
# /dev/hda4
UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /home ext3 defaults,acl 0 2
...
  • Remount the file system(s) ACL will be enabled on:
sudo mount / -o remount
sudo mount /home -o remount
...
  • Install Eiciel:
sudo apt-get install eiciel
nautilus -q

Firewall

Ubuntu has a built-in firewall system called IPtables (netfilter) that is enabled by default. At installation all ports are open and there is effectively no filtering/protection. To close the ports and leave only the ones you want open, you must either manually edit the iptables or use a GUI (such as Firestarter). Once you edit the iptables configuration, your computer will be better protected from attacks from the Internet.

Manually configuring IPtables
man iptables
Jak nainstalovat IPtables Firewall Configuration GUI (Firestarter)
  • Přečtěte si #Základní poznámky
  • Firetarter is a GNOME GUI. For KDE (Kubuntu) users, try fwbuilder, guarddog, guidedog, kmyfirewall, or knetfilter.
  • You are strongly recommended to learn and use Firestarter for managing iptables/netfilter. For more information: http://www.fs-security.com/

Firestarter is the easiest GUI to change the IPtables and alter the firewall functions. Firestarter itself does not perform these firewall functions. It is only a method for changing your IPtables firewall settings. When Firestarter is installed from the package, it integrates with iptables, which runs in the background as a system service. After running Firestarter's initial setup wizard, your iptables will be changed and most ports closed. Firestarter then needs to be run only when you wish to change settings.

Systém --> Správa --> Správce balíků Synaptic --> Search --> firestarter --> Mark for Installation

or (from command-line terminal):

sudo apt-get install firestarter
  • Run Firestarter:
Systém --> Správa --> Firestarter
How to minimize Firestarter to a panel icon when closed
Systém --> Správa --> Firestarter --> Preferences --> Enable tray icon
How to make the Firestarter GUI start automatically at startup
  • Poznámka: Once you have setup the iptables firewall the first time using Firestarter, you do not need to have Firestarter running to be protected by the IPtables firewall (which is then always enabled in Ubuntu). Firestarter is only the GUI for changing the settings of the firewall; it only needs to be started when doing so. The following step is therefore unnecessary for most users.
Systém --> Volby --> Sessions --> Startup Programs --> New
Name: Firestarter --start-hidden
How to have Firestarter start without the root password
  • Přečtěte si #Security
  • Warning: This is NOT secure. It is unnecessary for most users.
  • The original instructions can be found at the Firestarter FAQ website.
  • Edit the configuration file:
sudo gedit /etc/sudoers

Poznámka: You can also edit the sudoers file using:

export EDITOR=gedit
sudo visudo
  • In the Defaults section of the file, comment out this line with a with a hashmark (#) at the beginning of the line (optional):
#Defaults !lecture,tty_tickets,!fqdn

Add this line right after it (optional):

Defaults !lecture,tty_tickets,!fqdn,env_reset,env_keep+="DISPLAY HOME XAUTHORIZATION"
  • At the bottom of the file add the line:
your_user_name ALL= NOPASSWD: /usr/sbin/firestarter

Replace 'your_user_name' with your actual username.

  • Reboot.

Using Shorewall to manage iptables

Shorewall is an alternative to Firestarter. It allows more options to be set, but is more difficult to use. It can be administered from a GUI using Webmin.

Anti-virus

ClamAV AntiVirus Server

  • Although viruses and spyware are less common in Linux systems, they do exist. Furthermore, many users share files with Windows users, either on their own computer or on LANs. ClamAV is useful for checking these files.
  • Nainstalujte ClamAV AntiVirus Server:
sudo apt-get install clamav 

If you get errors, try running the command again

How to update virus definitions
  • Virus definition updates are provided by the clamav-freshclam module, which is installed as part of clamav.
  • Run freshclam manually:
sudo freshclam
Jak nainstalovat ClamAV automatic updater daemon
  • The clamav daemon will run freshclam automatically to keep definitions up-to-date. It will also run e-mail server checking modules for e-mail attachments.
sudo apt-get install clamav-daemon
How to scan files or folders
sudo clamscan -r /location_of_files_or_folders
Jak nainstalovat ClamTk GUI frontend for ClamAV
sudo apt-get install clamtk

ClamTk can be accessed from the Menu: Aplikace --> Accessories --> Virus Scanner

  • Poznámka: As of August 1, 2007, the Ubuntu repository version of ClamTk is 0.31, which has a bug that does not allow it to run. Obtain and install the current version of ClamTk 0.99, which functions fine in Ubuntu Feisty:
wget -c http://downloads.sourceforge.net/clamtk/clamtk_2.99-1_all.deb
sudo dpkg -i clamtk_2.99-1_all.deb
How to automatically scan files/folders for viruses
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
  • Uložte editovaný soubor


Boot Menu

How to gain root user access without login

  • Přečtěte si #Základní poznámky
  • 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

  • Přečtěte si #Základní poznámky
  • 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

  • Přečtěte si #Základní poznámky
  • 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
gksudo gedit /boot/grub/menu.lst
  • Nalezněte tento řádek
...
password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
...
  • Replace with the following line
password --md5 $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (encrypted password above)
  • Uložte editovaný soubor

How to restore GRUB menu after Windows installation

Super Grub Disk
Grub

If you have booted your linux distro with Super Grub Disk, or a live CD and want to restore your grub, follow the below instructions:

  • As root (or with sudo), type grub
  • When at the grub prompt, type find /boot/grub/stage2
  • This will return something like (hd0,2)
  • To setup the boot partition boot type root (hd0,2). This is the harddrive and the partition your linux is installed on...
  • And then to configure grub type setup (hd0)
  • Now you're done, so exit with quit

How to identify the name of the boot drive (hd0, hd1, hd2, etc)

Press "c" on boot menu. If you don't see a boot menu, press ESC key first when booting to show the boot menu.

Type:

root (hd0,0)

Most likely you will get "(hd0,0) ext2fs", which should be your current Linux drive. Now change hd0 to hd1 to see what is there.

root (hd1,0)

If you get "(hd1,0) filesystem type unknown, partition type 0x7", then hd1 is a Windows drive.

Now change hd1 to hd2, keep going until you reach hd7.

OR

In a terminal you can type:

cat /boot/grub/device.map

You will get something like this:


(hd0) /dev/hda
(hd1) /dev/sda

This represents that grub recognizes your IDE drive and assigned it the value hd0; and also your SATA drive and assigned it the value hd1.

  • Note that grub assigns ALL hard disks, be they IDE or SATA, by hd* where * is a number.

This is useful if you are editing your /boot/grub/menu.lst from a terminal in Ubuntu and need to know what grub is seeing.

Use

sudo fdisk -l

to find which drives are bootable

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
gksudo gedit /boot/grub/menu.lst
  • Na konec souboru přidejte tyto řádky
title		Microsoft Windows
rootnoverify	(hd0,0)
savedefault
makeactive
chainloader	+1
  • Uložte editovaný soubor

How to boot into Windows installed on a seperate SATA drive

This configuration applies to people who have Linux installed on a IDE drive, and Windows installed on a seperate SATA. The IDE drive boots first, so we need to add an entry to the boot menu on the Linux disk. Here we assume the name of your Windows drive is hd1. If you are not sure, click the link above to find out.

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
gksudo gedit /boot/grub/menu.lst
  • Na konec souboru přidejte tyto řádky.
title  Windows XP on SATA drive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader (hd1,0)+1
  • Uložte editovaný soubor
  • Finally, do
sudo update-grub

This will update the grub bootloader and finalize any changes you made

How to hide GRUB menu on boot-up

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
sudo gedit /boot/grub/menu.lst
  • Nalezněte tento řádek
...
#hiddenmenu
...
  • Replace with the following line
hiddenmenu
  • Uložte editovaný soubor

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

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
gksudo gedit /boot/grub/menu.lst
  • Nalezněte tento řádek
...
timeout 10
...
  • Replace it with the following line, where X_seconds is a number representing the number of seconds before the menu should timeout.
timeout X_seconds
  • Uložte editovaný soubor

How to change default Operating System boot-up for GRUB menu

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
gksudo gedit /boot/grub/menu.lst
  • Nalezněte tento řádek
...
default 0
...
  • Replace with the following line, where X_sequence is a number representing the number of the Grub menu item you want to be the default operating system.
default X_sequence

To figure out which number corresponds to the desired operating system, scroll to the bottom of the menu.lst file in gedit and look for lines that begin with the word title. The first "title" is 0, the second is 1, etc. Count "title" entries to find the number of the desired operating system and enter that number in place of X_sequence in the line above.

  • Uložte editovaný soubor

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

wget -c http://easylinux.info/uploads/ubuntu.xpm.gz
chmod 644 ubuntu.xpm.gz
sudo cp ubuntu.xpm.gz /boot/grub/splash.xpm.gz
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
sudo update-grub

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
splash.xpm.gz is the Splash Image for GRUB menu
ImageMagick is installed
convert -resize 640x480 -colors 14 wallpaper.png splash.xpm && gzip splash.xpm
chmod 644 splash.xpm.gz
sudo cp splash.xpm.gz /boot/grub
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
sudo update-grub

How to display only one kernel on GRUB menu

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup-`date +%F`
gksudo gedit /boot/grub/menu.lst
  • Find this line
...
# howmany=all
...
  • Replace with the following line
# howmany=1

Where 1 means to keep the last kernel, 2 to keep the last 2 kernels, etc. Do not delete the # symbol. The menu will be updated once a new kernel will be updated by the system, not before.

  • Save the edited file
  • Update /boot/grub/menu.lst
sudo update-grub

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

OR


How to Boot Ubuntu from the Windows Bootloader

You may choose to have the Windows bootloader set as the default, and use that to boot into your Windows install or to load GRUB so you can boot into Ubuntu from there.

While in Ubuntu setup, at the very last prompt before the actual installation/copying process begins there will be a button labeled "Advanced" that presents you with an option to change the location of GRUB. The default is the MBR of the boot drive. You should change this to point to your Ubuntu partition instead. For instance, the second partition of the first hard-drive would be hd(0,1).

If you've already installed Ubuntu, you'll have to use grub-install to install GRUB to the bootsector of the Ubuntu partition.

There are two methods of adding Ubuntu to the Windows bootloader. The easiest method is if you are using Windows Vista, by using EasyBCD and simply pointing EasyBCD to the Ubuntu partition and asking it to create an entry there. Full instructions available at NeoSmart Technologies.

If you're using Windows XP, the process is slightly more involved and requires that you use the `dd` command to copy the first 512 bytes of the Ubuntu partition:

dd if=/dev/sda2 of=~/Desktop/Ubuntu.mbr bs=512 count=1

Then copy the resulting Ubuntu.mbr file to C:\ of your Windows drive, and add an entry

C:\Ubunutu.mbr Ubuntu

in the Windows' Boot.ini file.

How to temporarily skip boot-up services

Press 'Ctrl + C'

How to permanently disable/enable boot-up services


Tips And Tricks

How to enable lame for FFMPEG (needed to encode FLV with sound)

KINO FLVs silent? You need to recompile FFMPEG with LAME enabled. FFMPEG can be installed via apt-get as a package, but is not able encode MP3, which is the audio stream in FLV video (like Google & YouTube).

  • Ensure Ubuntu Universe repository is selected #Jak přidat extra repositáře
  • Stáhněte and install lame liblame-dev and gcc packages (mp3 encoder + GNU compiler collection)
sudo apt-get build-dep ffmpeg
sudo apt-get install liblame-dev libfaad2-dev libfaac-dev libxvidcore4-dev liba52-0.7.4 \
liba52-0.7.4-dev libx264-dev libdts-dev libgsm1-dev libvorbis-dev libdc1394-13-dev \
checkinstall build-essential gcc
  • Stáhněte and extract FFMPEG source to current working directory
cd /usr/local/src
sudo apt-get source ffmpeg
  • Compile FFMPEG from source
cd ffmpeg-*
sudo ./configure --enable-gpl --enable-pp --enable-vorbis --enable-libogg \
--enable-a52 --enable-dts --enable-dc1394 --enable-libgsm --disable-debug \
--enable-mp3lame --enable-faad --enable-faac --enable-xvid --enable-pthreads \
--enable-x264
maybe try instead = 
sudo ./configure --enable-gpl --enable-pp --enable-libvorbis --enable-libogg \
--enable-liba52 --enable-libdts --enable-dc1394 --enable-libgsm --disable-debug \ 
--enable-libmp3lame --enable-libfaad --enable-libfaac --enable-xvid --enable-pthreads \
--enable-x264
sudo make
sudo checkinstall [accept defaults, set version to 3:0.cvs20060823-3.1ubuntu2]

If during the make it dies at 'x264.c:147: error: `struct <anonymous>` has no member name `i_rf_constant` you need to do the following. Open libavcodec/x264.c and goto line 147. Change 'i_rf_constant' to 'f_rf_constant' and retry.

If an application you are using employs FFMPEG to encode FLV, it should now work properly. You can also call FFMPEG directly z příkazové řádky. The extension/suffix of the outfile tells FFMPEG which audio or video format to encode to.

ffmpeg [-i infile] [outfile]

How to enable smooth fonts

gedit ~/.fonts.conf
  • Paste in this text after the declaration <?xml version=”1.0” ?><!DOCTYPE fontconfig SYSTEM “fonts.dtd”>:
<fontconfig>
<match target=”font” >
<edit name=”autohint” mode=”assign” >
<bool>true</bool>
</edit>
</match>
</fontconfig>
  • You’ll have to log out and back in to see the difference.

Jak nainstalovat Tor to Surf Anonymously in Ubuntu Feisty with Firefox

If you want to Surf Anonymously in Ubuntu Feisty check this guide

Jak restartovat GNOME bez restartu počítače

If these instructions did not work, read #System requests (What to do if your system is unresponsive)

How 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
gksudo gedit /etc/X11/gdm/Init/Default
  • Nalezněte tento řádek
...
exit 0
  • Add the following lines above it
if [ -x /usr/bin/numlockx ]; then
/usr/bin/numlockx on
fi

How to remap the Caps Lock key as another Control key

gksudo gedit /etc/console-tools/remap

In the Console

  • Change
#s/keycode 58 = Caps_Lock/keycode 58 = Control/;

to

s/keycode 58 = Caps_Lock/keycode 58 = Control/;
  • Save your work
sudo /etc/init.d/console-screen.sh
  • Try using it

In X Windows

gksudo gedit ~/.Xmodmap
  • Add this:
keycode 66 = Control_L
clear Lock
add Control = Control_L
  • Now, apply the changes.
xmodmap ~/.Xmodmap
  • To apply them on startup
    • If ~/.xinitrc does not exist,
cp /etc/X11/xinit/xinitrc ~/.xinitrc
  • In all cases
gedit ~/.xinitrc
  • Make the first line this:
xmodmap ~/.Xmodmap
  • Restart X-Windows
  • Log In, a dialog should pop up, add .Xmodmap to the left side with the add button, and Save.

Howto upgrade kernel(2.6.22-9-generic) in Feisty Fawn

If you want to Upgrade kernel in Ubuntu Feisty Fawn

How to Convert a .nrg (Nero) file to a .iso file

If you want to Convert a .nrg (Nero) file to a .iso file check the following link

How to run programs on startup when login into GNOME

  • Systém --> Volby --> Sessions
  • Sessions
Startup Programs Tab --> Add/Edit/Delete

How to speed-up your Ubuntu box

How to switch to Console mode in GNOME

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

How to disable Ctrl+Alt+Backspace from restarting X in GNOME and KDE 3.5.x

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup
gksudo gedit /etc/X11/xorg.conf
  • Na konec souboru přidejte tyto řádky
Section "ServerFlags"
	Option		"DontZap"		"yes"
EndSection

How to enable Ctrl+Alt+Del to open System Monitor in GNOME

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"

How to refresh GNOME desktop

killall nautilus

How to refresh GNOME panel

killall gnome-panel

How to enable autosave in Gedit and disable creation of some_file~ files

  • Aplikace --> Systémové nástroje --> Configuration Editor
  • Configuration Editor
/ --> apps --> gedit-2 --> preferences --> editor --> save --> create_backup_copy (Unchecked)
/ --> apps --> gedit-2 --> preferences --> editor --> save --> auto_save (Checked)

How to show all hidden files/folders in Nautilus

  • 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)

How to browse files/folders as root user in Nautilus

sudo nautilus
  • To add File Browser(Root) to panel
gksudo 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
    • Aplikace --> Systémové nástroje --> File Browser (Root)

Jak nainstalovat a "View in Terminal" Menu for Nautilus

sudo apt-get install nautilus-open-terminal
  • Nautilus --> Right-click on folder or background --> Open in Terminal

How to change default file type "Open with" program

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

How to change preferred email client to Mozilla Thunderbird

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

How to open files as root user via right click

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
  • Uložte editovaný soubor
chmod +x $HOME/.gnome2/nautilus-scripts/Open\ as\ root
Klikněte pravým tlačítkem myši on file --> Scripts --> Open as root

How to disable beep sound in Terminal mode

Not for Dapper---- firingstone

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

How to change backspace behavior in Mozilla Firefox to do page back instead of page up

  • In the adress bar in Firefox type:
about:config
  • Search for 'browser.backspace_action' in the list
  • Change the value from 1 to 0 by doubleclicking on the number
  • Restart Firefox

How to handle mms 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

How 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

How to load Web site faster in Mozilla Firefox

  • Aplikace --> 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
  • Restartujte Mozilla Firefox

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

  • Aplikace --> Internet --> Firefox Web Browser
  • Mozilla Firefox
Address Bar --> about:config
Filter: --> accessibility.typeaheadfind.enablesound --> false
  • Restartujte Mozilla Firefox

Jak nainstalovat Flock Web Browser in Ubuntu

Jak nainstalovat/uninstall .deb files

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

How to find out which version of a package I have installed

dpkg -l packagename

How to convert .rpm files to .deb files

sudo alien -d package_file.rpm

How to compile .deb files from source

  • Přečtěte si #Jak přidat extra repositáře
  • There are various programs available to help automate the process of create .deb files from source. For more information, see the links at the end of this section. A basic well tested method is described here.
  • Nainstalujte the necessary software to build the source (build-essential may be all that is necessary, though there may be other dependencies) and checkinstall (which creates deb files).
sudo apt-get install checkinstall build-essential
  • In the directory where you have extracted the source, after you have run ./configure and make you can create a .deb file and install it with either of the following commands. The second -D option creates a .deb file in the directory that you can share with others or install without needing the source.
sudo checkinstall

or

sudo checkinstall -D

How to rename all files in directory at once

  • To install "mvb" file name renamer
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

How to manipulate all image files in directory at once

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

How to set System-wide Environment Variables

sudo cp -p /etc/profile /etc/profile_backup
sudo gedit /etc/profile
  • Append the System-wide Environment Variables at the end of file
  • Uložte editovaný soubor

How to save "man" outputs into files

man command | col -b --> file.txt

How to force GDM to system beep when login screen ready

  • This is useful on computers where headphones are usually plugged in, allowing them to utilize the speakers for this attention-getting task.
echo foo >> ~/foo.wav
  • Systém --> Správa --> Přihlašovací okno --> Accessibility

Now make sure the "Login Screen Ready" check mark is checked. Click on the folder icon and navigate to your home folder and select "foo.wav".

rm foo.wav

The drop down menu should now say "(None)"

Clean up Ubuntu GNU/Linux System

How to clean /tmp/ folder contents on shutdown

sudo cp /etc/init.d/sysklogd /etc/init.d/sysklogd_backup
gksudo gedit /etc/init.d/sysklogd
  • Nalezněte tuto sekci
...
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/.??*
  • Uložte editovaný soubor

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

  • To scroll up to view previously outputs
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

How to set up (automatic) background/wallpaper-changer application for GNOME

  • You must have Python installed (python package in Synaptic Package Manager, or z příkazové řádky):
sudo apt-get install python
  • Method 1 uses a simple Python script named change-wallpaper.py:
  • Stáhněte and rename the python script change-background-py and make it executable:
wget http://oracle.bridgewayconsulting.com.au/~davyd/misc/change-background-py.html
mv change-background-py.html change-background.py
chmod +x change-background.py
  • Create a folder for your wallpapers and make a link (in your home directory) to it named .backgrounds:
mkdir ~/wallpapers
gksudo ln -s ~wallpapers ~/.backgrounds
or make a link (in your home directory) named .backgrounds to your /usr/share/backgrounds folder:
gksudo ln -s /usr/share/backgrounds ~/.backgrounds
  • Create a menu entry for wallpaperchanger:
Klikněte pravým tlačítkem myši on Applications-> Edit Menus --> File --> Accessories --> New item
Name: Wallpaper changer
Command: ~/change-background.py (or python ~/change-background.py)
  • Change desktop background every time you reboot your computer:
Systém --> Volby --> Session --> Startup Programs
Add: ~/change-backgrounds.py (or python ~/change-backgrounds.py)
  • To change the desktop background every X minute of the hour:
crontab -e
In the opened file enter:
X * * * * * python ~/change-backgrounds.py 
1 as X would mean: every hour:01. For every minute, just use * as X.
To exit: press ctrl+x, y
  • Method 2 uses a more complex Python script named wallpaperchanger.py:
  • To install the script into a different location than your home directory, replace "~" with your path
cd ~
wget http://members.chello.at/horst.jens/files/wallpaperchanger.py
chmod +x wallpaperchanger.py
~/wallpaperchanger.py
gedit ~/.wallpaperchanger/wallpaperchangerconfig.py
  • Edit all the lines not beginning with an "#":
gksudo gedit wallpaperchangerconfig.py
  • Create a menu entry for wallpaperchanger:
Klikněte pravým tlačítkem myši on Applications-> Edit Menus --> File --> Accessories --> New item
Name: wallpaperchanger
Command: ~/wallpaperchanger.py
  • Change desktop background every time you reboot your computer:
Systém --> Volby --> Session --> Startup Programs
Add: ~/wallpaperchanger.py
  • To change the desktop background every X minute of the hour:
crontab -e
In the opened file enter:
X * * * * * python ~/wallpaperchanger.py 
1 as X would mean: every hour:01. For every minute, just use * as X.
To exit: press ctrl+x, y

How to set up automatic background change (KDE)

  • 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 Systém --> Volby --> 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_toggle,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_toggle,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 Jak nastavit.

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,

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

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,

  • PravyWin + C + = napíše €
  • PravyWin + = + C napíše €
  • PravyWin + C + O napíše ©
  • PravyWin + O + C napíše ©
  • PravyWin + a + ' napíše á
  • PravyWin + a + " napíše ä
  • PravyWin + a + ` napíše à
  • PravyWin + a + ~ napíše ã
  • PravyWin + a + * napíše å
  • PravyWin + a + ^ napíše â
  • PravyWin + a + --> napíše â
  • PravyWin + a + , napíše ą
  • PravyWin + e + - napíše ē
  • PravyWin + S + 1 napíše ¹
  • PravyWin + S + 2 napíše ²
  • PravyWin + S + 3 napíše ³

Jak nainstalovat ubuntu-title font used in Ubuntu logo

sudo apt-get install ttf-ubuntu-title

Now you can use this font in your favorite applications

Jak asociovat Adobe Reader se soubory v Nautilu

Now when you double-click on a .pdf file, it will be opened with Adobe Reader.

How to print from Adobe Reader

/usr/bin/lp -d FS-1010

How to pull apart and combine pdf files

sudo apt-get install pdftk
cd
mkdir bin
cd bin
gedit pdftk_burst
  • add the following text to pdftk_burst:
#!/bin/bash
cd ${1%/*}
/usr/bin/pdftk "$1" burst
rm doc_data.txt
  • save and close pdftk_burst
gedit pdftk_cat
  • add the following text to pdftk_cat:
#!/bin/bash
cd ${1%/*}
outfile="00out.pdf"
if [ -f $outfile ] ; then
rm -f $outfile
fi
/usr/bin/pdftk *.pdf cat output $outfile
  • save and close pdftk_cat
chmod u+x pdftk_burst pdftk_cat
  • open Nautilus (Places --> Desktop) and browse to a .pdf file
  • right-click the .pdf file, select Properties, go to the Open With tab, click Add, click Use a Custom Command, click Browse, browse to pdftk_burst. Do the same with pdftk_cat.

Now, when you right-click on a .pdf file, you'll get two extra options:

  • Open With --> pdftk_burst which will convert a 30 page pdf file to 30 x 1 page pdf files
  • Open With --> pdftk_cat which will join together all the pdf files in the same directory, and create a file called 00out.pdf

Poznámka: this won't work with pdfs with any type of protection - read man pdftk for more command line options.

How to remove jedit when Synaptic package manager fails after install

sudo dpkg --remove --force-depends --force-remove-reinstreq jedit

Now, you can use your Synaptic package manager again.

How to compile a kernel the Ubuntu Way

http://www.howtoforge.com/kernel_compilation_ubuntu

System requests (What to do if your system is unresponsive)

You can "talk" to the kernel directly via system requests: Press "ALT" + "sysreq-key" + "one of the keys" listed below (The sysreq-key is also known as the 'print screen' key):

(Taken from /usr/src/linux/Documentation/sysrq.txt)

  • 'r' - Turns off keyboard raw mode and sets it to XLATE.
  • 'k' - Secure Access Key (SAK) Kills all programs on the current virtual console.
  • 'b' - Will immediately reboot the system without syncing or unmounting your disks.
  • 'c' - Will perform a kexec reboot in order to take a crashdump.
  • 'o' - Will shut your system off (if configured and supported).
  • 's' - Will attempt to sync all mounted filesystems.
  • 'u' - Will attempt to remount all mounted filesystems read-only.
  • 'p' - Will dump the current registers and flags to your console.
  • 't' - Will dump a list of current tasks and their information to your console.
  • 'm' - Will dump current memory info to your console.
  • 'v' - Dumps Voyager SMP processor info to your console.
  • '0'-'9' - Sets the console log level, controlling which kernel messages will be printed to your console. ('0', for example would make it so that only emergency messages like PANICs or OOPSes would make it to your console.)
  • 'f' - Will call oom_kill to kill a memory hog process
  • 'e' - Send a SIGTERM to all processes, except for init.
  • 'i' - Send a SIGKILL to all processes, except for init.
  • 'l' - Send a SIGKILL to all processes, INCLUDING init. (Your system will be non-functional after this.)
  • 'h' - Will display help ( actually any other key than those listed above will display help. but 'h' is easy to remember :-)

Note that you may have to enable system requests. Read "/usr/src/linux/Documentation/sysrq.txt" for details. By default it is enabled though.

How to add locales to Ubuntu the command line way

  • Open up a terminal
  • Become root:
    sudo su -
  • Generate a /var/lib/locales/supported.d/local from /usr/share/i18n/SUPPORTED:
cat /usr/share/i18n/SUPPORTED | grep "en\|ru" --> /var/lib/locales/supported.d/local

This example shows all Russian (ru) and English (en) locales being chosen. Look through /usr/share/i18n/SUPPORTED to find the ones for you, then put them in a list, replacing en\|ru and separating each language with a \| (backslash, bar). If you only want one language, just put it in quotes.

  • Then regenerate all of the locales:
dpkg-reconfigure locales
  • Then set your locale:
update-locale LANG=en_US.UTF-8

In this step, make sure to choose the language and country that you would like your computer to think it is in. Here, I choose en_US, the United States version of English. Once again, look at your /var/lib/locales/supported.d/local or /usr/share/i18n/SUPPORTED for the one right for you. You may also want to research locales, using the Internet.

That was easy, now the command
lxterm
will open up the Unicode version of xterm or your translated software will display things properly, like vim.

How to set default Terminal App window size

The size for a gnome terminal session can be passed through the geometry parameter, specifying columns and rows like 80x40. The default geometry is 80x25.

  • First way is to add the following parameter to gnome-terminal launcher:
--geometry 100x40
  • Other way is to change this parameter globaly for all gnome-terminal launcher's. Go to /usr/share/applications/gnome-terminal.desktop and edit the EXEC line like this:
Exec=gnome-terminal --geometry=120x30

Using VI editor

A few very simple tricks of using basic but strong unix editor called vi can be found here.

How to play DVDs

  • Install the codecs:
sudo apt-get install libdvdnav4 libdvdplay0 libdvdread3 libdvdcss2
  • Use totem-xine instead of the default "totem-gstreamer":
sudo apt-get remove --purge totem totem-gstreamer
sudo apt-get install totem-xine

Jak nainstalovat Gmail Notifier alternative (CheckGmail)

  • Add the following sources to the repository list:
deb http://asher256-repository.tuxfamily.org dapper main dupdate french
deb http://asher256-repository.tuxfamily.org ubuntu main dupdate french
  • Nainstalujte the application
sudo apt-get install checkgmail
  • Go to 'System/Preferences/Sessions/Startup Programs' and add the following path to start notifier automatically
Image:Sessions.png
Sessions windows


Image:Add startup program.png
Add startup program window


/usr/bin/checkgmail

After this the program will appear in your notification area.

How to emulate Mac OS X Spotlight (Deskbar)

  • Right click to your panel and select 'Add to panel...'. Now choose 'Deskbar' applet and click 'Add' button.
  • Nainstalujte 'Beagle' packet to enable data indexing on your computer

How to make Ubuntu look like Mac OS X

  • Detailed instruction can be found here.

How to remove temporary files on shutdown

  • Backup sysklogd file
sudo cp /etc/init.d/sysklogd /etc/init.d/sysklogd_backup
  • Edit sysklogd file
gksudo gedit /etc/init.d/sysklogd
  • After the following lines...
stop)
log_begin_msg "Stopping system log daemon..."
start-stop-daemon --stop --quiet --oknodo --exec $binpath --pidfile $pidfile
log_end_msg $?
  • Add this line:
rm -fr /tmp/* /tmp/.??*

How to tile windows in gnome

First, download the wmtile debian package here.

If you are not running i386, the project's homepage is here.

  • Double click the package and install it.
  • Login as root and browse to /usr/share/tile/
  • Open the rc file in gedit
  • Change the second option to read "multi-desktop netwm"
  • Save the rc file

Now, create a launcher:

  • Right-click on the gnome panel (the taskbar at the top of the screen) and choose "Add to Panel"
  • Select "Custom Application Launcher" and fill in these values:
    • Type: Application
    • Name: Tile Windows Vertically
    • Command: tile -v -w
  • You can also select an icon to use with the launcher.
  • Click "OK"

Now open a couple windows and click your new launcher button to test it. This works great with two or three windows, but it can get a bit strange with more.

If you want to create another launcher that tiles windows horizontally, just follow the same directions, but use the command "tile -h -w"

Jak nainstalovat a virtual PDF printer


-Install cups-pdf from the Synaptic Package Manager

Go to Systém --> Správa --> Printing

-Add a printer with Printer --> Add Printer or double click on "New Printer" icon

"STEP 1of3" PDF Printer (Virtual Printer) should now be in the local detected printers list so select it and click 'Forward'

"STEP 2of3" Select "Generic" as the manufacturer and "PostScript" as the printer. Now click 'Forward'

"STEP 3of3" Give the printer a sensible description and location and click 'Apply'

The "CUPS/PostScript" printer should now exist in the print dialogue of you applications and will save the output PDF file to the /HOME/PDF folder. It may be possible to change the destination by editing /etc/cups/cups-pdf.conf


How to pass module options for Ubuntu to pickup on startup

sudo <your editor of choice> /etc/modprobe.d/options

How to correct paper size to Letter

If you use letter-size paper and are having trouble getting your printers, etc. set properly, follow the following steps:

sudo dpkg-reconfigure libpaper1

Then delete any printers that need to print in letter size and reinstall printers. Systém --> Správa --> Printing

Troubleshooting Feisty Fawn


Servers

Monitoring Server

If you want to monitor your Ubuntu servers and clients like memory usage,CPU usage,Load average,Disk usage,Mysql monitoring, Network Monitoring,Processes Monitoring this is for you

Print Server (cupsd)

Jak nainstalovat cupsd

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

How to add a printer

  • Go to Systém --> Správa --> Printing.
  • Choose "Add printer".
  • "Add printer wizard" should start and tell you what to do.

How to remove a printer

sudo lpadmin -x printernamewhere 
printername is the name of the printer you want to remove

How to print on remote Ubuntu machine from another Ubuntu machine

  • Make sure your local printer is well configured.
  • Enable local printer sharing - Systém --> Správa --> Printing --> Global Settings menu --> Share printers
  • Server ip address: 192.168.0.1
  • Client ip address: 192.168.0.23
    • Server configuration
sudo cp /etc/cups/cupsd.conf /etc/cups/cupsd.conf.backup
gksudo gedit /etc/cups/cupsd.conf
find the block
<Location />
...
Allow localhost
...
</Location>
and add the following line into it.
Allow 192.168.0.23
Restart cups.
sudo /etc/init.d/cupsys restart
    • Client configuration
sudo cp /etc/cups/client.conf /etc/cups/client.conf.backup
gksudo gedit /etc/cups/client.conf
And add the following line into it.
ServerName 192.168.0.1
Restart cups.
sudo /etc/init.d/cupsys restart
Now try "lpq" and you should see something like
vitek@lightfox:~$ lpq
HPLJ6P is ready
no entries

How to print on remote Ubuntu machine from a Windows machine


1.19.4.5

How to set up 4 port printer server

Setting up COMPUSA print server on Ubuntu

(1) go to System, Administration, Printing.

(2) Then Add a printer

(3) Network Printer and choose HP JetDirect

(4) Where it says Host you put in the IP Address of the Print server. You can find it with Smb4k

(5) Where it says Port you put 9100 for USB port 1. 9101 for USB port 2. 9102 for USB port 3. and 9103 for USB port 4.

(6) Then click on forward and install your printer

NFS Server

Installing NFS Server

sudo apt-get install nfs-kernel-server nfs-common portmap

Reconfigure Portmap to not bind to loopback interface:

sudo dpkg-reconfigure portmap 
sudo /etc/init.d/portmap restart

Define which folders to share (export):

sudoedit /etc/exports

Add share (export) definitions:

This will export path to all IP addresses between 192.168.1.1 and 192.168.1.254 with Read/Write access:

/path/to/shared/files 192.168.1.0/24(rw,no_root_squash,async)

This will export path to all IP addresses between 192.168.1.1 and 192.168.1.254 with Read Only access:

/path/to/shared/files 192.168.1.0/24(ro,async)

When finished, save changes and restart the NFS Server:

sudo /etc/init.d/nfs-kernel-server restart

Export your new configuration:

sudo exportfs -a

Installing NFS Client

sudo apt-get install portmap nfs-common
Mounting Manually
cd ~
mkdir temp
sudo mount 192.168.1.1:/path/to/shared/files temp

You may need to restart NFS services:

sudo /etc/init.d/portmap restart
sudo /etc/init.d/nfs-common restart
Mounting Automatically

Create mountpoint:

sudo mkdir /mnt/files

Editujte nastavení:

gksudo gedit /etc/fstab

Add something similar to below:

192.168.1.1:/path/to/shared/files /mnt/files nfs rsize=8192,wsize=8192,timeo=14,intr 0 0

Test new configuration:

sudo mount /mnt/files

Reboot to test automatic mounting.

Samba Server

Jak nainstalovat Samba Server for files/folders sharing service

sudo apt-get install samba smbfs
  • You must also open the ports for incoming/outgoing use by Samba in the IPTables (firewall). This can be done using the Firestarter GUI, for example. Read #Firewall

How to přidat/editovat/mazat network users

sudo smbpasswd -a system_username
gksudo gedit /etc/samba/smbusers
    • Insert the following line into the new file
system_username = "network username"
    • Uložte editovaný soubor
  • To edit network user
sudo smbpasswd -a system_username
  • To delete network user
sudo smbpasswd -x system_username

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

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
gksudo gedit /etc/samba/smb.conf
  • Nalezněte tento řádek
...
; security = user
...
  • Naraďte těmito řádky
security = user
username map = /etc/samba/smbusers
  • Odkomentujte následující řádky:
;[homes]
;comment = Home Directories
;browseable = no
;valid users = %S
;writable = yes
sudo testparm
sudo /etc/init.d/samba restart

How to share home folders with read/write permissions (Authentication=Yes)

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
gksudo gedit /etc/samba/smb.conf
  • Nalezněte tento řádek
...
; security = user
...
  • Naraďte těmito řádky
security = user
username map = /etc/samba/smbusers
  • Nalezněte tuto sekci
...
# 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
...
  • Naraďte těmito řádky
# 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
gksudo gedit /etc/samba/smb.conf
  • Nalezněte tento řádek
...
; security = user
...
  • Naraďte těmito řádky
security = user
username map = /etc/samba/smbusers
  • Na konec souboru přidejte tyto řádky
[Group]
comment = Group Folder
path = /home/group
guest ok = yes
read only = yes
create mask = 0700
directory mask = 0700
force user = nobody
force group = nogroup
sudo testparm
sudo /etc/init.d/samba restart

How 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
gksudo gedit /etc/samba/smb.conf
  • Nalezněte tento řádek
...
; security = user
...
  • Naraďte těmito řádky
security = user
username map = /etc/samba/smbusers
  • Na konec souboru přidejte tyto řádky
[Group]
comment = Group Folder
path = /home/group
guest ok = yes
read only = no
create mask = 0700
directory mask = 0700
force user = nobody
force group = nogroup
sudo testparm
sudo /etc/init.d/samba restart

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

  • Přečtěte si #Základní poznámky
  • Přečtěte si [[#Jak nainstalovat Samba Server for files/folders sharing service]
sudo mkdir /home/public
sudo chmod 777 /home/public/
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
gksudo gedit /etc/samba/smb.conf
  • Nalezněte tento řádek
...
; security = user
...
  • Naraďte těmito řádky
security = user 
username map = /etc/samba/smbusers
  • Na konec souboru přidejte tyto řádky
[public]
comment = Public Folder
path = /home/public
guest ok = yes
read only = yes
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup
sudo testparm
sudo /etc/init.d/samba restart

How 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
gksudo gedit /etc/samba/smb.conf
  • Nalezněte tento řádek
...
; security = user
...
  • Naraďte těmito řádky
security = user
username map = /etc/samba/smbusers
  • Na konec souboru přidejte tyto řádky
[public]
comment = Public Folder
path = /home/public
guest ok = yes
read only = no
create mask = 0777
directory mask = 0777
force user = nobody 
force group = nogroup
sudo testparm
sudo /etc/init.d/samba restart

How to share public folders 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
gksudo gedit /etc/samba/smb.conf
  • Nalezněte tento řádek
...
; security = user
...
  • Replace with the following line (make sure it does not begin with a semicolon)
security = share
  • Na konec souboru přidejte tyto řádky
[public]
comment = Public Folder
path = /home/public
guest ok = yes
read only = yes
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup
  • Uložte editovaný soubor
sudo testparm
sudo /etc/init.d/samba restart

How 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
gksudo gedit /etc/samba/smb.conf
  • Nalezněte tento řádek
...
; security = user
...
  • Replace with the following line (make sure it does not begin with a semicolon)
security = share
  • Na konec souboru přidejte tyto řádky
[public]
comment = Public Folder
path = /home/public
guest ok = yes
read only = no
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup
  • Uložte editovaný soubor
sudo testparm
sudo /etc/init.d/samba restart

How to print on remote Ubuntu machine via samba

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.backup
gedit /etc/samba/smb.conf
Find the following lines
...
# printing = cups
# printcap name = cups
...
and uncomment them.
printing = cups
printcap name = cups
Restart cups server
sudo /etc/init.d/cupsys restart
Now printers working on your Ubuntu machine should be acessible via samba.

Windows networking error: "The account is not authorized to log in from this station."

When accessing the Samba server from a locked down Windows computer, the following error may occur: "\\hostname\sharename is not accessible. You might not have permission to use this network resource. The account is not authorized to log in from this station."

This is sometimes caused by the Windows computer requiring digitally signed communications. The local Global Security Policy on the Windows computer needs to be changed. The following policies need to be disabled under Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options:</p>

Samba Web Administration Tool (SWAT)

Jak nainstalovat INETD Superserver
sudo apt-get install netkit-inetd
Jak nainstalovat SWAT for Samba daemon
sudo apt-get install swat
  • Open inetd daemon configuration
sudo gksu gedit /etc/inetd.conf
  • If string is:
<#off#> swat  stream tcp nowait.400 root /usr/sbin/tcpd /usr/sbin/swat
  • Change to (due to know BUG which resets peer connection):
swat  stream tcp nowait.400 root /usr/sbin/swat swat
  • Restart daemon
sudo /etc/init.d/inetd restart


SSH Server

SSH stands for secure shell. It is a method for establishing encrypted communications over a data channel (a "tunnel") between a remote host and a local client. It is similar to, but simpler than, a VPN connection.

Jak nainstalovat SSH Server for remote administration service

sudo apt-get install ssh

How to SSH into remote Ubuntu host

  • In this example:
Remote Ubuntu machine: 192.168.0.2
username is a valid user on the remote host
ssh username@192.168.0.2
  • You can tunnel to a URL as well:
ssh username@foobar.dyndns.org

If your LAN uses a dynamic IP to connect to the Internet, you can use a Dynamic IP service (such as DynDNS) to assign a static URL to your LAN (foobar.dyndns.org, for example). An SSH request over the Internet to your URL (e.g. foobar.dyndns.org) would then be routed by the DynDNS service to your modem/router. Your router must then be set to forward the port used for the SSH tunnel to your host machine on the LAN. (SSH tunnels generally occur by default over port 22, but it can be changed (see below)).

  • You can explicitly select the port number (instead of port 22) for the SSH tunnel:
ssh username@foobar.dyndns.org:11022

However, if you do this, the host SSH server must be listening on the same port (port 11022 in the example). The port to listen to can be set in the ssdh_config file of the OpenSSH server (provided in Ubuntu) on your host. Also, your router must be configured to forward port 11022 to your OpenSSH host.

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

  • In this example:
Remote Ubuntu machine: 192.168.0.2
Remote files/folders location: /home/username/remotefile.txt
Local machine save location: . (current directory)
scp -r username@192.168.0.2:/home/username/remotefile.txt

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

  • In this example:
Local files/folders location: localfile.txt
Remote Ubuntu machine: 192.168.0.2
Remote Ubuntu machine save location: /home/username/
scp -r localfile.txt username@192.168.0.2:/home/username/

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

  • In this example:
Remote Ubuntu machine: 192.168.0.2
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.2:/home/username/remotefile.txt

How to copy files/folders from local machine into a remote Ubuntu host (rsync)

  • For this example:
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/

How to mount remote host folders into local Ubuntu machine (sshfs)

  • For this example:
Remote machine: 192.168.0.2
Remote machine folder location: /media/music
  • Nainstalujte sshfs
sudo apt-get install sshfs
  • Load kernel driver for sshfs
sudo modprobe fuse
  • Join the 'fuse' user group
sudo adduser your_user_name fuse
  • Logout and login for this to take effect.
  • fix group on /dev/fuse
sudo chgrp fuse /dev/fuse
  • Create local mountpoint in your home directory
mkdir ~/remote_music
  • Mount the remote folder into ~/remote_music
sshfs 192.168.0.2:/media/music ~/remote_music

How to SSH into a remote Ubuntu host from a Windows client

How to copy files/folders from/into a host Ubuntu machine from a Windows client

How to limit the user accounts that can connect through ssh remotely

  • Přečtěte si #Základní poznámky
  • Poznámka: When you initially enable the SSH server, any user with a valid account can connect remotely. This can lead to security risks because password cracking tools exist that try common username/password pairs. This method helps restrict login access.
  • Keep a backup of the ssh server configuration file:
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.ORIGINAL
  • Edit the configuration file:
gksudo gedit /etc/ssh/sshd_config
  • Change the parameter:
PermitRootLogin no

This disallows the root user from connecting through SSH remotely.

  • Add the parameter:
AllowUsers <user1> <user2> ...

and specify the usernames (space separated) that can connect remotely.

NOTE: This will allow ONLY the users specified to connect. You may use wildcards here (example: j* will allow jsmith to connect but not fsmith).

  • You can also use:
DenyUsers <user1> <User2> ...

and specify, again using wildcards, users restricted from using SSH.

  • If you enable the OpenSSH server and you do not wish to enable any remote connections, you may add:
AllowUsers nosuchuserhere

Using SSH to Port Forward

ssh -L <local port>:<remote computer>:<remote port> <user>@<remote ip>

An example is:

ssh -L 6669:94.92.10.15:6667 foowho

In this example, local port 6669 on the local client computer is tunneled by encrypted SSH over the default port 22 to the router at 94.92.10.15. The router must be set up to forward port 22 to whatever the internal LAN IP (such as 192.168.0.56) of the SSH host is. The host is running OpenSSH (ssdh service) and is set to listen to port 22. It then routes the incoming data to the host port 6667, where presumably some other program is waiting for data. foowho has an account on the host running the OpenSSH server.

SSH tunnels can also be established using URLs and even alternate ports. An example is:

ssh -L 5900:foobar.dyndns.org:5900 foowho -p 11022

In this example, local port 5900 on the client is forwarded through an SSH tunnel on port 11022 to foobar.dyndns.org. The DNS service translates foobar.dyndns.org into the appropriate WAN (Internet) IP address, where the router is listening. The router is set up to forward port 11022 to the LAN machine hosting the OpenSSH server, which is listening on port 11022. It then sends the data to whatever program is running on port 5900 on the host.

  • You can forward a local port to a different port on the remote host.
Example: Make port 80 (web server/browser) on the remote host at 10.0.2.10 available locally as port 81
ssh -L 81:10.0.2.10:80 user@office.net
  • You can create secure SSH tunnels to multiple hosts using multiple ports.
ssh -L 81:10.0.2.10:80 -L 82:10.0.2.20:80 -L 83:10.0.2.30:80 user@office.net

Now, local port 81 locally forwards to port 80 on the host at 10.0.2.10, local port 82 forwards to port 80 on the host at 10.0.2.20 and local port 83 forwards to port 80 on the host at 10.0.2.30. In this example, user has an account on all three host machines at 10.0.2.10, 10.0.2.20, and 10.0.2.30.

  • Once port forwarding is set up by ssh, an application is directed to the SSH tunnel for port usage by using the loopback as the destination.
Example 1:
ssh -L 81:10.0.2.10:80 user@office.net
http://localhost:81 or http://127.0.0.1/:81

will direct a web browser to use port 81 locally, which is being redirected by SSH to port 80 on the remote host at 10.0.2.10.

Example 2:
ssh -L 5900:foobar.dyndns.org:5900 foowho
vncviewer 127.0.0.1 or vncviewer localhost

will direct vncviewer (which uses port 5900 by default) to direct its traffic through the ssh tunnel to the host at foobar.dyndns.org, where, presumably, a VNC server is listening on port 5900.

Protecting SSH from brute force attack

It is possible to easily protect SSH from a password brute force attack with a pam_abl module. You can install it by the two ways:

To install from a repository:

And execute the following commands:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libpam-abl
sudo /etc/init.d/ssh restart

First command is to fetch the repository listing. Second is to upgrade the openssh-server package to patched version (openssh-client will be also updated). Third is to set up a protection plugin. And the fourth is to restart a server with a new security plugin.

Rsync Daemon

Rsync is a backup/mirroring/synchronization tool to keep two directories, local or remote, synchronized. Read this brief tutorial.

Jak nainstalovat the Rsync Daemon for remote backup and restoration of files

Usually by default Ubuntu will have rsync installed but not enabled. But to make sure run this command:

sudo apt-get install rsync

Now we need to create the configuration file. This tells the daemon what to do:

sudo gedit /etc/rsyncd.conf

Copy and paste the following into the file but make sure to replace all instances of "username" with your username:

[usernamebackup]
path = /home/username/backup
comment = Backup
uid = username
gid = username
read only = false
auth users = username
secrets file = /etc/rsyncd.secrets

Set the permission on the file to be safe:

sudo chmod 644 /etc/rsyncd.conf

Create a username and password file:

sudo gedit /etc/rsyncd.secrets

And enter in your credentials:

username:password

Make the file secure, we don't want the password's stolen:

sudo chmod 600 /etc/rsyncd.secrets

Now the rsync daemon is not enabled by default, so go edit /etc/default/rsync:

sudo gedit /etc/default/rsync

And set:

RSYNC_ENABLE=false

To:

RSYNC_ENABLE=true

This allows the daemon to become active and lets you back up your data! To kickstart the change, restart the daemon:

sudo /etc/init.d/rsync restart

Enable SSH Banner

After login you can have the contents of a "banner" file displayed on the user's screen.

  • Open up the sshd configuration file:
sudo gedit /etc/ssh/sshd_config
  • Find:
#Banner /etc/issue.net
  • Replace:
Banner /etc/issue.net
  • Edit the issue.net file to contain what you want displayed:
sudo gedit /etc/issue.net
  • Add what you want:
   _ 
 ___ _ _ ___ _____ ___| |___ 
 | -_|_'_| .'| | . | | -_|
 |___|_,_|__,|_|_|_| _|_|___|
   |_| 
 Welcome to my server
  • Restartujte SSHD:
sudo /etc/init.d/ssh restart

DHCP Server

Jak nainstalovat DHCP Server for automatic IP addresses assignment

  • In this example:
"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
gksudo gedit /etc/default/dhcp3-server
  • Nalezněte tento řádek:
...
INTERFACES=""
  • Replace with the following line:
INTERFACES="eth0"
  • Uložte editovaný soubor
sudo cp /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf_backup
gksudo gedit /etc/dhcp3/dhcpd.conf
  • Nalezněte tuto sekci:
...
# 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;
...
  • Naraďte těmito řádky:
# 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;
  • Nalezněte tuto sekci:
...
# 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;
#}
...
  • Naraďte těmito řádky:
# 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;
}
  • Restartujte the DHCP server:
sudo /etc/init.d/dhcp3-server restart

Backup Ubuntu System

If you want to backup your ubuntu system try one of the following backup tools

Sbackup

Dar and Kdar

Ubuntu Feisty LAMP Server

LAMP stands for Linux, Apache, MySQL, and PHP. These components together comprise the easiest and most widely used web server.

  • Feisty has made a LAMP server installation a one-click process. If you are installing from an Ubuntu Server disk, you will be given the option of installing a LAMP server during initial installation. No other steps are required.
  • If you have not installed a LAMP server during installation, it can be installed from Synaptic Package Manager as a package. No other steps are required.
Systém --> Správa --> Správce balíků Synaptic --> Edit --> Mark packages by Task --> LAMP Server --> OK

How to further setup your LAMP server by creating and using MySQL databases, etc, go here.

  • From the command line, the LAMP server package can be installed using:
sudo tasksel install lamp-server

or

sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server

Database Server

Jak nainstalovat 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
gksudo 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 local-machine-name -u root -p password your-new-password
sudo /etc/init.d/mysql restart
  • Validate the existence of the socket file
find /var/run/mysqld -name *.sock

If it does not exist then create it.

touch /var/run/mysqld/mysqld.sock

MySQL Database backup using AutoMySQLBackup

  • AutoMySQLBackup is a script to take daily, weekly and monthly backups of your MySQL databases using mysqldump.
  • AutoMySQLBackup Script Features
    • Backup mutiple MySQL databases with one script. (Now able to backup ALL databases on a server easily. no longer need to specify each database seperately)
    • Backup all databases to a single backup file or to a seperate directory and file for each database.
    • Automatically compress the backup files to save disk space using either gzip or bzip2 compression.
    • Can backup remote MySQL servers to a central server.
    • Runs automatically using cron or can be run manually.
    • Can e-mail the backup log to any specified e-mail address instead of “root”. (Great for hosted websites and databases).
    • Can email the compressed database backup files to the specified email address.
    • Can specify maximun size backup to email.
    • Can be set to run PRE and POST backup commands.
    • Choose which day of the week to run weekly backups.
  • Stáhněte from here
  • AutoMySQLBackup Requirements

The AutoMySQLBackup script only requires mysqldump (A standard utility provided with the mysql client) and gzip or bzip2 for compression of the backup files. If you would like to have the log emailed to you then you will need to have permission to execute the “mail” program. If you want the compressed backup files mailed to you then Mutt must be available on the server. Finally you will need a bash shell and the standard Systémové nástroje and utilities (all these requirements should be the default on most linux system.)

  • What AutoMySQLBackup does

Every day AutoMySQLBackup will run (if setup in /etc/cron.daily) and using mysqldump and gzip will dump your specified databases to the /backups/daily directory, it will rotate daily backups weekly so you should never have more than 7 backups in there..

Every Saturday AutoMySQLBackup will again backup the databases you have chosen but they will be placed into /backups/weekly, these will be rotated every 5 weeks so there should never be more than 5 backups in there..

Every 1st of the month AutoMySQLBackup will create a backup of all databases and place them into /backups/monthly. These will never be rotated so it will be up to you to do your own house keeping. I would suggest taking a copy of this offline every month or two so that if you have a hard drive failure you will be able to restore your database

  • AutoMySQLBackup Installation

The install is as simple as editing a few variables in the AutoMySQLBackup file. The full setup is documented in the AutoMySQLBackup script file below the variables section.

  • Stáhněte automysqlbackup.sh and place it into your /etc/cron.daily directory or your home directory.
  • Edit (at least) the following lines :
...
USERNAME=dbuser 
PASSWORD=password DBNAMES=”DB1 DB2 DB3″
...
  • Poznámka:The user must have at least select privileges to the databases and make sure to keep the quotes ” ” otherwise it won’t work
  • Make the file executable :
sudo chmod u+rwx
  • Create the following directory
./backups
  • That’s it...Now you can run it using the command line “./automysqlbackup.sh” or if it is in /etc/cron.daily it will run each day when cron

Jak nainstalovat MYSQL Administrator

sudo apt-get install mysql-admin

Jak nainstalovat MySQL Query Browser (SQL Client)

sudo apt-get install mysql-query-browser

Jak nainstalovat Oracle Database XE

  • Add the following repository to your /etc/apt/sources.list:
deb http://oss.oracle.com/debian unstable main non-free
  • Get the public key
wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle -O- | sudo apt-key add - 
  • Nainstalujte the software using apt-get
sudo apt-get update
sudo apt-get install oracle-xe
  • Add your login to the 'dba' group (where your login name is username)
sudo usermod -G dba -a username
  • Run the initial configuration
sudo /etc/init.d/oracle-xe configure

You can configure any ports you want as long as they don't interfere with any other services listening on ports. You can choose the defaults by pressing enter instead of entering something in.

Apache HTTP Server

Jak nainstalovat Apache HTTP Server for HTTP (Web) Server service

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

Depending on how you setup apache, you may need to run a command to map public_html directories (inside user home directories) to ~. like, http://localhost/~chris. The optional command is:

sudo a2enmod userdir

Jak nainstalovat PHP for Apache HTTP Server

  • Poznámka: PHP can be installed separately or as part of a LAMP integrated server package (Linux, Apache2, MySql, PHP). To install the integrated package, read #Ubuntu Feisty LAMP Server.
Jak nainstalovat PHP5
sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
sudo /etc/init.d/apache2 restart
  • To test if php5 installed correctly
gksudo gedit /var/www/testphp.php
  • (Optional) Insert the following line into the new file
<?php phpinfo(); ?>

If that didn't work (for example, if your browser prompted you to save the testphp.php page), try these commands:

sudo a2enmod php5
sudo /etc/init.d/apache2 force-reload

Then try opening http://localhost/testphp.php again

Installing recommended modules
sudo apt-get install php-pear php5-gd php5-xsl curl libcurl3 libcurl3-dev php5-curl

(Optional) The ability to use the mail() function is also recommended. You need a package that enables you to use the sendmail command and Postfix is a good one. If you do not want to install this, then go to the Restart Apache step and you're finished.

sudo apt-get install postfix

After running that, you will be prompted to configure postfix.

  • Restartujte Apache
sudo /etc/init.d/apache2 restart

Many PHP applications use XSLT technology as well as server-side graphic manipulation (via GD). Also, PEAR provides access to PHP's module repository. cURL is a way to simulate a user's actions at a web browser. One can use it to get content off a website such as to create dynamic statistics.

Jak nainstalovat MYSQL for Apache HTTP Server

sudo apt-get install libapache2-mod-auth-mysql
  • Select either php4-mysql or php5-mysql depending on which version of PHP you installed
sudo apt-get install php<version-number>-mysql
sudo apt-get install phpmyadmin
  • If you installed phpmyadmin using apt-get and cannot log in, run sudo apt-get purge phpmyadmin and then sudo apt-get install phpmyadmin.
  • To get PHP to work with MySQL, open the file (where <version> is either 4 or 5 depending on which PHP you installed)
sudo gedit /etc/php<version>/apache2/php.ini
  • You'll need to uncomment the ";extension=mysql.so" line so that it looks like this
...
extension=mysql.so
...
  • Save the file then exit
sudo /etc/init.d/apache2 restart
  • If you cannot log in, set a password:
sudo mysqladmin password <NEWPASSWORD>

Alternative if the above doesn't work (which it probably won't and this probably will):

sudo apt-get install mysql-server

Jak nainstalovat Python for Apache 2

sudo apt-get install python
sudo apt-get install libapache2-mod-python
sudo gedit /etc/apache2/mods-available/mod_python.conf

add the following lines

AddType application/x-httpd-python .py
AddHandler mod_python .py
PythonHandler mod_python.publisher
PythonDebug On

save

cd /etc/apache2/mods-enabled
sudo ln -s ../mods-available/mod_python.conf mod_python.conf
sudo /etc/init.d/apache2 restart

How to map URLs to folders outside /var/www/

gksudo gedit /etc/apache2/conf.d/alias
  • Insert the following lines into the new file
Alias /URL-path /location_of_folder/
<Directory /location_of_folder/>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
  • Uložte editovaný soubor
sudo /etc/init.d/apache2 restart
  • When you get "403 - Permission denied", you might try:
chmod o+x /location_of_folder/
  • If that doens't work, the following might help:
chmod o+r,o+x /location_of_folder/

How to change the default port number for Apache HTTP Server

  • For this example:
The new port number will be 78
sudo cp /etc/apache2/ports.conf /etc/apache2/ports.conf_backup
gksudo gedit /etc/apache2/ports.conf
  • Nalezněte tento řádek:
Listen 80
  • Replace with the following line:
Listen 78
  • Restartujte Apache:
sudo /etc/init.d/apache2 restart
  • Check to see if you can access the Apache web site on the new port:
http://localhost:78

How to parse RSS into PHP for Apache HTTP Server

  • For this example:
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/
gksudo 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>
  • Check your feeds:
http://localhost/feeds/index.php

FTP Server

Jak nainstalovat FTP Server for File Transfer service

sudo apt-get install proftpd

Jak nastavit FTP user to be "jailed" (chrooted) into their home directory

sudo cp /etc/proftpd/proftpd.conf /etc/proftpd/proftpd.conf_backup
gksudo gedit /etc/proftpd/proftpd.conf
  • Nalezněte tuto sekci
...
DenyFilter  \*.*/
...
  • Add the following line below it
DefaultRoot  ~
  • Uložte editovaný soubor
sudo /etc/init.d/proftpd restart

Jak nastavit FTP Server to allow anonymous FTP user to read only

sudo cp /etc/proftpd/proftpd.conf /etc/proftpd/proftpd.conf_backup
gksudo gedit /etc/proftpd/proftpd.conf
  • Na konec souboru přidejte tyto řádky
<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>
  • Uložte editovaný soubor
sudo /etc/init.d/proftpd restart

Jak nastavit FTP Server to allow anonymous FTP user to read/write

sudo cp /etc/proftpd/proftpd.conf /etc/proftpd/proftpd.conf_backup
gksudo gedit /etc/proftpd/proftpd.conf
  • Na konec souboru přidejte tyto řádky
<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>
  • Uložte editovaný soubor
sudo /etc/init.d/proftpd restart

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

sudo cp /etc/proftpd/proftpd.conf /etc/proftpd/proftpd.conf_backup
gksudo gedit /etc/proftpd/proftpd.conf
  • Na konec souboru přidejte tyto řádky
<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>
  • Uložte editovaný soubor
sudo /etc/init.d/proftpd restart

How to change the default port number for FTP Server

  • For this example:
The new port number will be 77
sudo cp /etc/proftpd/proftpd.conf /etc/proftpd/proftpd.conf_backup
gksudo gedit /etc/proftpd/proftpd.conf
  • Nalezněte tento řádek:
Port  21
  • Replace with the following line:
Port  77
  • Restartujte the FTP server:
sudo /etc/init.d/proftpd restart

How to ftp into remote Ubuntu host from a Windows client machine

  • Stáhněte and install FileZilla for Windows: Here
  • FTP addresses take the form:
ftp://[username]:[password]@[hostname].[domain].[tld]:[portnumber]/[directory]/

Poznámka: the username and password are optional. If they are not given and the server is not configured for anonymous access, then they will be requested.

How to FTP to a remote Windows host from an Ubuntu client machine

  • Warning: An unsecured FTP server is a security risk. FTP servers should be used either within a firewall-protected LAN only or in conjunction with SSH or VPN over the Internet.
  • Nainstalujte FTP Server on your Windows host. FileZilla Server for Windows is recommended. An alternative is CrossFTP Server, which requires Java.
  • Nainstalujte an FTP client on your local client machine. Again, you can use FileZilla or CrossFTP.
apt-get install filezilla
  • The FTP address normally has the form:
ftp://[username]:[password]@[hostname]:[port]

Jak nastavit your NAT/router/gateway/firewall for FTP server

  • Configure your FTP server with a limited passive port range so that TCP range can be opened in the incoming firewall.
  • For proftpd, edit /etc/proftpd/proftpd.conf:
gksudo gedit /etc/proftpd/proftpd.conf
and edit this line with the desire port range to use for FTP transfers:
PassivePorts xx-yy
Port x
where x is the port over which you wish FTP traffic to be directed.
  • The NAT/router/gateway/firewall devices or software must be configured to allow the configured incoming TCP ports (port x in the example) to be forwarded to your host on the LAN.

Personal Apt Repository

Setting Up Repository

Poznámka: This type of repository is known as a Trivial Repository.

This type of repository does not fully comply with Debian standards, so should not be used commercially. However, it is ideal for home or personal use.

  • Nainstalujte Package Tools
sudo apt-get install dpkg-dev
  • Create Repos on Filesystem
mkdir /somewhere/apt
mkdir /somewhere/apt/archives
mkdir /somewhere/apt/archives/binary
  • (Optional) Copy existing local APT cache to your Repos
cp -v /var/cache/apt/archives/*.deb /somewhere/apt/archives/binary/
  • Create Package Lists for Repos
cd /somewhere/apt/archives
dpkg-scanpackages binary /dev/null | gzip -9c --> binary/Packages.gz
  • Publish Repos with Apache
cd /var/www
sudo ln -s /somewhere/apt/archives apt
  • Add Repos to Sources (on all PCs) to /etc/apt/sources.list

Open /etc/apt/sources.list

sudo gedit /etc/apt/sources.list

Add the following to the bottom of the file:

# My Repos
deb http://localhost/apt binary/
  • Update APT Database
sudo apt-get update

Updating Repository

Simply copy or download ".deb" files to /somewhere/apt/archives/binary/ and then update the Packages list:

cd /somewhere/apt/archives
dpkg-scanpackages binary /dev/null | gzip -9c --> binary/Packages.gz

Streaming Media Server

Jak nainstalovat GNUMP3d for Streaming Media Server service

e.g. /var/music/ is the directory containing multimedia files
sudo apt-get install gnump3d

How to change the default directory containing multimedia files for GNUMP3d

  • In this example:
The new directory containing multimedia files is /home/music/
sudo cp /etc/gnump3d/gnump3d.conf /etc/gnump3d/gnump3d.conf_backup
gksudo gedit /etc/gnump3d/gnump3d.conf
  • Nalezněte tento řádek:
root = /var/music
  • Replace with the following line:
root = /home/music
  • Nalezněte tento řádek:
user = gnump3d
  • Replace with the following line:
user = root
  • Restartujte the Gnump3 server.
sudo /etc/init.d/gnump3d restart
  • Verify the service is running:
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
gksudo gedit /etc/gnump3d/gnump3d.conf
  • Nalezněte tento řádek
port = 8888
  • Replace with the following line
port = 7878
  • Uložte editovaný soubor
sudo /etc/init.d/gnump3d restart

How to enable downmixing support (for streaming outside your LAN)

sudo cp /etc/gnump3d/gnump3d.conf /etc/gnump3d/gnump3d.conf_backup
gksudo gedit /etc/gnump3d/gnump3d.conf
  • Nalezněte tento řádek
# downsample_enabled = 1
  • Uncomment the line (remove the '#' hash symbol) so it looks like this
downsample_enabled = 1
  • Then find these lines
# downsample_clients = ALL
# no_downsample_clients = 192.168.0.0/24
  • Replace them with these lines
downsample_clients = ALL 
no_downsample_clients = 192.168.0.0/24
no_downsample_clients = 10.0.0.0/24
no_downsample_clients = 172.16.0.0/12
  • Finally, find these lines
#downsample_high_mp3 = /usr/bin/lame --mp3input -b 56 $FILENAME -
#downsample_medium_mp3 = /usr/bin/lame --mp3input -b 32 $FILENAME -
#downsample_low_mp3 = /usr/bin/lame --mp3input -b 16 $FILENAME -
#
#downsample_high_ogg = /usr/bin/sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix -b 96 -
#downsample_medium_ogg = /usr/bin/sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix -b 64 -
#downsample_low_ogg = /usr/bin/sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix --resample 22050 -b 32 -
  • And uncomment them as well (remove all the '#' hash symbols) so they look like this
downsample_high_mp3 = /usr/bin/lame --mp3input -b 56 $FILENAME -
downsample_medium_mp3 = /usr/bin/lame --mp3input -b 32 $FILENAME -
downsample_low_mp3 = /usr/bin/lame --mp3input -b 16 $FILENAME -
downsample_high_ogg = /usr/bin/sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix -b 96 -
downsample_medium_ogg = /usr/bin/sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix -b 64 -
downsample_low_ogg = /usr/bin/sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix --resample 22050 -b 32 -
  • Uložte editovaný soubor
sudo /etc/init.d/gnump3d restart

How to downmix MP3 to Ogg Vorbis (better quality)

sudo cp /etc/gnump3d/gnump3d.conf /etc/gnump3d/gnump3d.conf_backup
gksudo gedit /etc/gnump3d/gnump3d.conf
  • Find these lines
downsample_high_mp3 = /usr/bin/lame --mp3input -b 56 $FILENAME -
downsample_medium_mp3 = /usr/bin/lame --mp3input -b 32 $FILENAME -
downsample_low_mp3 = /usr/bin/lame --mp3input -b 16 $FILENAME -
  • Replace them with these lines
downsample_high_mp3 = /usr/bin/madplay $FILENAME -o raw:- | oggenc --raw --downmix -b 96 -
downsample_medium_mp3 = /usr/bin/madplay $FILENAME -o raw:- | oggenc --raw --downmix -b 64 -
downsample_low_mp3 = /usr/bin/madplay $FILENAME -o raw:- | oggenc --raw --downmix --resample 22050 -b 32 -
  • Uložte editovaný soubor
sudo /etc/init.d/gnump3d restart

How to add downmixing support for FLAC audio

sudo apt-get install flac
  • Find the following lines
downsample_high_ogg = /usr/bin/sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix -b 96 -
downsample_medium_ogg = /usr/bin/sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix -b 64 -
downsample_low_ogg = /usr/bin/sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix --resample 22050 -b 32 -
  • Just under those, add the following lines
downsample_high_flac 	= /usr/bin/oggenc --downmix -b 96 $FILENAME -o -
downsample_medium_flac 	= /usr/bin/oggenc --downmix -b 64 $FILENAME -o -
downsample_low_flac 	= /usr/bin/oggenc --downmix --resample 22050 -b 32 $FILENAME -o -
  • Uložte editovaný soubor
sudo /etc/init.d/gnump3d restart

How to add downmixing support for AAC/MPEG-4 audio

sudo apt-get install faad
  • Find the following lines
downsample_high_ogg = /usr/bin/sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix -b 96 -
downsample_medium_ogg = /usr/bin/sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix -b 64 -
downsample_low_ogg = /usr/bin/sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix --resample 22050 -b 32 -
  • Just under those, add the following lines
downsample_high_m4a 	= /usr/bin/faad $FILENAME -d -o - | oggenc --raw --downmix -b 96 - -o -
downsample_medium_m4a	= /usr/bin/faad $FILENAME -d -o - | oggenc --raw --downmix -b 64 - -o -
downsample_low_m4a	= /usr/bin/faad $FILENAME -d -o - | oggenc --raw --downmix -b --resample 22050 -b 32 - -o -
  • Uložte editovaný soubor
sudo /etc/init.d/gnump3d restart

Groupware (Email/Calendaring)

Jak nainstalovat Meldware Communication Suite

sudo apt-get install sun-java5-jdk
sudo update-java-alternatives -s java-1.5.0-sun
  • Stáhněte the jar file for a recent milestone or build here
  • Open a new terminal (capture java path updates)
  • change directory to your download directory
  • replace below filename with correct version based on your download
sudo java -jar buni-meldware-20070225.jar
  • A series of configuration questions are asked, for destination directory specify /opt/mcs
sudo cp /etc/init.d/skeleton /etc/init.d/meldware-cs
gksudo gedit /etc/init.d/meldware-cs
  • Replace the value in the line beginning with PATH with "/usr/sbin:/usr/bin:/sbin:/bin:/opt/mcs/bin" excluding quotes (assuming you specified /opt/mcs as the destination directory to the installer)
  • Replace the value in the line beginning with DESC with "Meldware Communication Suite" including quotes
  • Replace the value in the line beginning with NAME with "run.sh" excluding quotes
  • Replace the value in the line beginning with DAEMON with "/opt/mcs/bin/$NAME" excluding quotes
  • Replace the value in the line beginning with DAEMON_ARGS with "-c meldware" excluding quotes
  • Replace the value in the line beginning with SCRIPTNAME with "/etc/init.d/meldware-cs" excluding quotes
  • save (ESC):wq
sudo chmod 755 /etc/init.d/meldware-cs
sudo ln -s /etc/init.d/meldware-cs /etc/rc3.d/S21meldware-cs
sudo ln -s /etc/init.d/meldware-cs /etc/rc6.d/K21meldware-cs
sudo ln -s /etc/init.d/meldware-cs /etc/rc4.d/S21meldware-cs 
  • start MCS
sudo /etc/init.d/meldware-cs restart
  • Additional documentation is available here

Image Gallery Server

  • For a comparison between Gallery1 and Gallery2 see here

Gallery1

Jak nainstalovat 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
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 ->
Jak nastavit Gallery1 to be accessible via Internet (Hostname or fix IP) or LAN (fix IP)
  • In this example:
The host's Internet URL is http://www.url.com
sudo cp /etc/gallery/config.php /etc/gallery/config.php_backup
gksudo gedit /etc/gallery/config.php
  • Nalezněte tuto sekci:
...
$gallery->app->photoAlbumURL = "http://localhost/gallery";
$gallery->app->albumDirURL = "http://localhost/albums";
...
  • Naraďte těmito řádky:
$gallery->app->photoAlbumURL = "http://www.url.com/gallery";
$gallery->app->albumDirURL = "http://www.url.com/albums";
  • Verify the gallery is accessible:
http://www.url.com/gallery/albums.php
Jak nastavit Gallery1 to be accessible via LAN (dynamic IP)
  • For this example:
the host running Gallery 1 is located on the LAN at (dynamic IP): 192.168.0.2
sudo cp /etc/gallery/config.php /etc/gallery/config.php_backup
gksudo gedit /etc/gallery/config.php
  • Nalezněte tuto sekci
...
$gallery->app->photoAlbumURL = "http://localhost/gallery";
$gallery->app->albumDirURL = "http://localhost/albums";
...
  • Naraďte těmito řádky
$gallery->app->photoAlbumURL = "/gallery";
$gallery->app->albumDirURL = "/albums";
  • Look for the gallery:
http://192.168.0.2/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

Jak nainstalovat Gallery2
Jak nastavit Gallery2

Jak nainstalovat Subversion version control server (with Apache support)

  • Nainstalujte Subversion and Apache 2 Module
sudo apt-get install subversion apache2 libapache2-svn
  • Enable Subversion/DAV Apache 2 Module
sudo a2enmod dav_svn
  • Configure Apache 2
sudo nano /etc/apache2/mods-enabled/dav_svn.conf

Edit the file to look something like this:

<Location /svn>
DAV svn
SVNPath /home/svn
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/apache2/dav_svn.passwd
Require valid-user
</Location>
  • Create Subversion Repository
sudo mkdir /home/svn
sudo svnadmin create /home/svn
  • Give Apache 2 Permissions to Repository
sudo chown -R www-data /home/svn
  • Create Repository User

Replace 'username' with your username

sudo htpasswd -cm /etc/apache2/dav_svn.passwd username

Enter password when prompted.

  • Restartujte Apache 2
sudo /etc/init.d/apache2 restart
  • Working with the new repository

Open a terminal window and paste:

svn checkout http://username@localhost/svn lucky

You will be prompted to enter the password. Now you have a working copy in the directory 'lucky'. Now lets create a file and commit it.

cd lucky
mousepad Hello.txt

Enter anything you like in the file and click save, Exit.

svn add Hello.txt

Now you added the file but it won't appear in the repository yet, you have to commit it. To commit, its as easy as doing the following:

svn commit

Now check your repository using the web browser at http://localhost/svn/.

Jak nainstalovat Subversion version control server (svnserve)

  • Nainstalujte Subversion and Internet services daemon
sudo apt-get install subversion xinetd
  • Create user that will own the repositories
sudo adduser --system --no-create-home --home /var/svn --group --disabled-login svn
  • Create directory that will hold the repositories
sudo mkdir /var/svn
sudo chown -R svn:svn /var/svn
  • Create file /etc/xinetd.d/svnserve with the following content
service svn
{
port = 3690
socket_type = stream
protocol = tcp
wait = no
user = svn
server = /usr/bin/svnserve
server_args = -i -r /var/svn
}
  • Restartujte xinetd
sudo /etc/init.d/xinetd restart
  • Create the first repository
sudo -u svn svnadmin create /var/svn/testrepo
  • It should be possible to check out the repository and work on it
svn co svn://localhost/testrepo

PhpGedView Server

PhpGedView allows you to view and edit your genealogy (family tree) on your website.

Jak nainstalovat PhpGedView Server

sudo apt-get install phpgedview

Jak nastavit PhpGedView with MySQL

gksudo gedit /etc/phpgedview/config.php

Edit /etc/phpgedview/config.php to reflect the following changes.

$DBTYPE = "mysql";
$DBHOST = "localhost";
$DBUSER = "phpgedview_my_family";
$DBPASS = "password_for_dbuser";
$DBNAME = "phpgedview_my_family";

I made $DBUSER the same as $DBNAME because it is easier to create user and database privileges using phpMyAdmin.

http://localhost/phpmyadmin

Log into phpMyAdmin as root with no password if you have not changed the root password for MySQL yet.

Click on "Privileges" (fourth from the bottom in the middle column).

Click "Add a new User".

Login Information
User name: [Use text field:] phpgedview_my_family (same as $DBUSER above)
Host: [Local] localhost
Password: [Use text field:] password_for_dbuser (same as $DBPASS above)
Re-type: password_for_dbuser (same as $DBPASS above)
Database for user
[x] Create database with same name and grant all privileges

Click "Go".

MySQL should now have your new PhpGedView user and database. Go back to phpMyAdmin's home page and "Reload privileges".

Add PhpGedView to Apache.

sudo ln -s /etc/phpgedview/apache.conf /etc/apache2/sites-available/phpgedview
sudo a2ensite phpgedview #equivalent to 'ln -s /etc/apache2/sites-available/phpgedview phpgedview'
sudo /etc/init.d/apache2 restart
gksudo gedit /etc/phpgedview/config_gedcom.php

Optionally edit /etc/phpgedview/config_gedcom.php to reflect the following changes.

$CONTACT_EMAIL = "you@yourdomain.com";
$WEBMASTER_EMAIL = "webmaster@yourdomain.com";
$HOME_SITE_URL = "http://localhost/phpgedview";
$HOME_SITE_TEXT = "My Family PhpGedVIew";

Create the initial administrator account for your new PhpGedView server.

http://localhost/phpgedview

Continue creating users, uploading your existing GEDCOM file, or start creating your family tree.

http://wiki.phpgedview.net/en/index.php/Installation_Guide


Troubleshooting

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

sudo cp /etc/default/rcS /etc/default/rcS_backup
gksudo gedit /etc/default/rcS
  • Nalezněte tento řádek
...
UTC=yes
...
  • Replace with the following line
UTC=no
  • Uložte editovaný soubor
  • Systém --> Správa --> Time and Date

Set the correct time/date

sudo /etc/init.d/hwclock.sh restart

Jak nastavit sound to work properly in GNOME

sudo killall esd
sudo cp /etc/esound/esd.conf /etc/esound/esd.conf_backup
gksudo gedit /etc/esound/esd.conf
  • Nalezněte tuto sekci
...
auto_spawn=0
spawn_options=-terminate -nobeeps -as 5
...
  • Naraďte těmito řádky
auto_spawn=1
spawn_options=-terminate -nobeeps -as 2 -d default
  • Uložte editovaný soubor
sudo apt-get install libesd-alsa0
gksudo 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
}
}
  • Uložte editovaný soubor
sudo ln -fs /usr/lib/libesd.so.0 /usr/lib/libesd.so.1
Systém --> Volby --> Sound
Sound preferences
General Tab --> Sounds for events (Un-Checked)
  • Save and close all opened applications, Reboot computer

How to forcefully empty Trash in GNOME

sudo rm -fr $HOME/.Trash/*

How to remove duplicate menu/menu items in GNOME

How to refresh Places menu in GNOME (if mounts to /media/ in /etc/fstab does not show up)

sudo /etc/init.d/dbus 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 --> Síť 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
gksudo 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
}
  • Uložte editovaný soubor
  • Create script to easily activate connection
gksudo 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
  • Uložte editovaný soubor
  • 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


Requests

If you have requests that you would like to be part of this guide, put them here.

  • How to connect to mobile phones.
  • How to connect to a mobile phone via infrared to use phone as an IR modem.
  • How to produce an update cd/dvd similar to the install cd which can be used as a repository
  • How to upgrade to new release from an ISO file (without burning)
  • How to enable bluetooth and bluetooth internet connection sharing
  • Jak nainstalovat SElinux on ubuntu 7.04 Server?
  • Jak nainstalovat (and use) a Intel 536ep modem?
  • How to enable sound on a Toshiba Satellite A110-103?
  • How to enable optical audio out via IEC958, aka. S/PDIF?
  • How to set up Spam Assasin to filter emails on a client machine?
  • How to emulate an iPod device when have just a simple MP3 player attached via firewire or USB device?
  • How to get a very simple text editor for the konsole that compares to MS-DOS EDIT style editors / Ncurses interface?
  • Jak nainstalovat low saxon support for feisty


Guide Development

Place ideas here to increase the look and performance of this guide.

  • Make headings (categories) stand out more visually.
  • Have entries under their headings in alphabetical order.
  • Try to keep the guide neat and clutter free.
  • Possible "Short Version" Table of contents without each "How to".
  • Thanks ;-)
  • Please add a [top] link to the end of each article....will improve navigation.A huge Thanx for this guide too....
See this.