Ubuntu:Feisty

From

(Redirected from Ubuntu Feisty)
Ubuntu?
Using the newest version of Ubuntu?
Go to the current guide
Kubuntu?
Using the newest version of Kubuntu?
Go to the current guide


Image:Ubuntuguide_logo.png


Ubuntu 7.04 (Feisty Fawn)

Ubuntu 7.04 (Feisty Fawn) was released on April 19th, 2007 and is no longer supported. It is recommended to upgrade to the current version of Ubuntu.

This guide was started by Chua Wen Kiat (Kuala Lumpur, Malaysia). It is now being maintained by the Linux Center of University of Latvia, and everyone else who is willing to contribute.

This guide can be discussed at the official UbuntuGuide.org Forum at ubuntuforums.org. Stop by and join the discussion.


To edit pages you need to register

If you have any suggestions for new tips discuss them at Talk page

If you have any questions about the wiki, send us an e-mail to ubuntuguide -at- ubuntuguide.org

MikrobartOrvilsQuashJiyuu0CargoGabemorrBytecopekrampoSimosStubbyeljacoshaiThunderMHasileadammichaelroachBelisarivsCheatorHankTamalKaotikssoniahKutanMehdirichuxShadymanHavarillfr0zen_penguinLouisShadymanshanlot751EtienneRabid9797Mantas Smelevičiusperspectoffphloseadogsmalugo2debugPakosRedBassCyberAngelCogeeldineroycorreAlgimantasBucinskasUficAntidrugueVahidLouis KingRsinghBorut-TCinglallsTownrayANtuMaLaMpete alleboneGreenstarThe TurkRonBCompotatojoMbrasigma80EnlightenedswineKarthikeyanemorrp1Th0rv4ldjspanglerSevoirForainand other friends of our community edit


Newer Versions

  • Ubuntu 7.10 (Gutsy Gibbon) was released October 18, 2007, and is Feisty+1 (the very next release after Feisty).
  • Ubuntu 8.04 (Hardy Heron) is a LTS (Long Term Support) version, released on April 24, 2008, and will be supported with security updates for five years on the server and three years on the desktop.
  • For all versions of Ubuntu, see the Main Page.

Older versions

If you are using an outdated version of Ubuntu, you should consider updating it to Feisty. There have been considerable improvements to this version, and the updater used in Feisty will ease transitions to future versions. If you are in a production environment, or if everything works perfectly for you, you may wish to stay with a Long-Term Support (LTS) version.

To upgrade an outdated version or update your current version, read #Updates and Upgrades.

Full list of all the subpages: Ubuntu:Feisty/TOC

Contents


General Notes

  1. This is an Unofficial Ubuntu 7.04 (Feisty Fawn) Starter Guide. It is neither associated with Ubuntu nor with Canonical Ltd.
  2. This guide can be discussed at the official UbuntuGuide.org Forum at ubuntuforums.org. Stop by and join the discussion.
  3. If you see a bluish box, this means you have to execute the commands in Terminal mode (Applications -> Accesories -> Terminal) or use the content of that box as mentioned in some other instructions.
  4. To reduce typo mistakes, copy and paste the commands into Terminal mode (right click on the commands -> "Copy" or "Paste". You can also use Ctrl+C to copy and Shift+Insert to paste it)
  5. "sudo" means substitute user do. "sudo" will prompt for your "Password:". Please specify your user password. You could for example substitute for anouther user on your system - eg sudo -u peter <command> would run a command as user peter on your system.
  6. If you want more information about any command, simply look at the manual page for it using the "man" command. For example, "man sudo" will display the manual page for the "sudo" command.
  7. If you are tired of typing "apt-get" all the time, use the synaptic package manager, a front end to apt-get.
  8. "aptitude" and "wget" requires Internet connection to install/update/download programs
  9. All references to "aptitude" will be replaced with "apt-get". You may still use "aptitude" if you wish, however could cause dependency issues.
  10. To download a file, right click on the link -> Select "Save Link As..." -> Make sure file name and extension are correct
  11. If you wish to help translating Ubuntu to your native language or to help Ubuntu otherwise visit https://launchpad.net/
  12. May the "humanity to others" spirit be with you always .....


If you are using 64-bit version replace any "i386" with "amd64"

Are there other *buntu guides?


Desktop environments

Where to view Ubuntu screenshots / screencast

This is the Gnome based desktop environment, which is the default for Ubuntu.

Where to view Kubuntu screenshots / screencast

This is the KDE based desktop environment. See Kubuntuguide.org.

How to install KDE (Kubuntu)

sudo apt-get install kubuntu-desktop

The system will ask you if you want to use kdm or gdm. gdm is recommended.

System -> Quit -> Log Out
Sessions: KDE

How to uninstall KDE (Kubuntu)

If you used aptitude to install Kubuntu:

sudo aptitude remove kubuntu-desktop

If you did not use that command, then see this tutorial.

Where to view Xubuntu screenshots / screencast

This is the minimalist XFCE based desktop environment. It works best on PCs with minimal memory and/or slow RAM. See Xubuntuguide.org.

How to install XFCE (Xubuntu)

sudo apt-get install xubuntu-desktop

The xubuntu gdm theme will be set as the default.

System -> Quit -> Log Out
Sessions: XFCE

How to uninstall Xfce (Xubuntu)

If you used aptitude to install Xubuntu:

sudo aptitude remove xubuntu-desktop

If you did not use that command, then see this tutorial.

Where to view Ubuntu Studio screenshots

Ubuntu Studio is a desktop environment oriented towards multimedia usage.

Where to view Ubuntu Enlightenment Window Manager screenshots

This is a special-effects oriented desktop environment, with features from both the Gnome and KDE environments.

How to install FluxBox

Fluxbox is a popular minimalist Window Manager. For more info see the Screenshots.

sudo apt-get install fluxbox menu
  • Start Fluxbox from GDM:
echo "exec startfluxbox" > ~/.xinitrc
  • Change the login sound:
sudo apt-get install sox
gksudo gedit ~/.fluxbox/startup

Find this line:

exec /usr/local/bin/fluxbox

Put this above it somewhere:

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

How to install Blackbox

  • Blackbox is a lightweight desktop environment. It is not updated frequently. See the Blackbox Wiki for more info.
sudo apt-get install blackbox menu

How to change the USplash Screen when you boot or shutdown the computer

When you add another Desktop Environment, the USplash screen may change (saying Kubuntu instead of Ubuntu). If you want to change it, do the following:

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

This will bring up a list of installed USplash screens. Type the number that corresponds to the one you want and press Enter. Then type:

sudo dpkg-reconfigure usplash

Then reboot.

Where to look for style elements for your desktop

How to configure GLSlideshow

  • GLSlideshow is a screensaver that shows your images in a slideshow with smooth panning and fading. To enable it:
System-->Preferences-->Screensaver-->GLSlideshow
  • Feisty doesn't offer a way to edit the directory for the images graphically. To set the image directory create a file called .xscreensaver in your home folder (if it doesn't exist allready) and place the key 'imageDirectory: /path/to/your/pictures' in it. You might also want to add the key 'chooseRandomImages: True'.

If you had a preview running while editing you'll have to reset GLSlideshow by selecting another screensaver and the reselecting it.

cd ~
echo "imageDirectory:	/path/to/your/pictures" >> .xscreensaver
echo "chooseRandomImages:   True" >> .xscreensaver
  • You can edit the behaviour of GLSlideshow using the file /usr/share/applications/screensavers/glslideshow.desktop. Where it (usually) says 'Exec=glslideshow -root' you can set options by adding parameters which control things like how long every image should be shown, how much you want to have it move or how long the transition between pictures should be. GlSlideshow has it's own manpage where all the options can be found (man glslideshow). However, these changes can only be done as root!

And again, if you had preview running it will only show these changes after having selected another screensaver and reselecting

sudo gedit /usr/share/applications/screensavers/glslideshow.desktop
    find the line where it says Exec=glslideshow -root and replace it with something like
Exec=glslideshow -root -duration 16 -pan 6 -fade 6 -zoom 60

Using gksu vs. sudo

Commands (in the command line terminal) that require administrator or root privileges must be preceded by sudo, or the graphical version, gksu. For most uses, the commands are interchangeable and either can be used.

However, there are some subtle differences. Specifically, gksu launches with the root configuration files, while sudo launches with the user's configuration files.

Here is a nice discussion. This discussion recommends gksu for all uses except when a purely command line environment is being used, such as when there is no desktop environment installed. In that case use sudo.

In this guide, both are used. When commands are applicable to both the server-only versions of Ubuntu as well as the desktop versions, sudo is used. However, in a Gnome desktop environment, gksu can usually be substituted.

(Note: gksu is the version of sudo for use in Gnome, the default desktop for Ubuntu. For Kubuntu (KDE) users, use kdesu instead.)

How to run commands in the command line terminal

  • This is for Gnome. Start up the command line terminal:
Applications-->Accessories-->Terminal
  • If you do not see the Terminal menu item, then add it to your menu:
Right click Applications-->Edit menus-->Accessories-->Terminal (checked)

3-D Desktops

Compiz / Desktop Effects

  • In Feisty, Compiz has been installed. It is still experimental, though, and many effects do not work for many users.
  • To access some effects from the menu:
System--> Preferences --> Desktop Effects
  • To change the compiz configuration (not recommended at this time):
  • Enable the Configuration Editor menu item:
Right Click Applications-->Edit Menus-->System Tools-->Configuration Editor (checked)
  • Run the Configuration Editor:
Applications-->Edit Menus-->System Tools-->Configuration Editor
apps-->compiz--> ??

OpenCompositing: Beryl and Compiz

Beryl has been discontinued as of March 2007, but is still supported. Beryl and Compiz are being (re-)merged, under the OpenCompositing banner. Visit OpenCompositing.org for more info. Compiz is installed by default in Feisty. A full installation guide with specific instructions for nVidia, ATI, and Intel graphics card can be found at the Compiz documentation site. Instructions for obtaining the newest version are available at Compiz Ubuntu Installation Guide.

  • If compiz is not installed, install it from Synaptic Package Manager or from the command line terminal:
gksudo apt-get install compiz

How to install Compiz Fusion (Universal)

https://help.ubuntu.com/community/CompositeManager/CompizFusion

Reboot.

  • If any plugins fail or freeze, Restart X (Ctl+Alt+Backspace) and then disable them from the (System->Preference->CompizConfig Settings Manager). Alternatively, do so by pressing (Alt+F2) and typing "ccsm".
  • If this does not fix the problem, Reboot.
  • You should have 512 MB RAM and an acceptable graphics card.
  • TO check your graphics card, type:

glxinfo | grep direct

in a terminal, and see if it says

direct rendering: Yes

  • Misc: PaintFire is (Super [Windows, Mac Apple Key] + Alt + Mouse, and Super + Alt + C to clear)

--- Background Info: Compiz Fusion is eyecandy that puts Mac OSX and Vista Ultimate to shame.

To start compiz fusion at startup, goto System->Preferences->Settings click "Add" and type "compiz --replace".

The Wikipedia Entry: http://en.wikipedia.org/wiki/Compiz_Fusion

The Home Page: http://compiz.org/

Problems: As with all software, there are compatibility issues and freak accidents. This could hurt your computer, fair warning. As a trend though, Compiz Fusion has turned out to be a lot more stable than Beryl or Compiz. I will say that the guide above and Forlong's Blog have been 200% more successful than many others I have followed.

The first problem everyone has is Video. That's fine; http://thedarkmaster.wordpress.com/2007/08/10/solving-video-playback-problems-in-compiz-fusion-beryl/ it includes fixes for Totem/GStreamer, VLC, MPlayer, Xine/Kaffeine etc..

The most annoying problem I've had with Compiz Fusion was it maxing out CPU usage. The problem turned out to be emerald, but that was only after I reinstalled and reconfigured the desktop-effects app as well as all of the compiz files. This guide

(http://forlong.blogage.de/article/2007/8/26/The-best-way-to-install-Compiz-Fusion-on-Ubuntu-Feisty) is much more in-depth comprehensive than the first one that I posted, but requires thinking. It does mention sexy-python, a package for getting cooler buttons. It lets you have more understanding of what is happening and therefore offers more flexibility. If you're not in a hurry, this would be the ideal way to install Compiz Fusion.

OK. If you run into the situation when you know you got all of the right drivers, graphics card, RAM amount, CPU power, and everything else but you still can't get Compiz Fusion to work after searching all of Google and http://ubuntuforums.org; goto Synaptic and search "compiz". Uninstall everything. Search "emerald" and do the same. Follow the above Forlong's blog CAREFULLY again. And if the desktop-effects package is accidentally uninstalled, reinstall it.

A common bug link is posted. This involves no cube and or only one desktop. Read all associated bugs to pinpoint your needs; https://bugs.launchpad.net/ubuntu/+source/desktop-effects/+bug/89786.

    • When using Compiz Fusion for the first time, I found it much better to run the "compiz --replace" and the "emerald --replace" commands separately. If this will not work for you, combine them as "compiz --replace -c emerald --replace&"


How to install Beryl (ATI)

Please note: There are 2 ways of installing Beryl for ATI Cards: one using open source modules and one using proprietary modules. Try the open source method first; uninstall steps are listed in case it does not work, or if you would like to try the proprietary drivers instead, afterwards. (They may have better frame rates and may support your card better.)

Install Beryl using Open Source drivers
  • This works on a 64 bit system as well
  • This works with older ATI cards
  • This method uses the open source radeon drivers.
  • This method uses AIGLX. If direct rendering is not working for you yet, rendering will be slow until you can get that up and running.
deb http://ubuntu.beryl-project.org/ feisty main 
  • Add the GPG key for the repository and update the packages list:
wget http://ubuntu.beryl-project.org/root@lupine.me.uk.gpg -O- | sudo apt-key add - 
gksudo apt-get update
  • Make a backup copy of your xorg.conf configuration file then edit it:
cp -p /etc/X11/xorg.conf /etc/X11/xorgold.conf
gksudo gedit /etc/X11/xorg.conf 

Under "Module" section, make sure that the following lines are included (add them if they are not):

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

Make sure these lines are at the end of the file:

Section "DRI"
 Mode 0666
EndSection
  • Reboot. (Don't restart X only. I had odd things happen to me when I skipped rebooting.)
  • Install the beryl window manager:
gksudo apt-get install beryl beryl-manager
beryl-manager --no-force-window-manager

This will start beryl but wont activate it yet.

  • Change the setup to include AIGLX:
Right click on the diamond near the clock-->Advanced Beryl Options
Window Manager: Metacity(GNOME)
Rendering Path: copy
Advanced-->Change Rendering Platform: AIGLX.
  • Right click the diamond-->Select Window Manager: Beryl

If it all works and you can spin the cube ok, etc., then change the rendering path back to automatic.

If it doesn't work properly, reboot and re-start beryl:

beryl-manager --no-force-window-manager
  • Make Beryl start automatically at boot:
System-->Preferences-->Sessions 
New: beryl-manager

Reboot.

Uninstall Beryl (open source installation)
  • If the open source installation method did not work, revert by following these steps:
Drop to console outside GUI. Type:
rm ~/.config/autostart/beryl-manager.desktop

This removes beryl from startup.

Copy your originally saved xorg.conf file back.
gksudo cp -p /etc/X11/xorgold.conf /etc/X11/xorg.conf
Reboot.
  • Run the nautilus file browser. Show hidden files. Browse to your user's home directory and delete the .beryl and .emerald folders, and the .beryl-managerrc file.

This can be done from the command line as well:

rm -r ~/.beryl
rm -r ~/.emerald
rm ~/.beryl-managerrc
  • Remove the beryl packages:
gksudo apt-get remove beryl beryl-manager emerald-themes
gksudo apt-get autoremove
  • Remove the repository.
Install Beryl using proprietary FGLRX drivers from ATI
  • The ATI fglrx driver will not support the built-in Compiz features in Ubuntu. Install Xgl to run the new version of Beryl with an ATI card:
gksudo apt-get install xserver-xgl
  • Write a script so Xgl can start on its own:
gksudo gedit /usr/local/bin/startxgl.sh

Enter and save this script information:

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

If you are missing your shutdown and restart buttons, use this instead:

#!/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
  • Make the script executable:
gksudo chmod a+x /usr/local/bin/startxgl.sh
  • Put in an Xgl option in the GDM login screen:
gksudo gedit /usr/share/xsessions/xgl.desktop

Enter and save this script information:

[Desktop Entry]
Encoding=UTF-8
Name=GNOME with XGL
Comment=
Exec=/usr/local/bin/startxgl.sh
Icon=
Type=Application
  • Make this script executable:
gksudo chmod a+x /usr/share/xsessions/xgl.desktop
  • Disable the universe repositories (these provide Beryl software that is incompatible with the fglrx driver):
System > Administration > Software Sources 
Uncheck Community-maintained Open Source software (universe)
  • Add the correct repository key:
gksudo wget http://ubuntu.beryl-project.org/root@lupine.me.uk.gpg -O- | sudo apt-key add -
deb http://ubuntu.beryl-project.org/ feisty main
  • Add the GPG key for the repository and update the packages list:
wget http://ubuntu.beryl-project.org/root@lupine.me.uk.gpg -O- | sudo apt-key add - 
gksudo apt-get update
  • Install Beryl:
gksudo apt-get install beryl
  • Install your ATI drivers (if needed):
System > Administration > Restricted Drivers Manager
Enable: ATI graphics card

Reboot.

  • Choosing Xgl from the Sessions list at your login screen. Then test Beryl:
beryl-manager
emerald --replace
Right-click on the black diamond next to the clock-->Select Windows Manager: Beryl
Select Windows Decorator: Standard Beryl Decorator (Emerald)
Reload
  • If you are using ATI with XGL, you'll may get an error that beryl-xgl is missing. Download beryl-core:
wget http://ubuntu.beryl-project.org/pool/feisty/main/0.2.0/beryl-core_0.2.0~0beryl1_i386.deb

Unpack beryl-xgl to ~/Desktop and copy the module to the appropriate directory:

gksudo cp ~/Desktop/beryl-xgl /usr/bin/beryl-xgl
  • If you are having problems with multiple users in XGL,see this thread.
  • Add Beryl and the Emerald themes to your start-up programs:
System > Preferences > Sessions
New-->Name: Beryl
Command: beryl-manager

New-->Name: Emerald Theme
Command: emerald --replace

  • Re-enable your universe repositories, but make sure you do not let it update anything related to Beryl.
How to install Beryl (Nvidia)
  • Back up xorg.conf:
gksudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup
gksudo gedit /etc/X11/xorg.conf
  • Install Nvidia Driver for Graphics Card:
System -> Administration -> Restricted Driver Manager
Enable: Nvidia Drivers

Restart X-Windows and confirm Nvidia Drivers are working correctly.

  • Install Beryl:
gksudo apt-get install beryl emerald-themes beryl-manager
  • Start Beryl:
beryl-manager
  • Start Emerald (if it doesn't start on its own):
emerald --replace
  • Load Beryl and Emerald automatically load at login:
System -> Preferences -> Sessions
Startup Programs -> New: beryl-manager
Startup Programs -> New: emerald --replace
  • Reboot.
  • If program menus aren't displaying in the correct layer (you can't see them when you select them because they are displaying behind the window):
Right click on the Beryl Manager icon-->Reload Window Manager

The problem should be solved the next time you reboot.

  • If your windows have no title bar (with the minimise, maximise and close buttons) or borders, edit /etc/X11/xorg.conf configuration file:
gksudo gedit /etc/X11/xorg.conf

Add this line to the Device section:

Option "AddARGBGLXVisuals" "True"

and change the Screen section to:

DefaultDepth 24  

(See this page for more details.)

  • If you are using a NVIDIA GeForceGo graphics card you may also need to add to the Device section of /etc/X11/xorg.conf:
Option "DisableGLXRootClipping" "True"
  • If that still doesn't help then right click on the beryl diamond icon by the clock and select
advanced beryl options-->rendering platform: force AIGLX
What to do if Video players crash while using Beryl
  • See bug 96226
  • You will need to change video driver from xv to x11 in ~/.mplayer/config and gstreamer-properties.
How to fix black windows during video playback
  • There is a workaround to this bug by changing the video output device on your video player to x11/xshm. (Note that this will decrease the quality of the video output and requires a lot more CPU.)
  • For gstreamer-dependent players (Totem, etc.):
gstreamer-properties
Video-->Default Video Plugin: X Window System (No Xv)

Click Test to verify that video playback is working (you should be able to see the standard TV testing colour stripes).

  • For VLC player(if installed):
VLC-->Settings-->Preferences
Video-->Output modules-->Advanced: X11
  • For MPlayer (if installed):
Mplayer-->Right-click on the screen-->Preferences
Video-->Available Drivers: X11 (XImage/Shm)

Some users report that MPlayer may not be able to show videos in full screen.

  • For Xine player (if installed):
Xine-->File-->Configure-->Preferences
experience_level: Master Of The Known Universe
Video-->Driver: xshm 
  • For RealPlayer (if installed):
RealPlayer-->Tools-->Preferences
Hardware-->Deselect: Use XVideo


How to improve sub-pixel font rendering for Feisty
  • This will improve the appearance of fonts.
  • The patched libraries are built against Freetype 2.3.x (not currently in Feisty) and include David Turner's sub-pixel rendering patches.
deb http://www.telemail.fi/mlind/ubuntu feisty fonts
deb-src http://www.telemail.fi/mlind/ubuntu feisty fonts

Add the repository keys:

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

Add the repository keys:

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

Note: 25th July 2007 - This repository doesn't work.

  • Install the font packages
gksudo apt-get update
gksudo apt-get install libfreetype6 libcairo2 libxft2
  • Reconfigure font settings. The following settings work well: Native, Automatic, No bitmapped fonts.
gksudo dpkg-reconfigure fontconfig-config
gksudo dpkg-reconfigure fontconfig

Note: If you later decide to go back to Ubuntu packages, you must downgrade all three installed packages. For more info: see here.

How to configure GLSlideshow
  • 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.
How to install Compiz-Fusion (a Compiz-Beryl fusion)
deb http://download.tuxfamily.org/3v1deb feisty eyecandy
deb-src http://download.tuxfamily.org/3v1deb feisty eyecandy
  • Add the GPG key:
wget http://download.tuxfamily.org/3v1deb/DD800CD9.gpg -O- | sudo apt-key add - 
  • Reload sources:
gksudo apt-get update
gksudo apt-get -y upgrade
  • Back-up your /etc/X11/xorg.conf file and edit it:
cp -p /etc/X11/xorg.conf /etc/X11/xorgold.conf
gksudo gedit /etc/X11/xorg.conf 

Under the Module section "Module", include the following lines, if they are not already there:

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

Also ensure the bottom of the file has:

Section "DRI"
 Mode 0666
EndSection

Reboot the system (Don't restart X only. This gives problems).

  • Install Compiz for Gnome:
gksudo apt-get -y install compiz compiz-gnome compizconfig-settings-manager compiz-fusion-plugins-extra libcompizconfig-backend-gconf

or

Install Compiz for KDE:

gksudo apt-get -y install compiz compiz-kde compizconfig-settings-manager compiz-fusion-plugins-extra libcompizconfig-backend-kconfig
  • Run Compiz:
compiz --replace
How to install Compiz (Nvidia)

Project Looking Glass

This is a 3-D window manager based on Java technology.



Updates and Upgrades

Upgrade Ubuntu Edgy to Ubuntu Feisty

  • Method 1:
sudo apt-get dist-upgrade
  • Method 2:

Upgrade from Dapper Drake to Edgy Eft to Feisty Fawn

  • Method 1: System-->Administration-->Update Manager. You can upgrade from Dapper to Edgy. Once you have done the upgrade to Edgy, then repeat the process to upgrade from Edgy to Feisty. Do not upgrade directly from Dapper to Feisty -- your system will fry (the fried feisty fawn OS).
  • Method 2: Read Upgrade from Ubuntu Dapper or Edgy to Feisty Fawn

Enable automatic updates

  • Enable automatic updates from the menu:
System-->Administration-->Software Sources-->Updates

Select Important Security Updates and Recommended Security Updates and any other desired updates. Choose frequency of updates.

How to manually update Ubuntu

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
  • From the menu:
System -> Administration -> Update Manager

Adding new programs

How to add extra repositories

Using menus

  • Choose distribution-friendly repositories. These are part of the Ubuntu distribution system. This is the recommended method.
System-->Administration-->Software Sources

Check the repositories you think you will need (main, universe, restricted, multiverse). You probably won't need the 'sources' repository.

  • Add any third-party repositories. Such repositories are not monitored in any way. Some are quite popular, however. Use any third-party repository at your own risk.
System-->Administration-->Software Sources-->Third-party software-->Add

Add the name of your repository. In this example, we will use Medibuntu, a popular third-party repository not affiliated with Ubuntu in any way.

APT line: deb http://packages.medibuntu.org/ feisty free non-free
  • Download any needed gpg keys and add them to the keylist. This key verifies the repository to your system. The Medibuntu repository (not affiliated with Ubuntu) example is shown:
wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add -

Manually edit sources.list

  • Manual updates are at your own risk. Mixing incompatible repositories can break your system.
  • Create a backup of your current list of sources, overwriting any previous backup.
sudo cp -i /etc/apt/sources.list /etc/apt/sources.list_backup
  • Use a text editor (gedit or nano) to edit the sources list:
gksudo gedit /etc/apt/sources.list
  • Edit the repositories in the sources.list similar to this template:
To use your local mirror you can add "cc." before archive.ubuntu.com, where cc = your country code
e.g. deb http://lv.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.

## Add comments (##) in front of any line to remove it from being checked.   
## Use the following sources.list at your own risk.  

## Uncomment deb-src if you wish to download the source packages

## If you have a install CD you can add it to the reposity using 'apt-cdrom add'
## which will add a line similar to the following:
#deb cdrom:[Ubuntu 7.04 _Feisty Fawn_ - Beta i386 (20070322.1)]/ feisty main restricted
deb http://us.archive.ubuntu.com/ubuntu/ feisty main restricted
#deb-src http://us.archive.ubuntu.com/ubuntu/ feisty main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ feisty-updates main restricted
#deb-src http://us.archive.ubuntu.com/ubuntu/ feisty-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://us.archive.ubuntu.com/ubuntu/ feisty universe
#deb-src http://us.archive.ubuntu.com/ubuntu/ feisty universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ feisty multiverse
#deb-src http://us.archive.ubuntu.com/ubuntu/ feisty multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ feisty-backports main restricted universe multiverse
#deb-src http://us.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 REPOSITORY (Unsupported.  May contain illegal packages.  Use at own risk.)
## 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

## CANONICAL COMMERCIAL REPOSITORY (Hosted on Canonical servers, not Ubuntu
## servers. RealPlayer10, Opera, DesktopSecure and more to come.) 
deb http://archive.canonical.com/ubuntu feisty-commercial main

## enlightenment e17 beta, use at your own risk
## E17 is in Beta and may break or break your system
#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

  • Download any needed gpg keys and add them to the keylist. The Medibuntu repository (not affiliated with Ubuntu) example is shown:
wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add -

Here is another example using the Enlightenment repository (not affiliated with Ubuntu):

wget -q http://lut1n.ifrance.com/repo_key.asc -O- | sudo apt-key add -
  • Refresh packages list:
sudo apt-get update

Adding a CD-ROM or DVD repository

  • How to add the (k)ubuntu CD or DVD as a repository for sources.list

Insert the CD or DVD and in the terminal write:

sudo apt-cdrom add

Adding programs from the GUI menu

Add/Remove Programs

Using the Add/Remove feature is very easy and it will not damage your Ubuntu installation.

Applications-->Add/Remove...
  • Search for the sort of program you want to add. Example: type MP3 to see a list of mp3 software.
  • Check the box next to the software.
  • Click the "Apply" button.
  • It will show you a list of the software packages that it will install. Click OK.

Synaptic Package Manager

Synaptic Package Manager provides access to many more programs and modules than does Add/Remove programs. It installs programs with their associated dependencies, and does so with a very usable GUI interface. It is the standard method of adding packages in Ubuntu.

System-->Administration-->Synaptic Package Manager
  • Search for the sort of program you want to add. Example: type MP3 to see a list of mp3 software.
  • Check the box next to the software.
  • Click the "Apply" button.
  • It will show you a list of the software packages that it will install. Click OK.

Automatix2

Warning: Automatix2 is a proprietary script that tries to install some software, and is known to fail and break systems. The Ubuntu community WILL NOT provide support for it, and strongly discourages its use. Problems caused by Automatix are often hard to track and solve, and it may result in having to reinstall your entire Ubuntu system. Ubuntu/debian developers have reviewed automatix and found it to be quite dangerous. See the review here. Use Automatix at your own risk.

Some users report successful use when installing it right after a fresh install of Ubuntu, with no Adept or Synaptic package update, or any other software installed. The apt-get method may be less prone to mishaps, but use at your own risk.

Obtain the latest package here.

  • For normal (i386) systems, get this package:
http://www.getautomatix.com/apt/dists/feisty/main/binary-i386/automatix2_1.1-4.7-7.04feisty_i386.deb
  • Install with this command:
sudo dpkg -i automatix2_1.1-4.7-7.04feisty_i386.deb
  • For amd64 systems, get this package:
http://www.getautomatix.com/apt/dists/feisty/main/binary-amd64/automatix2_1.1-4.6-7.04feisty_amd64.deb
  • Install with this command:
sudo dpkg -i automatix2_1.1-4.6-7.04feisty_amd64.deb
  • Automatix2 is available in Applications > System Tools > Automatix
Install Automatix using apt (alternate method)
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

Add programs from a command-line menuing program

Some users do not have a desktop environment but desire a menu for installing programs. They can access a menu by typing from the command-line:

aptitude

They can then choose programs from their repositories.

Add programs from the command line

Command line users who do not use aptitiude can enter commands directly using apt-get. This is the most common method for installing Linux programs from the command line. Most program installation/removal must be done with root user privileges, so sudo (or gksudo) must be entered first:

sudo apt-get install <packagename>

Removal commands are similar:

sudo apt-get remove <package-name>

Incompletely installed packages can be repaired:

sudo apt-get install <package-name> --reinstall

For more info see the official APT guide here.




Add-On Applications

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.

Handling ".tar.gz" (Tar/GZip) Archives

To extract:

tar xvzf package.tar.gz

Note: tar extracts files from an archive. It cannot decompress them. -x means extract. -v means verbose (with a list of what is extracted). -f specifies the file to use. -z means filter through gzip. (gzip compresses/decompresses the archive, not tar.) Alternatively, you could decompress a package (ending in .gz) first by using the command gzip, then extract the resulting .tar file. You would then not have to specify the -z switch.

To create:

tar cvfz package.tar.gz folder

Handling ".tar.bz" (Tar/BZip) Archives

To extract:

tar xvjf package.tar.bz

To create:

tar cvjf package.tar.bz folder
  • Extracting ".bz" Archives
bunzip2 file.bz
  • Extracting ".gz" Archives
gunzip file.gz

Handling ".7z" (7-Zip) Archives

To install:

sudo apt-get install p7zip-full

To list files in archive:

7z l file.7z 

To extract files in archive:

7z x file.7z 

How to compile a program from source code

Make sure you have all the neccesary development tools (i.e. libraries, compilers, headers):

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

"uname -r" lists the current kernel you are using.

Extract your package (as detailed above)

tar xvzf package.tar.gz

Commence the build (compiling) process:

cd /path/to/extracted/package
./configure
make
make install

(Note - typing ./ before a filename tells unix to execute the file as an application.)

Create an Ubuntu (Debian) package (.deb)

Install package tools:

gksudo apt-get install checkinstall

Rebuild package using "checkinstall":

cd /path/to/extracted/package
./configure
make
checkinstall

Keep the resulting ".deb" file for future use. It can be installed using:

gksudo dpkg -i package.deb

Note: These are basic instructions that may not always work. Some packages require additional dependencies and optional parameters to be specified in order to build them successfully.

Utilities

How to handle rar files

sudo apt-get install unrar

How to install WinRAR

sudo apt-get install rar

(This is a 30 day trial, but you can click 'maybe later' and continue using WinRAR.)

How to install an IP address calculator

Gip is an IP address calculator that integrates with the Gnome desktop.

How to install Firefox Widgets

Firefox Widgets improves Firefox's components (such as buttons, radio buttons, text boxes, text areas, and many others) by making them look much cleaner and better.

Keeping your clock synchronized with time servers

  • From the menu:
System-->Administration-->Time and Date
  • For single synchronization, click 'Synchronize Now'.
  • To keep synchronized with an Internet Time Server:
Configuration: Keep synchronized with internet time servers
Install NTP support (when prompted)
  • To manually install the ntp package (which synchronizes with internet time servers) (instead of above method):
sudo apt-get install ntp

You do not need to configure anything if you install ntp from the command line, as it automatically sets itself up to update with Ubuntu's clock.

  • To immediately synchronize the clock:
Right click on the panel clock-->Adjust Date and time

How to Set Flickr Images as Ubuntu Feisty Wallpaper

  • (Warning: This is a private website and is not affiliated with Ubuntu, Flickr, or any known official repository. These instructions direct you to download and install a private program. Use at your own risk.)
  • For more info: Webilder website
  • Edit /etc/apt/sources.list file:
gksudo gedit /etc/apt/sources.list	 
  • and add these lines to the end of it:
deb http://debian.websterwood.com/ feisty main	 
deb-src http://debian.websterwood.com/ feisty main	 
sudo apt-get update	 
  • If your are using the Gnome Desktop then run this command:
sudo apt-get install webilder webilder-gnome	 
  • If you are using the KDE Desktop then run this command:
sudo apt-get install webilder webilder-kde	 
  • Right-click on the GNOME panel and choose "Add to Panel"
  • Under "Utility" near the bottom, you need select "Webilder Webshots Applet" and click on "Add"
  • You should see one small camera icon added to your desktop panel
  • Right-click on Flickr and select "Preferences" to edit it.

Official Website: http://www.flickr.com/

Please click for features and photos of the installation process

Browser plug-ins

How to install Java J2SE Runtime Environment (JRE) with Plug-in for Mozilla Firefox

  • Read #General Notes
  • Read #How to add extra repositories
  • (Note: The sun-java6 and sunjava6-plugin modules are also automatically installed as part of the ubuntu-restricted-extras meta-package. You can install ubuntu-restricted-extras instead, using the Synaptic Package Manager (or by using apt-get install from the command line terminal). This will install not only Sun Java but also Adobe Flashplayer, msttcorefonts (Microsoft fonts), and some multimedia codecs as well.)
  • Install using command line:
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
  • There's no 64-bit firefox plugin for AMD64. A 32-bit firefox is necessary. Ubuntuforums provides special scripts for configuring some 32-bit applications in amd64.
  • An alternative for amd64 is to use blackdown Java. However it is buggy and not all Java applications work. It is also a closed source application. It has been the default Java application for distributions like Gentoo, however.
sudo apt-get install j2re1.4-mozilla-plugin 

This installs blackdown Java.

How to install Flash Player (Macromedia Flash) Plug-in for Mozilla Firefox

  • There is a free open source Flash replacement called GNASH (see below). This can be used instead of Flash.
Install using Synaptic Package Manager or apt-get
  • (Note: The flashplugin-nonfree module is also automatically installed as part of the ubuntu-restricted-extras meta-package. You can install ubuntu-restricted-extras instead, using the Synaptic Package Manager (or by using apt-get install from the command line terminal). This will install not only Adobe Flashplayer but also msttcorefonts (Microsoft fonts), Sun Java, and some multimedia codecs as well.)
System-->Administration-->Synaptic Package Manager-->Search-->flashplugin-nonfree-->Mark for installation

or (from command-line terminal):

sudo apt-get install flashplugin-nonfree
Install from Firefox (method 2)
Install from tarball (method 3)

Save the .tar.gz file to your desktop.

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
  • There are cases in which plugins reside in /usr/lib/flashplugin-nonfree/. In this case, verify that there is a link pointing to /usr/lib/flashplugin-nonfree/ instead of /usr/lib/firefox/plugins :
cd /usr/lib/firefox/plugins/  
ls -las
flashplayer.xpt -> ../../flashplugin-nonfree/flashplayer.xpt
libflashplayer.so -> ../../flashplugin-nonfree/libflashplayer.so

Copy libflashplayer.so and flashplayer.xpt to /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/
  • If sound doesn't work in Flash Player (for example on YouTube), then edit the configuration file:
sudo apt-get install alsa-oss
gksudo gedit /etc/firefox/firefoxrc

Change:

FIREFOX_DSP=""

to:

FIREFOX_DSP="aoss"

Restart Firefox.

Note: This method doesn't work for amd64, since there is no 64-bit Firefox plugin. A 32-bit Firefox is necessary. Ubuntuforums provides special scripts for configuring some 32-bit applications in amd64.

If after trying the above you still don't have sound in Flash try PulseAudio:

How to setup PulseAudio Sound Server

I found that PulseAudio can be a better solution, and, using it, Firefox can share the sound with other apps at the same time.

GNASH open source alternative

  • Gnash is an open source alternative for the Flash player. It does not yet play all videos. More information here.
  • Install Gnash:
sudo apt-get install mozilla-plugin-gnash
  • 64 bit users please note - this is a better workaround than installing 32 bit firefox plugins. For most simple Flash functions (other than YouTube and Google Videos, for example), you can use this GPL version of Flashplayer within your browser.

However, Gnash may not be fully functional for playing YouTube and Google Videos. For these, you may need to enable (in the Firefox settings) an external player such as VLC (see below).

How to install Flash Player (Macromedia Flash) Plug-in for (64-bit) Mozilla Firefox (only)

  • Uninstall all plugins (like Gnash) for firefox that you have installed.
  • Install compatibility modules:
sudo apt-get install ia32-libs ia32-libs-gtk linux32 lib32asound2

Download the last version of .rpm files for the Plugin and Viewer from this site:

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

Install alien and unrar:

sudo apt-get install alien unrar

Debianize packages with alien:

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

Install packages:

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

(Filenames might be slightly different)

Download FlashPlayer from the Adobe site:

wget http://download.macromedia.com/pub/labs/flashplayer9_update/flashplayer9_install_linux_082207.tar.gz
tar xf flashplayer9_install_linux_082207.tar.gz

Go into the directory of created from untar and copy the 2 files “libflashplayer.so” into /usr/lib/mozilla-firefox/plugins:

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

Run nspluginwrapper:

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

Load the module as an automatic service:

System > Preferences > Sessions-->New
Name: Nspluginwrapper
Command: nspluginwrapper -i /usr/lib/mozilla/plugins/libflashplayer.so

How to install Adobe PDF Reader with Plug-in for Mozilla Firefox

How to block Ads and Java/Javascripts in Firefox

  • Firefox has many extensions and plugins. They can be accessed:
Mozilla Firefox-->Tools-->Add-ons-->Get extensions

This takes you to the Mozilla website for add-ons/plugins. Two of the most popular extensions provide significant added security and browsing pleasure.

  • NoScript blocks all Java and Javascript scripts by default unless you enable them for that page or website. You can whitelist pages temporarily or permanently. You can enable/disable some or all of the scripts on a page. This is far greater control than simply turning Java/Javascript on/off in the Firefox settings. Flashplayer scripts can be filtered by this method as well. Look for NoScript in the Popular Extensions sections and click on it to install.
  • AdBlock Plus has a free built-in list to block ads. You can also add an ad to the block list by clicking on the ad. A free subscription to a service keeps the list updated. Look for AdBlock Plus in the Popular Extensions sections and click on it to install.

I use Firefox with AdBlock Plus. Until recently, I never even knew that Ubuntuguide had ads on it!

Streaming in FireFox

  • Install from extensions/plugins website for Firefox:
Mozilla Firefox-->Tools-->Add-ons-->Get extensions

Multimedia Codecs & Browser Plug-ins

How to install Multimedia Codecs

  • The "ubuntu-restricted-extras" is a meta-package that installs : flashplugin-nonfree, gstreamer0.10-plugins-ugly, gstreamer0.10-plugins-ugly-multiverse, msttcorefonts, sun-java6-jre and sun-java6-plugin. These packages are proprietary to their restricted developers (Adobe, Sun, Microsoft, etc.) You accept the licensing terms of each developer when installing them:
sudo apt-get install ubuntu-restricted-extras
  • W32codecs has the Microsoft multimedia codecs (WMV, AVI, etc). By installing it you agree to Microsoft licensing terms.
  • A third-party repository, such as Medibuntu, must be enabled as a software source. Read adding software sources using menu to enable Medibuntu. (Note: Medibuntu is not affiliated with Ubuntu. Use at your own risk.)
sudo apt-get install w32codecs
  • You may also need other modules:
sudo apt-get install libxine-extracodecs gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer0.10-plugins-bad gstreamer0.10-pitfdll

Note: WMV9 codecs on amd64 currently seem to work only in VLC, the latest version of Mplayer (>= Version 1.0rc1), and Xine.

How to install DVD playback capability

Note: The gstreamer dvd plugin is available as part of gstreamer0.8-plugins but may have a few bugs. However, Totem can also work with the xine backend (instead of gstreamer) to play DVDs. (Xine-UI and Mplayer also use the xine backend). This method allows using xine with Totem.

  • Install dvd modules:
sudo apt-get install libdvdread3 
sudo /usr/share/doc/libdvdread3/install-css.sh
  • Install xine backend for Totem (if you are using Totem):
sudo apt-get install totem-xine
  • Finish installing modules:
sudo apt-get install libdvdcss2

How to install MIDI sound server (Timidity++)

Timidity allows for the playback of MIDI by those who do not have MIDI hardware or MIDI processing built into their sound card (most users) via a software synthesizer.

  • You can install timidity from Synpatic Package Manager without additional steps.
  • Optionally, you can install from the command line:
sudo apt-get install timidity
  • Set up Timidity to use ALSA for sound by default (assuming you are using ALSA):
gksudo gedit /etc/default/timidity

Uncomment the following line (remove the "#" sign):

#TIM_ALSASEQ=true
  • Set the required modules to load at bootup:
gksudo gedit /etc/modules

Add the following modules to the end of the file:

snd-seq-device
snd-seq-midi
snd-seq-oss
snd-seq-midi-event
snd-seq
  • Reboot

How to install multimedia plug-ins for Firefox

  • Read #General Notes
  • Read #How to add extra repositories
  • Choose the plug-in that matches your preferred media player. If multiple or conflicting plug-ins are installed, the desired plugins can be set using the Firefox menu:
Firefox Web Browser-->Edit-->Preferences-->Content-->FileTypes:Manage
Totem plug-in (Ubuntu users)
sudo apt-get install totem-gstreamer-firefox-plugin
  • Restart Mozilla Firefox
Kaffeine plug-in (KDE users)
sudo apt-get install kaffeine-mozilla
  • Restart Mozilla Firefox
MPlayer plug-in (Installs MPlayer media player as well)
sudo apt-get install mozilla-mplayer
  • Restart Mozilla Firefox
VLC plug-in (Installs VLC media player as well)
sudo apt-get install vlc vlc-plugin-* mozilla-plugin-vlc
  • In order to stream video via vlc, you also need to install the following packages.
sudo apt-get install avahi-daemon
sudo apt-get install avahi-utils
Helix plug-in (plays Realplayer files)
sudo apt-get install mozilla-helix-player helix-player

Multimedia Players

How to install Elisa Multimedia Player

Fluendo’s Elisa is a free software media center application that can play your DVDs, video files, music, and pictures. Since it is designed for extensibility, Elisa has the potential to do much more. It does not handle television or video recording functions.

How to install MPD Multimedia Playing Server

MPD is a audio playing server. It acts as a digital jukebox allowing playlist management over the network. The computer with MPD running on needs to be connected to an Amplifier (or similar) as it does not stream audio by default, it simply plays it. However, it can be configured to stream using Icecast and JACK. For more info: Music Player Daemon (MPD)

  • Install MPD:
sudo apt-get install mpd
  • Create link to your audio (MP3 etc) collection
sudo ln -s /path/to/your/music /var/lib/mpd/music/collection
  • Restart MPD
sudo /etc/init.d/mpd restart
  • Edit configuration:
sudo gedit /etc/mpd.conf
  • Install Gnome client (other desktop clients are available -- see wiki).
sudo apt-get install gmpc
  • Update/Install gmpc 0.15:

If you want to install from source - you might wish to downgrade your checkinstall to version 1.6.0 from http://packages.ubuntu.com/edgy/admin/checkinstall.

Or else, download the deb files from http://home.iitk.ac.in/~sudhansh/?Files. You will need to remove the original libmpd0 installed.

sudo apt-get remove --purge libmpd0
sudo apt-get install gmpc*.deb libmpd*.deb
  • Configure GMPC:
Applications > Sound & Video > Gnome Music Player Client
Options-->set Host, Port and connection options-->

The default settings will connect to MPD running on "localhost". Set the "Autoconnect" option if required. The default MPD port is 6600, make sure you unblock this port on your firewall.

  • Using 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.

How to install Xine-ui Multimedia Player

sudo apt-get install xine-ui
sudo apt-get install libxine-extracodecs
  • Run from menu:
Applications -> Sound & Video -> xine

How to install MPlayer Multimedia Player

sudo apt-get install mplayer libxine-extracodecs
  • An MPlayer plug-in for Firefox can also be installed:
sudo apt-get install mozilla-mplayer
  • Run from menu:
Applications -> Sound & Video -> MPlayer
MPlayer Frontend (SMPlayer)
  • SMPlayer is an MPlayer frontend. See SMPlayer.

How to install VLC Multimedia Player

sudo apt-get install vlc vlc-plugin-*
  • In order to stream video via vlc, you also need to install the following packages.
sudo apt-get install avahi-daemon
sudo apt-get install avahi-utils
  • A VLC plug-in for Firefox can also be installed
sudo apt-get install mozilla-plugin-vlc
  • Applications -> Sound and Video -> VLC Media Player

How to install XMMS Multimedia Player

sudo apt-get install xmms xmms-skins xmms-wma
  • Applications -> Sound & Video -> XMMS

How to install Songbird Multimedia Player

  • Download this installation script from Psychocats.net to your desktop:

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

  • Install from the command line terminal using the script:
cd Desktop
chmod +x installsongbird.sh
./installsongbird.sh

Run:

Applications-->Sound & Video->Songbird
How to uninstall Songbird Multimedia Player
  • Download this installation script from Psychocats.net to your desktop:

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

  • Remove the program using the script:
cd Desktop
chmod +x removesongbird.sh
./removesongbird.sh

How to install amaroK Multimedia Player

sudo apt-get install amarok
  • Run from menu:
Applications -> Sound & Video -> amaroK

Note: If amaroK complains about the "dcopserver" program not running, follow this tip from http://www.ubuntuforums.org/showthread.php?t=107269&highlight=dcopserver

sudo chown -R `whoami`:`whoami` ~/.*
How to uninstall amaroK
sudo apt-get remove amarok

How to install Banshee Music Manager and Player

sudo apt-get install banshee
How to uninstall Banshee
sudo apt-get remove banshee

How to install Listen Music Manager and Player

sudo apt-get install listen
How to uninstall Listen
sudo apt-get remove listen

How to install Exaile! Music Manager and Player

sudo apt-get install exaile
How to uninstall Exaile!
sudo apt-get remove exaile

How to install RealPlayer 10 Multimedia Player (RealPlayer)

The Linux Realplayer is based on open-source Helix player. Helix itself can be installed as a package easily (see below) and used instead of Realplayer but is unable to deal with streaming and real encoded data. These instructions are to install the proprietary version of Realplayer only.

Install from real website
  • Add execute permissions to the installer and run it:
chmod +x RealPlayer10GOLD.bin
sudo ./RealPlayer10GOLD.bin
Install from prepackaged .deb file

This installation uses deb file packaged as part of debian-multimedia project (kudos to Christian Marillat).

open a terminal and type,

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

How to install Helix Multimedia Player

Helix is the open-source package that plays Realplayer files. Realplayer is actually based on this package.

  • Note: Currently it's not supported for 64-bit machines yet.
  • You can install helix player by one of three methods.
  • 1) Add/Remove programs.
Applications-->Add/Remove...
Show: All open-source applications

Search for Helix and install Helix Media Player.

Note: This does not install the Firefox plugin. You must do that by installing the mozilla-helix-player package separately (see below).

  • 2) Synaptic Package Manager:
System-->Administration-->Synaptic Package Manager

Search for both the player and the firefox plugin:

helix-player mozilla-helix-player
  • 3) Command line (apt):
sudo apt-get install helix-player mozilla-helix-player

How to install Stream Directory Browser (streamtuner)

sudo apt-get install streamtuner streamripper
  • Applications -> Sound & Video -> streamtuner
How to uninstall Stream Directory Browser (streamtuner)
sudo apt-get remove streamtuner streamripper

How to install Internet TV (Democracy TV / Miro)

Democracy TV has been renamed Miro. This open source player allows you to play over 2000 channels, including podcasts, RSS feeds, YouTube, and video blogs.

  • Read #Firewall. You need to make sure the ports used for the BitTorrent downloader in Miro are open. You can do this using Firestarter (the GUI for the Firewall). On installation, Miro uses ports 8400-8500 by default, but you can change them in the Options section of Miro. If you have a router, make sure your ports are forwarded.
  • The previous version is available from the Ubuntu repositories:
  • Install Democracy Player
sudo apt-get install democracyplayer
  • Install extra codecs (if needed):
sudo apt-get install libxine-extracodecs
  • Run:
Applications-->Sound & Video-->Democracy TV
deb http://ftp.osuosl.org/pub/pculture.org/miro/linux/repositories/ubuntu feisty/
  • Reload the sources if you are using Synpatic Package Manager, or from the command line:
gksudo apt-get update
  • Find and load the miro package in Synaptic Package Manager, or from the command line:
gksudo apt-get install miro

Internet Utilities

How to install P2P BitTorrent Client (Azureus)

  • Install:
sudo apt-get install azureus
  • Run:
Applications-->Internet-->Azureus


Another BitTorrent client based off of Azureus is available at http://bittyrant.cs.washington.edu/

This client is called BitTyrant. It is designed to have faster download speeds when leeching, by leeching from the fastest provider, automatically. It actively seeks other BitTyrant users when leeching, and gives them preference when seeding, theoretically providing faster speeds, as well. It is not currently available in a .deb package.

How to install P2P BitTorrent Client (Deluge)

Installing Binary (Stable)
  • Download and install (i386)
wget http://download.deluge-torrent.org/ubuntu/feisty/0.5.5/deluge-torrent_0.5.5-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.5-1_i386.deb && \
rm  deluge-torrent_0.5.5-1_i386.deb
  • Download and install (amd64)
wget http://download.deluge-torrent.org/ubuntu/feisty/0.5.5/deluge-torrent_0.5.5-1_amd64.deb && \
sudo dpkg -i deluge-torrent_0.5.5-1_amd64.deb && \
rm deluge-torrent_0.5.5-1_amd64.deb
Compiling Deluge Source From Trunk (Unstable)
  • Download dependencies, get latest source, build the source, and install
sudo apt-get install subversion build-essential python-all-dev python-all \
python-support libboost-dev libboost-thread-dev libboost-date-time-dev \
libboost-filesystem-dev libboost-serialization-dev \
libboost-program-options-dev libboost-regex-dev zlib1g-dev libssl-dev && \
svn checkout http://deluge-torrent.org/svn/trunk deluge && \
cd deluge && python setup.py build && sudo python setup.py install
  • Remove install files
cd .. && rm -Rf deluge/
  • Delete old configuration files (If upgrading)
rm -Rf ~/.config/deluge/
  • Launch the program by going to: Applications -> Internet -> Deluge BitTorrent Client
How to use µTorrent under Wine
wget http://download.utorrent.com/1.6.1/uTorrent-1.6.1-install.exe
wine uTorrent-1.6.1-install.exe
Older method

I've left the older method below for reference:

  • Edit:
gksudo gedit /usr/bin/utorrent

Paste into that file:

#!/bin/sh
cd ~/YOURPATH/utorrent
if [ "$1" != "" ]; then
var="`echo $1 | sed 's/\//\\\/g'`"
var="Z:${var}"
wine utorrent.exe "$var"
else
wine utorrent.exe
fi

Replace "YOURPATH" with the location of µTorrent.

  • Make executable:
sudo chmod a+x /usr/bin/utorrent

How to install P2P BitTorrent Client (KTorrent)

sudo apt-get install ktorrent

This is a KDE application, but will also run under GNOME and Xfce. It is in the main repository and is therefore fully supported by Ubuntu's support team.

How to install Pidgin 2.2.0 Instant Messenger

This is an Internet messenger replacement for GAIM. You can also choose Internet Messenger programs from the Applications-->Add/Remove.. menu bar (recommended).

Easy instructions

See http://www.debuntu.org/pidgin-2.2.0-.deb-released-for-ubuntu-feisty

Manual instructions for Pidgin 2.1.1
  • Install tcl, tk and libgtkspell:
sudo aptitude install tk8.4 tcl8.4 libgtkspell0
  • Install the Pidgin debian package:
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
How to configure Google Talk for Pidgin

Configure for Pidgin/Gaim

How to install Ninan (NZB usenet client)

whereis java

You will get something like this:

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

Paste that path in a Terminal:

export JAVA_HOME=/usr/bin/java
  • Download and unpack 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
  • Move it to where you would like to install it, in my case, i used /usr/local/bin/ninan/
sudo mv ninan-1.1.0 /usr/local/bin/ninan
  • Ensure that ninan.sh is executable
cd /usr/local/bin/ninan
chmod 755 ninancore.sh
  • Start Ninan in the background:
nohup ./ninancore.sh &
  • You can now access it via this link: http://127.0.0.1:9090/ninan/ with the username: admin and password:password
  • If you would like ninan to start automatically:
gksudo gedit /usr/local/bin/ninan/ninancore.sh

Add (and replace with your own path):

cd /usr/local/bin/ninan

Right between "fi" and touch restart:

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

Then add ninan to your start-up programs:

Go to System > Preferences > Sessions
Click the New button
Type "Ninan" (no quotes) for the Name text box
Type (and replace with your own path) "nohup /usr/local/bin/ninan/ninancore.sh > /usr/local/bin/ninan/nohup.out &" (no quotes) for the Command text box
Click the OK button

Ninan should now start upon boot.

How to configure (64 Bit)Ekiga for GIZMO PROJECT Account

  • NOTE: This is more for UBUNTU 64 BIT users who cant install Gizmo Project, it should also work for 32-Bit users.
Open EKIGA
 CLICK
   "Edit"
   "Accounts"
   "Add"
  • Account Settings:
"Account Name:" gizmo
"Registrar:" proxy01.sipphone.com
"User:" <your GIZMO USERNAME>
"Password:" <your GIZMO PASSWORD>
  • Click "More Options"
"Authentication Login:" <your GIZMO USERNAME>
"Realm/Domain:" proxy01.sipphone.com
"Regisrtation Timeout:" 3600
  • Click "OK"
  • Click Checkbox under "A" in "Accounts" dialog
  • If "Status" says "Registered", all went well.
  • To dial PC->Phone:
sip:1<phone number>@proxy01.sipphone.com
  • I verified that this method does charge your GIZMO account.

Graphics

Blender 3-D graphics content creation system

Blender is an open source 3-D graphics content creation and visualization system.

For normal (Linux32) users
sudo apt-get install blender
For 64-bit Ubuntu users
  • 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
  • Copy to appropriate folders and add to desktop menu:
sudo cp blender /usr/bin/blender
gksudo gedit /usr/share/applications/blender.desktop

Insert the following lines into the new file:

[Desktop Entry]
Name=Blender
Comment=Blender
Exec=blender
Terminal=false
Type=Application
Categories=Graphics;3DGraphics;RasterGraphics;GTK;
  • Run:
Applications-->Graphics-->Blender

How to install Inkscape vector illustrator

Inkscape vector illustrator is an open source graphics program similar to Adobe Illustrator.

  • Install:
sudo apt-get install inkscape
  • Run:
Applications-->Graphics-->Inkscape vector illustrator

Web content creation and management systems

Drupal website content creation and management system

Drupal is the leading open-source website creation and management system. It allows professional website creation, and allows modules with a wide range of functions, such as blogs, online shopping, and almost every conceivable website function. For more information visit the Drupal website.

  • Install the drupal-5.1 package from Synaptic Package Manager, or from the command line:
sudo apt-get install drupal-5.1
  • Set up a MySQL database for Drupal
If this is the first time you have used MySQL, the default global MySQL superuser root will not have a password. You should set one now. Instructions for setting mySQL initial privileges are here.
In short:
mysql -u root
mysql> UPDATE mysql.user SET Password=PASSWORD('your_new_password') WHERE User='root';
mysql> FLUSH PRIVILEGES;
mysql> quit
In addition, you can set up an additional global MySQL user (such as mysql_user, for example) by following the instructions here. That way you can reserve root login for emergencies.
In short:
mysql -u root
mysql> CREATE USER 'mysql_user'@'localhost' IDENTIFIED BY 'mysql_user_passwd';
mysql> quit

Now you must create a MySQL database for use by Drupal. 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 Drupal database anything you want, instead of drupdatabase.

mysqladmin -u root -p CREATE drupdatabase

or

mysqladmin -u mysql_user -p CREATE drupdatabase

Create users for the Drupal 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 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

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

  • Run Drupal:
http://localhost/drupal
  • Set up cron tasks for Drupal:
Install Cron tasks GUI Gnome Scheduler. Install from Synaptic Package Manager or from the command line:
apt-get install gnome-schedule 
Run Gnome Scheduler and add the task for Drupal:
Applications-->System Tools-->Schedule

Add http://localhost/drupal/cron.php as a new recurring task with the description 'Drupal Cron'. Leave the No output box checked.

Games

KDE games

The kdegames metapackage contains a collection of games based on the KDE framework. It is similar to gnome-games for GNOME. To install from a terminal:

sudo apt-get install kdegames

The KDE libraries will be installed automatically if not present. This package integrates very well with Kubuntu and the kubuntu-desktop package. It also receives support from the Ubuntu security team. To uninstall:

sudo apt-get remove kdegames
sudo apt-get autoremove

Frozen Bubble 2

Frozen-Bubble is a puzzle game similar to Bust-a-Move where you shoot bubbles and match colors.

sudo apt-get install frozen-bubble

Super Nintendo Emulator (ZSNES) 1.510 for i386/AMD64

For support or questions please see this thread 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
sudo apt-get install zsnes32 #for amd64 users
sudo apt-get install zsnes   #for everyone else
  • Applications > Games > zsnes or zsnes32

Playstation 1 Emulator (pSX) 1.11 for i386/AMD64

For support or questions see 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

sudo apt-get install psx32 #for amd64 users
sudo apt-get install psx   #for everyone else
  • Applications > Games > pSX or pSX32

Playstation 1 Emulator (ePSXe) 1.6.0 for i386/AMD64

Read this tutorial: http://www.ubuntuforums.org/showthread.php?t=95835

Text/Code Editors

  • For text and programming editors.

SciTE

  • This is an alternative text editor. It features syntax highlighting for many programming languages.
  • Install:
sudo apt-get install scite

Geany

  • This is another alternative text editor with syntax highlighting, useful for programmers.
  • Install:
sudo apt-get install geany

Office

How to install Clip-Art

  • How to install Open Source clip-art for OpenOffice.org and others program.
sudo apt-get install openclipart

How to install third party windows fonts

  • Note: These instructions are for specific fonts only. Microsoft core fonts can be installed as part of the ubuntu-restricted-extras package. Read #How to install Multimedia Codecs for information on installing this package.
  • How to install third party windows fonts (like Arial,...)
sudo apt-get install cabextract 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

How to open .docx files

Install an optical character reader (tesseract)

This commercial optical character reader was made open source in 2005.

  • Tesseract reads .tif images only. It does not strip out images. It does not recognize multiple columns. It can achieve 97% accuracy.
  • Install the tesseract-ocr from Synaptic Package Manager or from the command line:
apt-get install tesseract-ocr
  • Run tesseract from the command line:
tesseract example.tif outputfilename

Home Security / Home automation

Complete systems

LinuxMCE (Media Center Edition)

LinuxMCE is an integrated home theater/security camera and motion detector/home automation/telephone PBX/intercom system for your home. It is a community project that is a fork of the Linux Pluto commercial endeavour. There is a version that runs on Kubuntu 7.04 (Feisty) and a version for Kubuntu 7.10 (Gutsy). LinuxMCE can run either as a standalone system on a single PC, or as a network of multimedia PCs within the home (one of which runs as a "Core" server). A large number of multimedia devices can be integrated into the system. For more info see the LinuxMCE website.

To install LinuxMCE on a single PC or on a central Core server, the DVD installation is recommended (preferably on an empty computer with an Nvidia graphics card (6000, 7000, or 8000 series)). The disk will install the Kubuntu OS as well as the LinuxMCE system.

LinuxMCE can be installed as an add-on package to an existing Kubuntu system. To do this, the LinuxMCE 2 CD installation is recommended. A Kubuntu LiveCD is also needed for installation, even if you already have a full Kubuntu installation in place. (The LinuxMCE installation uses the Kubuntu LiveCD for additional modules.) The LinuxMCE version must match the Kubuntu version -- i.e. the LinuxMCE 710 version CDs require the Kubuntu 7.10 (Gutsy) Live CD.

With the 2 CD installation, it is possible to run Kubuntu separately from LinuxMCE on the same PC. In a network of multimedia PCs, however, it is recommended to dedicate at least one PC to function as a LinuxMCE core server.

LinuxMCE incorporates MythTV, Pluto home automation, Motion security surveillance, Asterisk PBX, VDR video disk recorder, and other home automation/security/theater packages in an integrated platform.

At this time, the automatic installer for Linux MCE uses the KDE desktop (Kubuntu). There are users that have made Linux MCE work with the Gnome desktop (Ubuntu), but it is recommended to stick with the automatic installation instructions for now.

Omnipotence software (commerical)

ECS (Omnipotence Software) -- controls X10, Insteon, and many other types of devices (commercial).

Home Security / Surveillance

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
  • Download the .deb package from the package manager's website:

ftp://www.northern-ridge.com.au/zoneminder/ubuntu/edgy/zoneminder_1.22.3-8_i386.deb

  • Install using the Debian package manager. (No other method seems to work.)
dpkg -i zoneminder_1.22.3-8_i386.deb
  • (Note: If some dependencies are still unsatisfied, make sure you have these packages installed):
sudo apt-get install libc6 libc6.1 libgcc1 libgcc4 libstdc++6
(These should already be installed as part of the LAMP installation):
sudo apt-get install apache2-mpm-prefork libapache2-mod-php5 libmysqlclient15off mysql-client mysql-server php5  php5-mysql
  • Copy the configuration file and restart the Apache2 server.
sudo ln -s /etc/zm/apache.conf /etc/apache2/conf.d/zoneminder.conf
sudo /etc/init.d/apache2 reload
  • View Zoneminder from your web browser:
http://localhost/zm
  • Set up a MySQL database for Zoneminder
If this is the first time you have used MySQL, the default global MySQL superuser root will not have a password. You should set one now. Instructions for setting mySQL initial privileges are here.
In short:
mysql -u root
mysql> UPDATE mysql.user SET Password=PASSWORD('your_new_password') WHERE User='root';
mysql> FLUSH PRIVILEGES;
mysql> quit
In addition, you can set up an additional global MySQL user (such as mysql_user, for example) by following the instructions here. That way you can reserve root login for emergencies.
In short:
mysql -u root
mysql> CREATE USER 'mysql_user'@'localhost' IDENTIFIED BY 'mysql_user_passwd';
mysql> quit

Now you must create a MySQL database for use by Zoneminder. This is an administrative MySQL command, so you must use one of your global MySQL users (either root or mysql_user, as created in the example above). You can name your Zoneminder database anything you want, instead of zmdatabase.

mysqladmin -u root -p CREATE zmdatabase

or

mysqladmin -u mysql_user -p CREATE zmdatabase

Create users for the Zoneminder database. As always, I create a root user for emergency use. I use the same password for root as I do elsewhere on my system. Then I also create a user named zm_user (but you could also creat a user named mysql_user, to keep everything consistent). [I use a unique user here because this is a home security system, after all, and I don't want it breached.] These users are specific to this database; they can be the same users as used elsewhere in the system or can be unique users.

mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON zmdatabase.* TO 'zm_user'@'localhost' IDENTIFIED BY 'password';
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON zmdatabase.* TO 'root'@'localhost' IDENTIFIED BY 'password'; (I used my usual root password here).
mysql> quit
mysqladmin reload

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

Home automation programs and hardware

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

Miscellaneous

How to install applications for study of religious texts

How to install Gnomesword (Bible study program)
sudo apt-get install gnomesword sword-language-pack-en sword-text-web
  • If you require other languages type:
sudo apt-cache search bible
  • Take a look at the sword-language-pack's and the sword-text's for additional languages and install as needed.

Gnomesword is found under Applications-->Accessories.

  • Under KDE, use kio-sword instead of Gnomesword:
sudo apt-get install kio-sword
How to install a Quran researching tool (Zekr)

Zekr is an open platform Quran study tool for simply browsing and researching on the Quran.

sudo wget http://siahe.com/zekr/apt/sources.list.d/feisty.list -O /etc/apt/sources.list.d/zekr.list                                                                        
wget -q http://siahe.com/zekr/apt/zekr.debian.gpg -O- | sudo apt-key add -                                                                                                 
sudo apt-get update                                                                                                                                                        
sudo apt-get install zekr ttf-me-quran ttf-sil-scheherazade
sudo apt-get install ttf-farsiweb flashplugin-nonfree
  • Zekr comes with extra Quran translations in Persian, Urdu, French, Russian, English, Turkish, Bosnian, Dutch packaged as zekr-quran-translations-XY where XY is the ISO code of the language. Run
apt-cache search zekr-quran-translations

in a shell to list them all. Then among the result list choose the appropriate package and install it: For example if you want to install English Quran Translations run the following command:

sudo apt-get install zekr-quran-translations-en



Cross-platform enabling Applications

Virtualization Technology

Virtualbox

Innotek VirtualBox is a general-purpose full virtualizer for x86 hardware. Targeted at server, desktop and embedded use, it is now the only professional-quality virtualization solution that is also 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

Choose the tar.gz version, not the RPM version (you won't have to convert it), download it to a directory and expand it.

  • Make sure you have the necessary build environment for it:
sudo apt-get install build-essential linux-headers-`uname -r`
  • Change to the unpacked vmware directory and run:
sudo ./vmware-install.pl

This will install all necessary parts, choose the defaults unless you have a reason to change them. When it finishes it will offer to start the configuration for you, choose "yes". Choose the defaults that are offered.

  • If there are compiling errors, you need 2 patches.

Download:

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

As root place them (still as tar packages) in /usr/lib/vmware/modules/source, overwriting the existing packages (save the old ones under a different name.)

Re-run the configuration script as root:

sudo vmware-config.pl

How to install CrossOver Linux to run Windows Applications

How to install and run Wine (Open Source version of CrossOver Linux)

Wine is a system that enables Windows programs to run under Linux. It is an open source version of CodeWeavers' CrossOver Linux (see above). Many Windows programs, but not all, are supported under Wine.


Add the WineHQ APT Repository:

  • Add WineHQ repository key to repository keyring:
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

or from the command-line:

sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/feisty.list -O /etc/apt/sources.list.d/winehq.list
  • Install wine from Synaptic Package Manager:
System-->Administration-->Synaptic Package Manager-->Search--> wine
System -> Administration -> Update Manager

or from the command-line terminal:

apt-get update
apt-get install wine
  • Set your configuration as desired:
System-->Preferences-->Wine Configuration
  • Set the location of your virtual "C:" drive
System-->Preferences-->Wine Configuration-->Drives
Note specifically that you can set the directory you wish to use as the "C:" drive for Wine. By default, this is /home/USER/.wine/drive_c but you can set it to any directory you wish, including a pre-existing Windows directory on your computer. However, changing the default directory may cause some problems with Wine and is not recommended.
  • You can set a link to your home folder for the Wine "C:" drive to make it easier to find:
ln -s ~/.wine/drive_c ~/drive_c
  • Add Applications:
System-->Preferences-->Wine Configuration-->Applications-->Add Applications
Your added programs will be given a desktop icon on your Ubuntu desktop, for easy startup.
How to manually run programs in Wine (from a command-line terminal)
wine /PATH/EXENAME.exe
How to make Wine apps look like Windows XP

Thanks to http://www.winehq.org/pipermail/wine-bugs/2004-August/010161.html

gksudo gedit ~/.wine/user.reg

Find the part that starts [Control Panel\\Colors] random numbers, and insert this:

[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"
Install Internet Explorer 6 for Wine

IE 6 is not recommended for general usage, but some Windows packages (installed under Wine) require IE6 to complete installation. Furthermore, IE 6 is useful for checking code for developers who want to see how their web pages appear under IE 6.

  • Install the required package cabextract from Synaptic Package Manager (or from apt-get install cabextract).
wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz
tar zxvf ies4linux-latest.tar.gz
cd ies4linux-*
./ies4linux

Accept all the defaults for installation.

How to install Windows Games (Cedega)

How to install Maple 11

  • Insert the Maple 11 cd for Linux and mount if asked.
cd /cdrom
sudo sh ./installMapleLinux32
  • Install to /usr/local/maple11 instead of the default, if you choose.

Create symbolic links:

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

How to install Win4Lin (Windows combined with Linux)

How to Install Citrix ICAClient 10

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

or

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

If wget doesn't work, then go directly to the website and download the package by following the links.

  • Unpack and install (use the proper version downloaded):
gunzip en.linuxx86.tar.gz
tar xvfz en.linuxx86.tar
./setupwfc
  • Enable certificate verification in Firefox:
Applications-->Firefox Web Browser-->Advanced-->Encryption-->View Certificates-->Authorities
  • Find your certificate authority and click on it.
 Edit-->"This certificate can identify web sites."

In my case, as an example, I enabled Thawte Consulting cc-->Thawte Serve CA as the authority to identify my web sites. But you could also use Verisign, Geotrust, Equifax, or one of many other verification services.

I downloaded the certificates from http://www.thawte.com/roots/. I unzipped the file, found the certificate I needed, and copied it (changing the extension slightly) to my ICAClient certificate folder:

cp ThawteServerCA.cer ~/ICAClient/keystores/cacert/ThawteServerCA.crt 
  • Make sure your Firewall (IPTables) are set to allow Citrix ports (1494, sometimes 443 and 1603). You can use Firestarter to adjust the firewall settings (see below). Read #Firewall.
How to Uninstall Citrix ICAClient 10
/usr/lib/ICAClient/setupwfc

User Administration

How to switch to root user in Console mode

For a login shell as root, i.e. similar to "su -",

sudo -i
Password: <specify user password>

or

sudo su -
Password: <specify user password>

To start a root shell while maintaining the current directory and various other settings of your normal user (such as the USERNAME environment variable):

sudo -s -H
Password: <specify user password>

or

sudo su
Password: <specify user password>

How to set/change/enable root user password

sudo passwd root

How to disable root user account

sudo passwd -l root

How to allow root user to login into Gnome

System -> Administration -> Login Window-->Preferences
Security -> Allow local system administrator login (Checked)

How to add/edit/delete system users

System -> Administration -> Users and Groups
Users -> Add User... /Properties/Delete

or

sudo useradd jim
sudo userdel jim
  • For more info read
man usermod

How to add/edit/delete system groups

System -> Administration -> Users and Groups
Groups -> Add Group.../Properties/Delete

How to automatic login into GNOME

System-->Administration-->Login Window
Security-->Enable Automatic Login

Choose a user from the drop-down 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.

How to use "sudo" without prompt for password (not secure)

EDITOR=gedit sudo visudo
  • Find this line:
system_username	ALL=(ALL) ALL
  • Replace with this line:
system_username	ALL=(ALL) NOPASSWD: ALL

How to kill the "sudo" session

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

Mice

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

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

How to configure 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 (System -> Preferences -> 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 System > Preferences > Touchpad

From the Touchpad window you can modify you touchpads settings

Graphics Card

How to setup nVidia drivers in 7.04

System > Administration > Restricted Devices Manager
Enable Driver
Apply Changes

Insert Ubuntu 7.04 Feisty Fawn CD-ROM

or

Cancel > Close

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

System > Quit > Restart
Load up Applications > Accessories > Terminal

If you haven't already done so you may right click on Terminal under Applications > 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
  • Restart 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"
  • Restart 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
  • Restart 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
  • Restart 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
  • Restart X with Ctrl+Alt+Backspace

How to install 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/
  • Save the edited file
  • 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;
  • Restart 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 #How to install 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 "System > Preferences > 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
  • Find this section
 ...
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"

How to configure dual head on NVIDIA based cards

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

How to install 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.
  • Install 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
  • Find this lines:
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 create 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 -x $DAEMON
               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 executable

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)

  • Install 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 Applications -> System Tools -> 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 Applications > 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. (Note: 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 from the command line.

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

How to install 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
System --> Administration --> Network
  • 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

How to install USB ADSL modem drivers and configure the connection

This instructions works with the following modems: Sagem Fast 800, Speedtouch series, all EAGLE based modems and all Connexant AccessRunner based modems

  • Go to UbuDSL download page
  • Install the main package and a package for your modem
  • Run the program and follow instructions on the screen
  • In case of any problems UbuDSL website offers a detailed instruction.


How to install Windows Wireless Drivers (Ndiswrapper)

  • Read #General Notes
  • 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 System -> Administration -> 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 Note: 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
  • Install 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

Common errors:

  • Be sure to put the key in hexadecimal if your network configuration says so( and the majority of the keys are).

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.

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

How to install 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.


Other Method: Using mobile phone/GPRS/EDGE as Internet modem

  • Create a file called 'gprs':
sudo gedit /etc/chatscripts/gprs
  • Paste the text below in the file and save and close it:
TIMEOUT		120
ABORT           'BUSY'
ABORT           'ERROR'
ABORT           'NO CARRIER'
''              'ATE1'
OK		AT+CGDCONT=1,"IP","internet"
OK		ATD*99***#3
# or OK		ATD*99#
CONNECT		\d\c
  • Note: Pay attention to the line containing 'AT+CGDCONT=1,"IP","internet"'. This might vary depending on your mobile service provider. It would be best to call customer service and make sure you get the 'APN' from them.
  • Create another file called 'gprs'. Notice that it's a different location:
sudo gedit /etc/ppp/peers/gprs
  • Paste the text below in the file and save and close it:
# You usually need this if there is no PAP authentication
noauth
# The chat script (be sure to edit that file, too!)
connect "/usr/sbin/chat -v -f /etc/chatscripts/gprs"
# Set up routing to go through this PPP link
defaultroute
# Set this to /dev/ircomm0 or similar
/dev/ttyACM0
# Speed
115200
# Reconnect on disconnect
persist
# Be extra verbose
debug
# You may need these
passive
noipdefault
noproxyarp
ipcp-accept-local
ipcp-accept-remote
ipcp-restart 2
ipcp-max-configure 20
ipcp-max-failure 20
asyncmap 0xa0000
novj
nodeflate
nobsdcomp
# Use remote DNS
usepeerdns
# With GPRS, authentication is normally done  automatically
# via your cellphone number, so leave login name empty
user ""
  • Note: Pay attention to the line containing '/dev/ttyACM0'. This port might vary depending on your phone model and connection type. I also made it a choice to connect directly to /dev/ttyACM0. You could always symlink to /dev/modem by running the command:
sudo ln -sf /dev/ttyACM0 /dev/modem
  • Create yet another file called 'gprs':
sudo gedit /usr/sbin/gprs
  • Paste the text below in the file and save and close it:
#!/bin/bash

PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin"
export PATH

XDIALOG_HIGH_DIALOG_COMPAT=1
export XDIALOG_HIGH_DIALOG_COMPAT

# Get root
[ "`id -u`" != "0" ] && exec sudo "$0" "$@"

TMP="/tmp/gprsconnect$$"

bailout(){
rm -f "$TMP"
exit 0
}

DIALOG="dialog"
[ -n "$DISPLAY" ] && [ -x /usr/bin/Xdialog ] && DIALOG="Xdialog"
trap bailout 1 2 3 15

# LANGUAGE etc.
[ -f /etc/sysconfig/knoppix ] && . /etc/sysconfig/knoppix
[ -z "$LANG" ] && export LANG
[ -z "$LANGUAGE" ] && export LANGUAGE
[ -z "$CHARSET" ] && export CHARSET

disconnect(){
poff
#$DIALOG --clear --title "$TITLE1" --msgbox "$MESSAGE_DISCONNECT" 8 35
exit 0
}

trap disconnect 1 2 3 15


#$DIALOG --title "$TITLE1" --yesno "$MESSAGE1" 12 65 || bailout
#[ -x /etc/init.d/sysklogd ] && /etc/init.d/sysklogd start >/dev/null 2>&1
# echo "AT" >/dev/modem
sleep 1
if [ -n "$DISPLAY" ] && type xterm >/dev/null; then
pon gprs
xterm -T "$TITLE_LOG" -e bash -c 'tail -n 0 -f /var/log/messages | egrep -e "(chat|ppp)"'
disconnect
else
# Start pppd right here.
pppd updetach call gprs 
sleep 2
exit 0
fi
  • Make the file executable by running the following command:
sudo chmod +x /usr/sbin/gprs
  • Connect your phone to the cable and and make sure it's powered on. (When I run the 'lsusb' command I get 'Bus 003 Device 006: ID 22b8:4802 Motorola PCS'. This is because I have a motorola phone with USB modem connected to my Ubuntu box.)
  • Note: Make sure the phone itself already has the gprs service configured on it. This can be done by your dealer. Some service providers can send the settings (gprs template) to your phone and you can save it.
  • Try connecting to the internet by running the following command:
sudo gprs
  • Note: Use this method if you don't don't already have access to an internet connection. If you are using Ubuntu and you have internet access you can always install kppp and configure it to use your phone modem. If you are using Kubuntu you should already either have kppp installed.

Palm

How to configure 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"
  • Save the edited file
  • 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
System -> Administration -> 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.)
  • Restart 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

How to install 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 from the command line:
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

  • Note: 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
  • Append the following lines at the end of file
/dev/cdrom {
    dma = on
}
  • Save the edited file

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
  • To mount CD/DVD-ROM
sudo mount /media/cdrom0/ -o unhide
  • To unmount 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)

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

Creative x-Fi sound cards (64 Bit Only)

  • When prompted at installation:
Select X-Fi ->  Sound Blaster  -> (Select your sound card)

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 and test 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).
  • To test it type in terminal:

For 4.0 surround:

speaker-test -Dplug:surround40 -c4 -l1 -twav

For 5.1 surround:

speaker-test -Dplug:surround51 -c6 -l1 -twav

For 7.1 surround:

speaker-test -Dplug:surround71 -c8 -l1 -twav

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/

  • Install:
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->Sound & 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->Sound & 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->Sound & 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 for 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


How to install a Wacom tablet

  • 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.
  • Using Synaptic package manager, check if the packages xserver-xorg-input-wacom and wacom-tools are already installed - if not, install them. Or, from the command line:
sudo apt-get install xserver-xorg-input-wacom wacom-tools
  • Save a copy of your /etc/X11/xorg.conf:
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
  • Edit xorg.conf:
      gksudo gedit /etc/X11/xorg.conf
  • Change all /dev/wacom occurences to /dev/input/wacom (created by wacom-tools udev scripts).
  • Restart. restarted X. Remember to configure the "Extended input devices" in your graphic applications (Gimp, Inkscape). You can already check if it's working by moving your stylus on the tablet: the mouse cursor should go across 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(...)
parm:   proto:Highest protocol extension to probe(...)

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.

The proto parameter tells the mouse driver how deep to probe the mouse interface. In some cases you will want to change this depth to bare.

  • Edit the /etc/modprobe.d/options file:
gksudo gedit /etc/modprobe.d/options
  • Add:
options psmouse resetafter=1
options psmouse proto=bare
  • Restart 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 -t iso9660 -o loop file.iso /media/iso/
  • To unmount 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 -t iso9660 -o loop "$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

  • Read #General Notes
  • Applications -> System Tools -> Configuration Editor
  • Configuration Editor
/ -> apps -> nautilus-cd-burner -> default_speed (set/change the burn speed)

How to enable burnproof for CD/DVD Burner

  • Read #General Notes
  • Applications -> System Tools -> Configuration Editor
  • Configuration Editor
/ -> apps -> nautilus-cd-burner -> burnproof (Checked)

How to enable overburn for CD/DVD Burner

  • Read #General Notes
  • Applications -> System Tools -> Configuration Editor
  • Configuration Editor
/ -> apps -> nautilus-cd-burner -> overburn (Checked)

How to install K3b (CD/DVD burning software)

sudo aptitude install k3b
How to install 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 network connections

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

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

How to configure network connections

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

How to configure dialup connections

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

How to configure broadband connections

sudo pppoeconf

How to change computer name

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

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
  • Find this line
...
  server string = %h server (Samba, Ubuntu)
...
  • Replace with the following line
  server string = new_computer_descriptions
  • Save the edited file
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
  • Find this line
...
  workgroup = MSHOME
...
  • Replace with the following line
  workgroup = new_domain_or_workgroup
  • Save the edited file
sudo testparm
sudo /etc/init.d/samba restart

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
  • Save the edited file
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
  • Install ddclient from Synaptic Package manager or from the command line:
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)
  • Restart ddclient:
sudo /etc/init.d/ddclient restart

How to share folders the easy way

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

How to browse network computers

Places -> Network 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
  • To mount network folder:
sudo mkdir /media/sharename
sudo mount //192.168.0.2/linux /media/sharename/ -o username=myusername,password=mypassword
  • To unmount 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
  • To mount network folder:
sudo mkdir /media/sharename
sudo mount //192.168.0.2/linux /media/sharename/ -o username=myusername,password=mypassword,dmask=777,fmask=777
  • To unmount 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

How to Configure 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
  • Install 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:
Applications -> Internet -> PPTP Client

How to setup a PGP key with Seahorse and Evolution

  • Install:
apt-get install seahorse
Applications --> Accessories --> Passwords and Encryption Keys
Key --> Create New Key
  • Select "PGP Key", then fill out information. Ensure that you use your real email address.
  • Right-click 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.
System-->Administration-->Synaptic Package Manager-->Mark packages by task-->DNS server

This will install all dependencies and configuration files.

  • Alternatively, you can install from the command line (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
  • Restart 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

  • Read #General Notes
  • System -> Administration -> Network
  • Network settings
sudo gedit /etc/nsswitch.conf
  • Find this line
hosts:          files dns
  • Replace with the following line
hosts:          files dns wins
  • Save the edited file
sudo apt-get install winbind

Remote Access

Note: 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:
System-->Administration-->Login Window-->
Remote-->Style:Same as Local

You can reach the same configuration panel by typing in the console:

sudo gdmsetup

Now restart your network

sudo /etc/init.d/networkin restart

Voilá.

How to login from another PC running Ubuntu
  • Note: 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.

How to configure a Remote Desktop host
  • Note: 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 System-->Lock Screen and switch off the monitor when the computer is left unattended.
  • Enable Remote Desktop (VNC):
System --> Preferences --> Remote Desktop
Remote Desktop Preferences
Sharing ->
Allow other users to view your desktop (Checked)
Allow other users to control your desktop (Checked)
Security ->
Ask you for confirmation (Un-Checked)
Require the user to enter this password: (Checked)
Password: Specify the password
How to connect into remote 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
  • Read #General Notes
  • The remote Ubuntu host must have Remote Desktop configured (read #How to configure a Remote Desktop host)
  • Note: 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
  • Read #General Notes
  • Remote Ubuntu host machine must have Remote Desktop configured (read #How to configure a Remote Desktop host)
  • Note: 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.
  • Download 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.)
  • Read #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).
  • Read #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 starting 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
  • To mount a Windows partition:
sudo mkdir /media/windows
sudo mount /dev/hda1 /media/windows/ -t ntfs -o nls=utf8,umask=0222
  • To unmount 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
  • To mount a Windows partition
sudo mkdir /media/windows
sudo mount /dev/hda1 /media/windows/ -t vfat -o iocharset=utf8,umask=000
  • To unmount 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

  • Applications -> Add/Remove -> search for 'NTFS', you should find NTFS Configuration Tool, install it.
  • Applications -> System Tools -> 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

  • Read #General Notes
  • Ensure hard drive is first in BIOS boot-up sequence
    • To prevent trespassers from using Linux Installation CD which allows them to gain root user access
    • To prevent trespassers from using Linux Live CD (e.g. UBUNTU/KNOPPIX/MEPIS) which allows them to destroy/browse/share the entire hard drive
    • To prevent trespassers from installing another Operating System
  • Ensure a password is set for BIOS
    • To prevent trespassers from changing the BIOS boot-up sequence
  • Ensure computer is located at a secured place
    • To prevent trespassers from removing computer's hard drive which allows them to destroy/browse/share the entire hard drive from a different computer
    • To prevent trespassers from removing computer's on-board battery which resets the BIOS password
  • Ensure passwords used on the system cannot be easily guessed
    • To prevent trespassers from cracking password file using brute force attacks (e.g. John the Ripper)
    • Create password with minimum length of 8 characters
    • Create password with mixture of characters/numbers, and upper/lower case
    • 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)
    • Read #How to disable root user account
  • Install 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
  • Find this section
...
## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
#   password --md5 $1$tumnZ1$xB/shuXs7MlawZXkLiBDV/
# password topsecret
...
  • Add the following line below it
password --md5 $1$tumnZ1$xB/shuXs7MlawZXkLiBDV/ (encrypted password above)
  • Find this section
...
## 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
...
  • Save the edited file 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
  • Find this line
...
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
...
  • Replace with the following line
#ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
  • Save the edited file
sudo telinit q

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

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

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
How to install IPtables Firewall Configuration GUI (Firestarter)
  • Read #General Notes
  • 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.

System-->Administration-->Synaptic Package Manager-->Search-->firestarter-->Mark for Installation

or (from command-line terminal):

sudo apt-get install firestarter
  • Run Firestarter:
System-->Administration-->Firestarter
How to minimize Firestarter to a panel icon when closed