* 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 #How to install Graphics Driver (NVIDIA) if you decide to install the proprietary driver.

* If you have the proprietary drivers from nVidia installed, please read #How to setup pivot (screen rotation) with proprietary NVIDIA drivers instead.

* 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):

* 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:

* 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:

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).
* In a terminal type

* Grave o ficheiro editado
* Add the pilot-applet to the Taskbar by Right-Clicking on an empty spot
* Siga as intruções que aparecem no ecrã

Hard Drive
Como listar a tabela de Partições

* Ler #Notas Gerais

sudo fdisk -l

* Também pode usar Sistema -> Administração -> Discos

Como mostrar a utilização do espaço de disco do sistema

* Ler #Notas Gerais

df -Th

* Também pode usar Sistema -> Administração -> Discos

Como listar os dispositivos/discos montados

* Ler #Notas Gerais

mount

Como re-montar o /etc/fstab sem reiniciar

* Ler #Notas Gerais

sudo mount -a

USB
Como listar dispositivos USB

* Ler #Notas Gerais

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:

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

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

* Ler #Notas Gerais

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

To setup a VPN Click the NetworkManager Icon in the tray VPN Connections->Configure VPN Use the defaults and be sure to check the box: Refuse EAP under the Authentication tab. To get my connection to work I also had to check Require MPPE Encryption under Compression & Encryption

* A Nice tutorial here

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

>> This section should probably be removed? Network manager w/ WPA support is standard in Feisty?

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

For Ubuntu:

sudo apt-get install network-manager-gnome

For Kubuntu (will install knetworkmanager):

sudo apt-get install network-manager-kde

Logout/Reboot.

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

If instead, you get a "The NetworkManager applet could not find some required resources. It cannot continue." message, then:

sudo gtk-update-icon-cache -f /usr/share/icons/hicolor

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

* Note: If you installed Kubuntu then installed ubuntu-desktop & network-manager-gnome, you may not be able to use network-manager in Gnome, if at all. In this case, you may have to use WPA Supplicant and do some manual editing of conf files to get WPA up and running.

* Note: When you first log into Gnome/KDE, the keyring application will ask for a password. Future revisions of Network-Manager should resolve this.

* 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:

sudo vi /etc/bind/named.conf.local

This is where we will insert our zones. By the way, a zone is a domain name that is referenced in the DNS server Insert this 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

* 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!

GNOME windows can support several different users simultaniously. Unlike vncviewer that just duplicates the current screen on a remote system, XDMCP allows several different users to login and run different GNOME sessions at the same time. So if you have a fast computer runing Ubuntu, several users can use their slow machines to login and run heavy applications only available on the fast machine.
How to turn on the XDMCP feature

To turn on the XDMCP feature on the fast computer, click the menu

Sistema -> Administração -> Login Window

In the Login Window Preferences dialog window, select

Remote Tab -> Style: Same as Local -> Close the dialog window -> Restart the PC

How to login from another PC running Ubuntu

1. Reboot the slow PC and stop at the login screen
2. Click Options at the lower left corner of the login screen
3. Select "Remote Login via XDMCP"
4. On the dialog window, type in the host name or ip of the fast computer you want to login to

Warning! Remote Desktop will only work if there's a GNOME login session
Leaving computer with an unattended GNOME login session is not secure
Use (System -> Lock Screen) and switch off the monitor when computer is left unattended

* If you have a router remember to open the appropiate port. The default one is 5900

This process is called port forwarding port forwarding

* Download DotNetVNC: Here or RealVNC Here

this is a free DotNet version that require the DotNet framework available from microsoft here
The RealVNC website was created and maintained by the original developers of VNC during their time at AT&T. RealVNC comes in Free, Personal, and Enterprise editions - the latter two costing money.

* Open the VNC client you have chosen, and insert the connection string formatted like this <LINUX BOX IP><:DESKTOP NUMBER>|<::PORT>

In example use: 192.168.1.2:0 or 192.168.1.2::5900 to connect to desktop 0, to connect to desktop 1 use 192.168.1.2:1 or 192.168.1.2::5901 and so on

Para aceder as opções do grub, siga as instruções no final do ecrá do grub.
Como desactivar o histórico no modo consola

* Ler #Notas Gerais
* Fonte: Gentoo Wiki:

rm -f .bash_history
gedit ~/.bash_profile

* Adicione as linhas seguintes:

export HISTFILESIZE=4
unset HISTFILE=5

Change this to a reasonable number of lines to save, I like to save only 100.

export HISTSIZE=100

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.
Como impedir as teclas Ctrl+Alt+Del de reiniciarem o computador no modo Consola

What: Quote from Wikipedia: "LoJack is an aftermarket vehicle tracking system that allows cars to be tracked by police after being stolen. The manufacturer claims a 90% recovery rate. The name "LoJack" is a play on the word "hijack," meaning the theft of a vehicle through force."

Why: If your laptop is ever stolen and connected to the Internet. You will be able to find out from what IP it connects to the Internet from and contact the authorities.

How:

* Get a free dynamic IP account from one of the many providers. Here we will use DynDNS.

* Install ddclient. In the section #How to assign Hostname to local machine with dynamic IP using free DynDNS service we installed the package ipcheck, here we prefer to use ddclient because it can get the IP from an external source on the Internet instead of getting it from a network adapter.

NOTE:
* Make sure that you use the web IP detection method.
* Specify your own user id instead of the place holder YourNameHere.
* Specify your own password instead of the place holder YourPasswordHere, make sure to surround it with single quotes.
* The last line should specify the hostname you registered with the dynamic IP service.

* You can now start the ddclient daemon, or wait until your next reboot.

sudo /etc/init.d/ddclient start

* The hostname you registered with your dynamic IP service should be updated. You can test it with the ping command:

ping YourHostNameHere.gotmyip.com

Even if your laptop has a firewall that prevents pings the hostname should resolve to the IP of the network gateway that your laptop is connected to.
Now all that is left is for someone to steal your laptop.....

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.
How to add Windows entry into GRUB menu

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.

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

sudo make
sudo checkinstall [accept defaults, set version to 3:0.cvs20060823-3.1ubuntu2]

If an application you are using employs FFMPEG to encode FLV, it should now work properly. You can also call FFMPEG directly from the command line. The extension/suffix of the outfile tells FFMPEG which audio or video format to encode to.

* Step By Step Synaptic Package Manager Tutorials with Screenshots
* Sistema -> Administração -> Synaptic Package Manager
* To enable the extra Universe and Multiverse repositories
1. Settings -> Repositories
2. In the Installation Media tab, click Add. There are three separate repositories; Dapper Drake, Security Updates and Updates. Select each repository and check Officially supported, Restricted copyright, Community maintained (Universe) and Non-free (Multiverse). Ensure you click OK between each repository to save your changes
3. You should now see those three repositories under Channels. Make sure Officially supported, Restricted copyright, Community maintained (Universe) and Non-free (Multiverse) appears under each repository

* To add backports and PLF (new versions of many applications. Unsupported. May contain illegal packages. Use at own risk.)
1. Settings -> Repositories
2. Click on Add and then Custom
3. Paste the following four lines into the box and click Add Repository, one line at a time:

* Ler #Como adicionar repositórios extra
* 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.
* Install 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 aptitude 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

* For more info go to CheckInstall home page and the Installing software on Ubuntu page. Autodeb uses a modified version of AutoApt to complete the entire process above including extraction from the .tar.gz file, however it is still in an early stage of development.

* Go to Sistema -> Preferencias -> 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)

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

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

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.

* 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

Note: 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

* Ler #How to install jedit

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

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

* Generate a /var/lib/locales/supported.d/local from /usr/share/i18n/SUPPORTED:

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 DVD's

* 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:
o Type: Application
o Name: Tile Windows Vertically
o 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"