Ubuntu:Feisty nl

From

Revision as of 12:33, 8 October 2009 by Krampo (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Gebruikt u Kubuntu of Xubuntu? Zie http://kubuntuguide.org/ en http://xubuntuguide.org/


Introduction

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.

Other Versions

  • If you are using an outdated version of Ubuntu, you should consider updating it to the current version of Ubuntu. There have been considerable improvements. 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.

Volledige lijst van alle subpagina's: 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.255, 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

Restart your network:

sudo /etc/init.d/networking restart
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
System-->Administration-->Firestarter-->Preferences-->Enable tray icon
How to make the Firestarter GUI start automatically at startup
  • Note: Once you have setup the iptables firewall the first time using Firestarter, you do not need to have Firestarter running to be protected by the IPtables firewall (which is then always enabled in Ubuntu). Firestarter is only the GUI for changing the settings of the firewall; it only needs to be started when doing so. The following step is therefore unnecessary for most users.
System -> Preferences -> Sessions -> Startup Programs -> New
Name: Firestarter --start-hidden
How to have Firestarter start without the root password
  • Edit the configuration file:
sudo gedit /etc/sudoers

Note: You can also edit the sudoers file using:

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

Add this line right after it (optional):

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

Replace 'your_user_name' with your actual username.

  • Reboot.

Using Shorewall to manage iptables

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

Anti-virus

ClamAV AntiVirus Server

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

If you get errors, try running the command again

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

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

  • Note: As of August 1, 2007, the Ubuntu repository version of ClamTk is 0.31, which has a bug that does not allow it to run. Obtain and install the current version of ClamTk 0.99, which functions fine in Ubuntu Feisty:
wget -c http://downloads.sourceforge.net/clamtk/clamtk_2.99-1_all.deb
sudo dpkg -i clamtk_2.99-1_all.deb
How to automatically scan files/folders for viruses
  • This method is used to automatically scan files/folders for viruses at a scheduled time.
  • * * * * * means: minute hour date month year
  • Edit the crontab file:
 EDITOR=gedit sudo crontab -e

comment: sure? (root's crontab)

or, simply,

gksudo gedit crontab -e

comment: sure? - (its work?)

  • Append a line similar to the following line at the end of file. In this example, scanning will be done at 02:04am every day of every month of every year.
04 02 * * *  sudo clamscan -r /location_of_files_or_folders

Boot Menu

How to gain root user access without login

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

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

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

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

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

How to change root user/main user password if forgotten

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

How to change GRUB menu password if forgotten

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

How to restore GRUB menu after Windows installation

Super Grub Disk
Grub

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

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

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

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

Type:

root (hd0,0)

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

root (hd1,0)

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

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

OR

In a terminal you can type:

cat /boot/grub/device.map

You will get something like this:


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

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

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

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

Use

sudo fdisk -l

to find which drives are bootable

How to add Windows entry into GRUB menu

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

How to boot into Windows installed on a seperate SATA drive

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

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
gksudo gedit /boot/grub/menu.lst
  • Append the following lines at the end of file.
title           Windows XP on SATA drive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader (hd1,0)+1
  • Save the edited file
  • Finally, do
sudo update-grub

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

How to hide GRUB menu on boot-up

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
sudo gedit /boot/grub/menu.lst

  • Find this line
...
#hiddenmenu
...
  • Replace with the following line
hiddenmenu
  • Save the edited file

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

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
gksudo gedit /boot/grub/menu.lst
  • Find this line
...
timeout     10
...
  • Replace it with the following line, where X_seconds is a number representing the number of seconds before the menu should timeout.
timeout     X_seconds
  • Save the edited file

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

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
gksudo gedit /boot/grub/menu.lst
  • Find this line
...
default     0
...
  • Replace with the following line, where X_sequence is a number representing the number of the Grub menu item you want to be the default operating system.
default     X_sequence

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

  • Save the edited file

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

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

How to convert Wallpaper to Splash Image for GRUB menu

e.g. Assumed that wallpaper.png is the Wallpaper to be converted to Splash Image
splash.xpm.gz is the Splash Image for GRUB menu
ImageMagick is installed
convert -resize 640x480 -colors 14 wallpaper.png splash.xpm && gzip splash.xpm
chmod 644 splash.xpm.gz
sudo cp splash.xpm.gz /boot/grub
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
sudo update-grub

How to display only one kernel on GRUB menu

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

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

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

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

OR


How to Boot Ubuntu from the Windows Bootloader

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

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

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

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

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

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

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

C:\Ubunutu.mbr Ubuntu

in the Windows' Boot.ini file.

How to temporarily skip boot-up services

Press 'Ctrl + C'

How to permanently disable/enable boot-up services

Tips And Tricks

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

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

  • Ensure Ubuntu Universe repository is selected #How to add extra repositories
  • Download and install lame liblame-dev and gcc packages (mp3 encoder + GNU compiler collection)
sudo apt-get build-dep ffmpeg
sudo apt-get install liblame-dev libfaad2-dev libfaac-dev libxvidcore4-dev liba52-0.7.4 \
liba52-0.7.4-dev libx264-dev libdts-dev libgsm1-dev libvorbis-dev libdc1394-13-dev \
checkinstall build-essential gcc
  • Download and extract FFMPEG source to current working directory
cd /usr/local/src
sudo apt-get source ffmpeg
  • Compile FFMPEG from source
cd ffmpeg-*
sudo ./configure --enable-gpl --enable-pp --enable-vorbis --enable-libogg \
--enable-a52 --enable-dts --enable-dc1394 --enable-libgsm --disable-debug \
--enable-mp3lame --enable-faad --enable-faac --enable-xvid --enable-pthreads \
--enable-x264

maybe try instead = 
sudo ./configure --enable-gpl --enable-pp --enable-libvorbis --enable-libogg \
--enable-liba52 --enable-libdts --enable-dc1394 --enable-libgsm --disable-debug \ 
--enable-libmp3lame --enable-libfaad --enable-libfaac --enable-xvid --enable-pthreads \
--enable-x264


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

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

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

ffmpeg [-i infile] [outfile]

How to enable smooth fonts

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

How to Install Tor to Surf Anonymously in Ubuntu Feisty with Firefox

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

How to restart GNOME without rebooting computer

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

How to turn on Num Lock on GNOME startup

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

How to remap the Caps Lock key as another Control key

gksudo gedit /etc/console-tools/remap

In the Console

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

to

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

In X Windows

gksudo gedit ~/.Xmodmap
  • Add this:
keycode 66 = Control_L
clear Lock
add Control = Control_L

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

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

If you want to Upgrade kernel in Ubuntu Feisty Fawn

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

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

How to run programs on startup when login into GNOME

  • System -> Preferences -> Sessions
  • Sessions
Startup Programs Tab -> Add/Edit/Delete

How to speed-up your Ubuntu box

  • NOTE*

INCORRECT LINK

How to switch to Console mode in GNOME

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

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

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

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

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

How to refresh GNOME desktop

killall nautilus

How to refresh GNOME panel

killall gnome-panel

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

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

How to show all hidden files/folders in Nautilus

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

How to browse files/folders as root user in Nautilus

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

How to install a "View in Terminal" Menu for Nautilus

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

How to change default file type "Open with" program

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

How to change preferred email client to Mozilla Thunderbird

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

How to open files as root user via right click

gedit $HOME/.gnome2/nautilus-scripts/Open\ as\ root
  • Insert the following lines into the new file
for uri in $NAUTILUS_SCRIPT_SELECTED_URIS; do
	gksudo "gnome-open $uri" &
done
  • Save the edited file
Places -> Home -> View -> Show Hidden Files -> .gnome2 -> nautilus-scripts -> Right click on Open as root -> 
Properties -> Permissions -> Execute

Right click on file -> Scripts -> Open as root

How to disable beep sound in Terminal mode

Not for Dapper---- firingstone

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

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

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

How to handle mms protocol in Mozilla Firefox


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

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

network.protocol-handler.app.mms

Into the next text field copy this:

/usr/bin/X11/vlc

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

network.protocol-handler.external.mms

Then set

true

How to handle rtsp (realmedia) protocol in Mozilla Firefox


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

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

network.protocol-handler.app.rtsp

Into the next text field copy this:

/usr/bin/X11/realplay

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

network.protocol-handler.external.rtsp

Then set

true

How to load Web site faster in Mozilla Firefox

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

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

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

How to install Flock Web Browser in Ubuntu

How to install/uninstall .deb files

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

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

dpkg -l packagename

How to convert .rpm files to .deb files

sudo alien -d package_file.rpm

How to compile .deb files from source

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

or

sudo checkinstall -D

How to rename all files in directory at once

  • To install "mvb" file name renamer
wget -c http://easylinux.info/uploads/mvb_1.6.tgz
sudo tar zxvf mvb_1.6.tgz -C /usr/share/
sudo chown -R root:root /usr/share/mvb_1.6/
sudo ln -fs /usr/share/mvb_1.6/mvb /usr/bin/mvb

  • To rename all files in directory at once
mvb NEW_NAME

How to manipulate all image files in directory at once

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

How to set System-wide Environment Variables

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

How to save "man" outputs into files

man command | col -b > file.txt

How to force GDM to system beep when login screen ready

  • This is useful on computers where headphones are usually plugged in, allowing them to utilize the speakers for this attention-getting task.
echo foo >> ~/foo.wav
  • System -> Administration -> Login Window -> Accessibility

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

rm foo.wav

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

Clean up Ubuntu GNU/Linux System

How to clean /tmp/ folder contents on shutdown

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

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

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

How to find out which version of Ubuntu I am using

cat /etc/issue

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

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

  • Change desktop background every time you reboot your computer:
System -> Preferences -> Session -> Startup Programs
Add: ~/wallpaperchanger.py
  • To change the desktop background every X minute of the hour:
crontab -e
In the opened file enter:
X * * * * * python ~/wallpaperchanger.py 
1 as X would mean: every hour:01. For every minute, just use * as X.
To exit: press ctrl+x, y


How to add keyboard layouts for other languages

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

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

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

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

How to add the Keyboard (Layout) Indicator applet

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

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

How to type extended characters

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

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

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

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

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

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

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

How to set the Compose key to type special characters

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

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

Some examples,

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

How to install ubuntu-title font used in Ubuntu logo

sudo apt-get install ttf-ubuntu-title

Now you can use this font in your favorite applications

How to associate Adobe Reader with files in Nautilus

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

How to print from Adobe Reader

/usr/bin/lp -d FS-1010

How to pull apart and combine pdf files

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

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

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

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

How to remove jedit when Synaptic package manager fails after install

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

Now, you can use your Synaptic package manager again.

How to compile a kernel the Ubuntu Way

http://www.howtoforge.com/kernel_compilation_ubuntu

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

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

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

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

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

How to add locales to Ubuntu the command line way

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

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

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

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

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

How to set default Terminal App window size

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

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

Using VI editor

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

How to play DVDs

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

Get the latest version from here: http://rpm.pbone.net Use Alien to convert .rpm file to .deb

sudo apt-get install alien
sudo alien -d lindvd*.rpm
sudo dpkg -i lindvd*.deb

Fix some crashing issues

sudo cp /usr/share/lindvd/libivimandriva.so /usr/lib/
sudo ldconfig

Restart LinDVD

How to install Gmail Notifier alternative (CheckGmail)

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


File:Add startup program.png
Add startup program window


/usr/bin/checkgmail

After this the program will appear in your notification area.

How to emulate Mac OS X Spotlight (Deskbar)

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

How to make Ubuntu look like Mac OS X

  • Detailed instruction can be found here.

How to remove temporary files on shutdown

Already in this guide as #How to clean /tmp/ folder contents on shutdown.

How to tile windows in gnome

First, download the wmtile debian package here.

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

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

Now, create a launcher:

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

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

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

How to install a virtual PDF printer

-Install cups-pdf from the Synaptic Package Manager

Go to System -> Administration -> Printing

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

"STEP 1of3" PDF Printer (Virtual Printer) should now be in the local detected printers list so select it and click 'Forward'

"STEP 2of3" Select "Generic" as the manufacturer and "PostScript" as the printer. Now click 'Forward'

"STEP 3of3" Give the printer a sensible description and location and click 'Apply'

The "CUPS/PostScript" printer should now exist in the print dialogue of you applications and will save the output PDF file to the /HOME/PDF folder. It may be possible to change the destination by editing /etc/cups/cups-pdf.conf


How to pass module options for Ubuntu to pickup on startup

sudo <your editor of choice> /etc/modprobe.d/options

How to correct paper size to Letter

If you use letter-size paper and are having trouble getting your printers, etc. set properly, follow the following steps:

sudo dpkg-reconfigure libpaper1

Then delete any printers that need to print in letter size and reinstall printers. System --> Administration --> Printing

Troubleshooting Feisty Fawn

Servers

Monitoring Server

If you want to monitor your Ubuntu servers and clients like memory usage,CPU usage,Load average,Disk usage,Mysql monitoring, Network Monitoring,Processes Monitoring this is for you

Print Server (cupsd)

How to install cupsd

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

How to add a printer

  • Go to System -> Administration -> Printing.
  • Choose "Add printer".
  • "Add printer wizard" should start and tell you what to do.

How to remove a printer

 sudo lpadmin -x printernamewhere 
printername is the name of the printer you want to remove

How to print on remote Ubuntu machine from another Ubuntu machine

  • Make sure your local printer is well configured.
  • Enable local printer sharing - System -> Administration -> Printing -> Global Settings menu -> Share printers
  • Server ip address: 192.168.0.1
  • Client ip address: 192.168.0.23
    • Server configuration
 sudo cp /etc/cups/cupsd.conf /etc/cups/cupsd.conf.backup
 gksudo gedit /etc/cups/cupsd.conf
find the block
<Location />
  ...
  Allow localhost
  ...
</Location>
and add the following line into it.
 Allow 192.168.0.23
Restart cups.
 sudo /etc/init.d/cupsys restart
    • Client configuration
 sudo cp /etc/cups/client.conf /etc/cups/client.conf.backup
 gksudo gedit /etc/cups/client.conf
And add the following line into it.
 ServerName 192.168.0.1
Restart cups.
 sudo /etc/init.d/cupsys restart
Now try "lpq" and you should see something like
 vitek@lightfox:~$ lpq
 HPLJ6P is ready
 no entries

How to print on remote Ubuntu machine from a Windows machine


1.19.4.5

How to set up 4 port printer server

Setting up COMPUSA print server on Ubuntu

(1) go to System, Administration, Printing.

(2) Then Add a printer

(3) Network Printer and choose HP JetDirect

(4) Where it says Host you put in the IP Address of the Print server. You can find it with Smb4k

(5) Where it says Port you put 9100 for USB port 1. 9101 for USB port 2. 9102 for USB port 3. and 9103 for USB port 4.

(6) Then click on forward and install your printer

NFS Server

Installing NFS Server

sudo apt-get install nfs-kernel-server nfs-common portmap

Reconfigure Portmap to not bind to loopback interface:

sudo dpkg-reconfigure portmap 
sudo /etc/init.d/portmap restart

Define which folders to share (export):

sudoedit /etc/exports

Add share (export) definitions:

This will export path to all IP addresses between 192.168.1.1 and 192.168.1.254 with Read/Write access:

/path/to/shared/files 192.168.1.0/24(rw,no_root_squash,async)

This will export path to all IP addresses between 192.168.1.1 and 192.168.1.254 with Read Only access:

/path/to/shared/files 192.168.1.0/24(ro,async)

When finished, save changes and restart the NFS Server:

sudo /etc/init.d/nfs-kernel-server restart

Export your new configuration:

sudo exportfs -a

Installing NFS Client

sudo apt-get install portmap nfs-common
Mounting Manually
cd ~
mkdir temp
sudo mount 192.168.1.1:/path/to/shared/files temp

You may need to restart NFS services:

sudo /etc/init.d/portmap restart
sudo /etc/init.d/nfs-common restart
Mounting Automatically

Create mountpoint:

sudo mkdir /mnt/files

Edit configuration:

gksudo gedit /etc/fstab

Add something similar to below:

192.168.1.1:/path/to/shared/files /mnt/files nfs rsize=8192,wsize=8192,timeo=14,intr 0 0

Test new configuration:

sudo mount /mnt/files

Reboot to test automatic mounting.

Samba Server

How to install Samba Server for files/folders sharing service

sudo apt-get install samba smbfs
  • You must also open the ports for incoming/outgoing use by Samba in the IPTables (firewall). This can be done using the Firestarter GUI, for example. Read #Firewall

How to add/edit/delete network users

sudo smbpasswd -a system_username
gksudo gedit /etc/samba/smbusers
    • Insert the following line into the new file
system_username = "network username"
    • Save the edited file
  • To edit network user
sudo smbpasswd -a system_username
  • To delete network user
sudo smbpasswd -x system_username

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

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
gksudo gedit /etc/samba/smb.conf
  • Find this line
...
;  security = user
...
  • Replace with the following lines
  security = user
  username map = /etc/samba/smbusers
  • Uncomment the following lines:
;[homes]
;comment = Home Directories
;browseable = no
;valid users = %S
;writable = yes
sudo testparm
sudo /etc/init.d/samba restart

How to share home folders with read/write permissions (Authentication=Yes)

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
gksudo gedit /etc/samba/smb.conf
  • Find this line
...
;  security = user
...
  • Replace with the following lines
  security = user
  username map = /etc/samba/smbusers
  • Find this section
...
# By default, the home directories are exported read-only. Change next
# parameter to 'yes' if you want to be able to write to them.
  writable = no
...
  • Replace with the following lines
# By default, the home directories are exported read-only. Change next
# parameter to 'yes' if you want to be able to write to them.
  writable = yes
sudo testparm
sudo /etc/init.d/samba restart

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

sudo mkdir /home/group
sudo chmod 777 /home/group/
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
gksudo gedit /etc/samba/smb.conf
  • Find this line
...
;  security = user
...
  • Replace with the following lines
 security = user
 username map = /etc/samba/smbusers
  • Append the following lines at the end of file
[Group]
  comment = Group Folder
  path = /home/group
  guest ok = yes
  read only = yes
  create mask = 0700
  directory mask = 0700
  force user = nobody
  force group = nogroup

sudo testparm
sudo /etc/init.d/samba restart

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

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

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

  • Read #General Notes
  • Read [[#How to install Samba Server for files/folders sharing service]
sudo mkdir /home/public
sudo chmod 777 /home/public/
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
gksudo gedit /etc/samba/smb.conf
  • Find this line
...
;  security = user
...
  • Replace with the following lines
  security = user 
  username map = /etc/samba/smbusers
  • Append the following lines at the end of file
[public]
  comment = Public Folder
  path = /home/public
  guest ok = yes
  read only = yes
  create mask = 0777
  directory mask = 0777
  force user = nobody
  force group = nogroup
sudo testparm
sudo /etc/init.d/samba restart

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

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

How to share public folders with read only permission (Authentication=No)

sudo mkdir /home/public
sudo chmod 777 /home/public/
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
gksudo gedit /etc/samba/smb.conf
  • Find this line
...
;  security = user
...
  • Replace with the following line (make sure it does not begin with a semicolon)
  security = share
  • Append the following lines at the end of file
[public]
  comment = Public Folder
  path = /home/public
  guest ok = yes
  read only = yes
  create mask = 0777
  directory mask = 0777
  force user = nobody
  force group = nogroup
  • Save the edited file
sudo testparm
sudo /etc/init.d/samba restart

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

sudo mkdir /home/public
sudo chmod 777 /home/public/
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_backup
gksudo gedit /etc/samba/smb.conf
  • Find this line
...
;  security = user
...
  • Replace with the following line (make sure it does not begin with a semicolon)
  security = share
  • Append the following lines at the end of file
[public]
  comment = Public Folder
  path = /home/public
  guest ok = yes
  read only = no
  create mask = 0777
  directory mask = 0777
  force user = nobody
  force group = nogroup

  • Save the edited file
sudo testparm
sudo /etc/init.d/samba restart

How to print on remote Ubuntu machine via samba

 sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.backup
 gedit /etc/samba/smb.conf
Find the following lines
 ...
 # printing = cups
 # printcap name = cups
 ...
and uncomment them.
 printing = cups
 printcap name = cups
Restart cups server
 sudo /etc/init.d/cupsys restart
Now printers working on your Ubuntu machine should be acessible via samba.

Windows networking error: "The account is not authorized to log in from this station."

When accessing the Samba server from a locked down Windows computer, the following error may occur: "\\hostname\sharename is not accessible. You might not have permission to use this network resource. The account is not authorized to log in from this station."

This is sometimes caused by the Windows computer requiring digitally signed communications. The local Global Security Policy on the Windows computer needs to be changed. The following policies need to be disabled under Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options:</p>

Samba Web Administration Tool (SWAT)

How to install INETD Superserver
 sudo apt-get install netkit-inetd
How to install SWAT for Samba daemon
 sudo apt-get install swat
  • Open inetd daemon configuration
 sudo gksu gedit /etc/inetd.conf
  • If string is:
 <#off#> swat            stream  tcp     nowait.400      root    /usr/sbin/tcpd  /usr/sbin/swat
  • Change to (due to know BUG which resets peer connection):
 swat            stream  tcp     nowait.400      root    /usr/sbin/swat  swat
  • Restart daemon
 sudo /etc/init.d/inetd restart


SSH Server

SSH stands for secure shell. It is a method for establishing encrypted communications over a data channel (a "tunnel") between a remote host and a local client. It is similar to, but simpler than, a VPN connection.

How to install SSH Server for remote administration service

sudo apt-get install ssh

How to SSH into remote Ubuntu host

  • In this example:
Remote Ubuntu machine: 192.168.0.2
username is a valid user on the remote host
ssh username@192.168.0.2
  • You can tunnel to a URL as well:
ssh username@foobar.dyndns.org

If your LAN uses a dynamic IP to connect to the Internet, you can use a Dynamic IP service (such as DynDNS) to assign a static URL to your LAN (foobar.dyndns.org, for example). An SSH request over the Internet to your URL (e.g. foobar.dyndns.org) would then be routed by the DynDNS service to your modem/router. Your router must then be set to forward the port used for the SSH tunnel to your host machine on the LAN. (SSH tunnels generally occur by default over port 22, but it can be changed (see below)).

  • You can explicitly select the port number (instead of port 22) for the SSH tunnel:
ssh username@foobar.dyndns.org:11022

However, if you do this, the host SSH server must be listening on the same port (port 11022 in the example). The port to listen to can be set in the ssdh_config file of the OpenSSH server (provided in Ubuntu) on your host. Also, your router must be configured to forward port 11022 to your OpenSSH host.

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

  • In this example:
Remote Ubuntu machine: 192.168.0.2
Remote files/folders location: /home/username/remotefile.txt
Local machine save location: . (current directory)
scp -r username@192.168.0.2:/home/username/remotefile.txt

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

  • In this example:
Local files/folders location: localfile.txt
Remote Ubuntu machine: 192.168.0.2
Remote Ubuntu machine save location: /home/username/
scp -r localfile.txt username@192.168.0.2:/home/username/

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

  • In this example:
Remote Ubuntu machine: 192.168.0.2
Remote files/folders location: /home/username/remotefile.txt
Local machine save location: . (current directory)
rsync -v -u -a --delete --rsh=ssh --stats username@192.168.0.2:/home/username/remotefile.txt

How to copy files/folders from local machine into a remote Ubuntu host (rsync)

  • For this example:
Local files/folders location: localfile.txt
Remote Ubuntu machine: 192.168.0.1
Remote Ubuntu machine save location: /home/username/
rsync -v -u -a --delete --rsh=ssh --stats localfile.txt username@192.168.0.1:/home/username/

How to mount remote host folders into local Ubuntu machine (sshfs)

  • For this example:
Remote machine: 192.168.0.2
Remote machine folder location: /media/music
  • Install sshfs
sudo apt-get install sshfs
  • Load kernel driver for sshfs
sudo modprobe fuse
  • Join the 'fuse' user group
sudo adduser your_user_name fuse
  • Logout and login for this to take effect.
  • fix group on /dev/fuse
 sudo chgrp fuse /dev/fuse
  • Create local mountpoint in your home directory
mkdir ~/remote_music
  • Mount the remote folder into ~/remote_music
sshfs 192.168.0.2:/media/music ~/remote_music

How to SSH into a remote Ubuntu host from a Windows client

How to copy files/folders from/into a host Ubuntu machine from a Windows client

How to limit the user accounts that can connect through ssh remotely

Using SSH to Port Forward

ssh -L <local port>:<remote computer>:<remote port> <user>@<remote ip>

An example is:

ssh -L 6669:94.92.10.15:6667 foowho

In this example, local port 6669 on the local client computer is tunneled by encrypted SSH over the default port 22 to the router at 94.92.10.15. The router must be set up to forward port 22 to whatever the internal LAN IP (such as 192.168.0.56) of the SSH host is. The host is running OpenSSH (ssdh service) and is set to listen to port 22. It then routes the incoming data to the host port 6667, where presumably some other program is waiting for data. foowho has an account on the host running the OpenSSH server.

SSH tunnels can also be established using URLs and even alternate ports. An example is:

ssh -L 5900:foobar.dyndns.org:5900 foowho -p 11022

In this example, local port 5900 on the client is forwarded through an SSH tunnel on port 11022 to foobar.dyndns.org. The DNS service translates foobar.dyndns.org into the appropriate WAN (Internet) IP address, where the router is listening. The router is set up to forward port 11022 to the LAN machine hosting the OpenSSH server, which is listening on port 11022. It then sends the data to whatever program is running on port 5900 on the host.

  • You can forward a local port to a different port on the remote host.
Example: Make port 80 (web server/browser) on the remote host at 10.0.2.10 available locally as port 81
ssh -L 81:10.0.2.10:80 user@office.net
  • You can create secure SSH tunnels to multiple hosts using multiple ports.
ssh -L 81:10.0.2.10:80 -L 82:10.0.2.20:80 -L 83:10.0.2.30:80 user@office.net

Now, local port 81 locally forwards to port 80 on the host at 10.0.2.10, local port 82 forwards to port 80 on the host at 10.0.2.20 and local port 83 forwards to port 80 on the host at 10.0.2.30. In this example, user has an account on all three host machines at 10.0.2.10, 10.0.2.20, and 10.0.2.30.

  • Once port forwarding is set up by ssh, an application is directed to the SSH tunnel for port usage by using the loopback as the destination.
Example 1:
ssh -L 81:10.0.2.10:80 user@office.net
http://localhost:81 or http://127.0.0.1/:81

will direct a web browser to use port 81 locally, which is being redirected by SSH to port 80 on the remote host at 10.0.2.10.

Example 2:
ssh -L 5900:foobar.dyndns.org:5900 foowho
vncviewer 127.0.0.1 or vncviewer localhost

will direct vncviewer (which uses port 5900 by default) to direct its traffic through the ssh tunnel to the host at foobar.dyndns.org, where, presumably, a VNC server is listening on port 5900.

Protecting SSH from brute force attack

It is possible to easily protect SSH from a password brute force attack with a pam_abl module. You can install it by the two ways:

To install from a repository:

And execute the following commands:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libpam-abl
sudo /etc/init.d/ssh restart

First command is to fetch the repository listing. Second is to upgrade the openssh-server package to patched version (openssh-client will be also updated). Third is to set up a protection plugin. And the fourth is to restart a server with a new security plugin.

Rsync Daemon

Rsync is a backup/mirroring/synchronization tool to keep two directories, local or remote, synchronized. Read this brief tutorial.

How to install the Rsync Daemon for remote backup and restoration of files

Usually by default Ubuntu will have rsync installed but not enabled. But to make sure run this command:

 sudo apt-get install rsync

Now we need to create the configuration file. This tells the daemon what to do:

 sudo gedit /etc/rsyncd.conf

Copy and paste the following into the file but make sure to replace all instances of "username" with your username:

 [usernamebackup]
 
     path = /home/username/backup
     comment = Backup
     uid = username
     gid = username
     read only = false
     auth users = username
     secrets file = /etc/rsyncd.secrets

Set the permission on the file to be safe:

 sudo chmod 644 /etc/rsyncd.conf

Create a username and password file:

 sudo gedit /etc/rsyncd.secrets

And enter in your credentials:

 username:password

Make the file secure, we don't want the password's stolen:

 sudo chmod 600 /etc/rsyncd.secrets

Now the rsync daemon is not enabled by default, so go edit /etc/default/rsync:

 sudo gedit /etc/default/rsync

And set:

 RSYNC_ENABLE=false

To:

 RSYNC_ENABLE=true

This allows the daemon to become active and lets you back up your data! To kickstart the change, restart the daemon:

 sudo /etc/init.d/rsync restart

Enable SSH Banner

After login you can have the contents of a "banner" file displayed on the user's screen.

  • Open up the sshd configuration file:
sudo gedit /etc/ssh/sshd_config
  • Find:
#Banner /etc/issue.net
  • Replace:
Banner /etc/issue.net
  • Edit the issue.net file to contain what you want displayed:
sudo gedit /etc/issue.net
  • Add what you want:
                        _     
  ___ _ _ ___ _____ ___| |___ 
 | -_|_'_| .'|     | . | | -_|
 |___|_,_|__,|_|_|_|  _|_|___|
                   |_|        
 Welcome to my server
  • Restart SSHD:
sudo /etc/init.d/ssh restart

DHCP Server

How to install DHCP Server for automatic IP addresses assignment

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

Backup Ubuntu System

If you want to backup your ubuntu system try one of the following backup tools

Sbackup

Dar and Kdar

Ubuntu Feisty LAMP Server

LAMP stands for Linux, Apache, MySQL, and PHP. These components together comprise the easiest and most widely used web server.

  • Feisty has made a LAMP server installation a one-click process. If you are installing from an Ubuntu Server disk, you will be given the option of installing a LAMP server during initial installation. No other steps are required.
  • If you have not installed a LAMP server during installation, it can be installed from Synaptic Package Manager as a package. No other steps are required.
System-->Administration-->Synaptic Package Manager-->Edit-->Mark packages by Task-->LAMP Server-->OK

How to further setup your LAMP server by creating and using MySQL databases, etc, go here.

  • From the command line, the LAMP server package can be installed using:
sudo tasksel install lamp-server

or

sudo apt-get install apache2 php5-mysql libapache2-mod-php5 mysql-server

Database Server

How to install MYSQL Database Server

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

If it does not exist then create it.

touch /var/run/mysqld/mysqld.sock

MySQL Database backup using AutoMySQLBackup

  • AutoMySQLBackup is a script to take daily, weekly and monthly backups of your MySQL databases using mysqldump.
  • AutoMySQLBackup Script Features
    • Backup mutiple MySQL databases with one script. (Now able to backup ALL databases on a server easily. no longer need to specify each database seperately)
    • Backup all databases to a single backup file or to a seperate directory and file for each database.
    • Automatically compress the backup files to save disk space using either gzip or bzip2 compression.
    • Can backup remote MySQL servers to a central server.
    • Runs automatically using cron or can be run manually.
    • Can e-mail the backup log to any specified e-mail address instead of “root”. (Great for hosted websites and databases).
    • Can email the compressed database backup files to the specified email address.
    • Can specify maximun size backup to email.
    • Can be set to run PRE and POST backup commands.
    • Choose which day of the week to run weekly backups.
  • AutoMySQLBackup Requirements

The AutoMySQLBackup script only requires mysqldump (A standard utility provided with the mysql client) and gzip or bzip2 for compression of the backup files. If you would like to have the log emailed to you then you will need to have permission to execute the “mail” program. If you want the compressed backup files mailed to you then Mutt must be available on the server. Finally you will need a bash shell and the standard system tools and utilities (all these requirements should be the default on most linux system.)

  • What AutoMySQLBackup does

Every day AutoMySQLBackup will run (if setup in /etc/cron.daily) and using mysqldump and gzip will dump your specified databases to the /backups/daily directory, it will rotate daily backups weekly so you should never have more than 7 backups in there..

Every Saturday AutoMySQLBackup will again backup the databases you have chosen but they will be placed into /backups/weekly, these will be rotated every 5 weeks so there should never be more than 5 backups in there..

Every 1st of the month AutoMySQLBackup will create a backup of all databases and place them into /backups/monthly. These will never be rotated so it will be up to you to do your own house keeping. I would suggest taking a copy of this offline every month or two so that if you have a hard drive failure you will be able to restore your database

  • AutoMySQLBackup Installation

The install is as simple as editing a few variables in the AutoMySQLBackup file. The full setup is documented in the AutoMySQLBackup script file below the variables section.

  • Download automysqlbackup.sh and place it into your /etc/cron.daily directory or your home directory.
  • Edit (at least) the following lines :
...
USERNAME=dbuser 
PASSWORD=password DBNAMES=”DB1 DB2 DB3″
...
  • Note:The user must have at least select privileges to the databases and make sure to keep the quotes ” ” otherwise it won’t work
  • Make the file executable :
sudo chmod u+rwx
  • Create the following directory
./backups
  • That’s it...Now you can run it using the command line “./automysqlbackup.sh” or if it is in /etc/cron.daily it will run each day when cron

How to install MYSQL Administrator

sudo apt-get install mysql-admin

How to install MySQL Query Browser (SQL Client)

sudo apt-get install mysql-query-browser

How to install Oracle Database XE

  • Add the following repository to your /etc/apt/sources.list:
deb http://oss.oracle.com/debian unstable main non-free
  • Get the public key
wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle  -O- | sudo apt-key add - 
  • Install the software using apt-get
sudo apt-get update
sudo apt-get install oracle-xe
  • Add your login to the 'dba' group (where your login name is username)
sudo usermod -G dba -a username
  • Run the initial configuration
sudo /etc/init.d/oracle-xe configure

You can configure any ports you want as long as they don't interfere with any other services listening on ports. You can choose the defaults by pressing enter instead of entering something in.

Apache HTTP Server

How to install Apache HTTP Server for HTTP (Web) Server service

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

Depending on how you setup apache, you may need to run a command to map public_html directories (inside user home directories) to ~. like, http://localhost/~chris. The optional command is:

sudo a2enmod userdir

How to install PHP for Apache HTTP Server

  • Note: PHP can be installed separately or as part of a LAMP integrated server package (Linux, Apache2, MySql, PHP). To install the integrated package, read #Ubuntu Feisty LAMP Server.
How to install PHP5
sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
sudo /etc/init.d/apache2 restart
  • To test if php5 installed correctly
gksudo gedit /var/www/testphp.php
  • (Optional) Insert the following line into the new file
<?php phpinfo(); ?>

If that didn't work (for example, if your browser prompted you to save the testphp.php page), try these commands:

sudo a2enmod php5
sudo /etc/init.d/apache2 force-reload

Then try opening http://localhost/testphp.php again

Installing recommended modules
sudo apt-get install php-pear php5-gd php5-xsl curl libcurl3 libcurl3-dev php5-curl

(Optional) The ability to use the mail() function is also recommended. You need a package that enables you to use the sendmail command and Postfix is a good one. If you do not want to install this, then go to the Restart Apache step and you're finished.

sudo apt-get install postfix

After running that, you will be prompted to configure postfix.

  • Restart Apache
sudo /etc/init.d/apache2 restart

Many PHP applications use XSLT technology as well as server-side graphic manipulation (via GD). Also, PEAR provides access to PHP's module repository. cURL is a way to simulate a user's actions at a web browser. One can use it to get content off a website such as to create dynamic statistics.

How to install MYSQL for Apache HTTP Server

sudo apt-get install libapache2-mod-auth-mysql
  • Select either php4-mysql or php5-mysql depending on which version of PHP you installed
sudo apt-get install php<version-number>-mysql
sudo apt-get install phpmyadmin
  • If you installed phpmyadmin using apt-get and cannot log in, run sudo apt-get purge phpmyadmin and then sudo apt-get install phpmyadmin.
  • To get PHP to work with MySQL, open the file (where <version> is either 4 or 5 depending on which PHP you installed)
sudo gedit /etc/php<version>/apache2/php.ini
  • You'll need to uncomment the ";extension=mysql.so" line so that it looks like this
...
extension=mysql.so
...
  • Save the file then exit
sudo /etc/init.d/apache2 restart
  • If you cannot log in, set a password:
 sudo mysqladmin password <NEWPASSWORD>

Alternative if the above doesn't work (which it probably won't and this probably will):

 sudo apt-get install mysql-server

How to install Python for Apache 2

sudo apt-get install python
sudo apt-get install libapache2-mod-python
sudo gedit /etc/apache2/mods-available/mod_python.conf

add the following lines

AddType application/x-httpd-python .py
AddHandler mod_python .py
PythonHandler mod_python.publisher
PythonDebug On

save

cd /etc/apache2/mods-enabled
sudo ln -s ../mods-available/mod_python.conf mod_python.conf
sudo /etc/init.d/apache2 restart

How to map URLs to folders outside /var/www/

gksudo gedit /etc/apache2/conf.d/alias
  • Insert the following lines into the new file
Alias /URL-path /location_of_folder/
<Directory /location_of_folder/>
  Options Indexes FollowSymLinks
  AllowOverride All
  Order allow,deny
  Allow from all
</Directory>
  • Save the edited file
sudo /etc/init.d/apache2 restart
  • When you get "403 - Permission denied", you might try:
chmod o+x /location_of_folder/
  • If that doens't work, the following might help:
chmod o+r,o+x /location_of_folder/

How to change the default port number for Apache HTTP Server

  • For this example:
The new port number will be 78
sudo cp /etc/apache2/ports.conf /etc/apache2/ports.conf_backup
gksudo gedit /etc/apache2/ports.conf
  • Find this line:
Listen 80
  • Replace with the following line:
Listen 78
  • Restart Apache:
sudo /etc/init.d/apache2 restart
  • Check to see if you can access the Apache web site on the new port:
http://localhost:78

How to parse RSS into PHP for Apache HTTP Server

  • For this example:
RSS is DistroWatch.com - News
wget -c http://easylinux.info/uploads/magpierss-0.71.1.tar.gz
sudo mkdir /var/www/feeds
sudo tar zxvf magpierss-0.71.1.tar.gz -C /var/www/feeds/
sudo mv /var/www/feeds/magpierss-0.71.1/* /var/www/feeds/
sudo rm -fr /var/www/feeds/magpierss-0.71.1/
sudo chown -R www-data:root /var/www/feeds/
gksudo gedit /var/www/feeds/index.php
  • Insert the following lines into the new file:
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
 
 <head>
 
 <title>DistroWatch.com - News</title>
 
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
 
 <style type="text/css">
 /*<![CDATA[*/
 /* 
 DEFAULT TAG STYLES
 */
 
 body {
  background: #ffffff;
  margin-left: 20px;
  font-family: bitstream vera sans,sans-serif;
  font-size: 9pt;
 }
 
 h1 {
  font-family: luxi sans,sans-serif;
  font-size: 15pt;
 }
 
 /*]]>*/
 </style>
 
 </head>
  
 <body>
 
 <?php

 require_once 'rss_fetch.inc';
 error_reporting(E_ERROR);
 
 $url = 'http://distrowatch.com/news/dw.xml';
 $rss = fetch_rss($url);
 
 if ($rss) {
 
  echo "<h1>";
  echo "<a href=$url>", $rss->channel[title], "</a><br/>";
  echo "</h1>";
 
  foreach ($rss->items as $item ) {
   $url = $item[link];
   $title = $item[title];
   $description = $item[description];
   echo "<li>";
   echo "<b>Topic:</b> <a href=$url><b><u>$title</u></b></a><br/><br/>";
   echo "$description<br/><br/>";
   echo "</li>";
  }
 
 }
 else {
  echo "<a href=$url>", $url, "</a> - Server Down!<br/>";
 }
 
 ?>
 
 </body>
 
 </html>
 
  • Check your feeds:
http://localhost/feeds/index.php

FTP Server

How to install FTP Server for File Transfer service

sudo apt-get install proftpd

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

sudo cp /etc/proftpd/proftpd.conf /etc/proftpd/proftpd.conf_backup
gksudo gedit /etc/proftpd/proftpd.conf
  • Find this section
...
DenyFilter           \*.*/
...
  • Add the following line below it
DefaultRoot           ~

  • Save the edited file
sudo /etc/init.d/proftpd restart

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

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

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

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

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

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

How to change the default port number for FTP Server

  • For this example:
The new port number will be 77
sudo cp /etc/proftpd/proftpd.conf /etc/proftpd/proftpd.conf_backup
gksudo gedit /etc/proftpd/proftpd.conf
  • Find this line:
Port              21
  • Replace with the following line:
Port              77
  • Restart the FTP server:
sudo /etc/init.d/proftpd restart

How to ftp into remote Ubuntu host from a Windows client machine

  • Download and install FileZilla for Windows: Here
  • FTP addresses take the form:
ftp://[username]:[password]@[hostname].[domain].[tld]:[portnumber]/[directory]/

Note: the username and password are optional. If they are not given and the server is not configured for anonymous access, then they will be requested.

How to FTP to a remote Windows host from an Ubuntu client machine

  • Install an FTP client on your local client machine. Again, you can use FileZilla or CrossFTP.
apt-get install filezilla
  • The FTP address normally has the form:
ftp://[username]:[password]@[hostname]:[port]

How to configure your NAT/router/gateway/firewall for FTP server

  • Configure your FTP server with a limited passive port range so that TCP range can be opened in the incoming firewall.
  • For proftpd, edit /etc/proftpd/proftpd.conf:
gksudo gedit /etc/proftpd/proftpd.conf
and edit this line with the desire port range to use for FTP transfers:
PassivePorts xx-yy
Port x
where x is the port over which you wish FTP traffic to be directed.
  • The NAT/router/gateway/firewall devices or software must be configured to allow the configured incoming TCP ports (port x in the example) to be forwarded to your host on the LAN.

Personal Apt Repository

Setting Up Repository

Note: This type of repository is known as a Trivial Repository.

This type of repository does not fully comply with Debian standards, so should not be used commercially. However, it is ideal for home or personal use.

  • Install Package Tools
sudo apt-get install dpkg-dev
  • Create Repos on Filesystem
mkdir /somewhere/apt
mkdir /somewhere/apt/archives
mkdir /somewhere/apt/archives/binary
  • (Optional) Copy existing local APT cache to your Repos
cp -v /var/cache/apt/archives/*.deb /somewhere/apt/archives/binary/
  • Create Package Lists for Repos
cd /somewhere/apt/archives
dpkg-scanpackages binary /dev/null | gzip -9c > binary/Packages.gz
  • Publish Repos with Apache
cd /var/www
sudo ln -s /somewhere/apt/archives apt
  • Add Repos to Sources (on all PCs) to /etc/apt/sources.list

Open /etc/apt/sources.list

sudo gedit /etc/apt/sources.list

Add the following to the bottom of the file:

# My Repos
deb http://localhost/apt binary/
  • Update APT Database
sudo apt-get update

Updating Repository

Simply copy or download ".deb" files to /somewhere/apt/archives/binary/ and then update the Packages list:

cd /somewhere/apt/archives
dpkg-scanpackages binary /dev/null | gzip -9c > binary/Packages.gz

Streaming Media Server

How to install GNUMP3d for Streaming Media Server service

e.g. /var/music/ is the directory containing multimedia files
sudo apt-get install gnump3d

How to change the default directory containing multimedia files for GNUMP3d

  • In this example:
The new directory containing multimedia files is /home/music/
sudo cp /etc/gnump3d/gnump3d.conf /etc/gnump3d/gnump3d.conf_backup
gksudo gedit /etc/gnump3d/gnump3d.conf
  • Find this line:
root = /var/music
  • Replace with the following line:
root = /home/music
  • Find this line:
user = gnump3d
  • Replace with the following line:
user = root
  • Restart the Gnump3 server.
sudo /etc/init.d/gnump3d restart
  • Verify the service is running:
http://localhost:8888

How to change the default port number for GNUMP3d

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

How to enable downmixing support (for streaming outside your LAN)

sudo cp /etc/gnump3d/gnump3d.conf /etc/gnump3d/gnump3d.conf_backup
gksudo gedit /etc/gnump3d/gnump3d.conf
  • Find this line
# downsample_enabled = 1
  • Uncomment the line (remove the '#' hash symbol) so it looks like this
downsample_enabled = 1
  • Then find these lines
# downsample_clients = ALL
# no_downsample_clients = 192.168.0.0/24
  • Replace them with these lines
downsample_clients = ALL 
no_downsample_clients = 192.168.0.0/24
no_downsample_clients = 10.0.0.0/24
no_downsample_clients = 172.16.0.0/12
  • Finally, find these lines
#downsample_high_mp3   = /usr/bin/lame  --mp3input -b 56 $FILENAME -
#downsample_medium_mp3 = /usr/bin/lame  --mp3input -b 32 $FILENAME -
#downsample_low_mp3    = /usr/bin/lame  --mp3input -b 16 $FILENAME -
#
#downsample_high_ogg   = /usr/bin/sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix -b 96 -
#downsample_medium_ogg = /usr/bin/sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix -b 64 -
#downsample_low_ogg    = /usr/bin/sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix --resample 22050 -b 32 -
  • And uncomment them as well (remove all the '#' hash symbols) so they look like this
downsample_high_mp3   = /usr/bin/lame  --mp3input -b 56 $FILENAME -
downsample_medium_mp3 = /usr/bin/lame  --mp3input -b 32 $FILENAME -
downsample_low_mp3    = /usr/bin/lame  --mp3input -b 16 $FILENAME -

downsample_high_ogg   = /usr/bin/sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix -b 96 -
downsample_medium_ogg = /usr/bin/sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix -b 64 -
downsample_low_ogg    = /usr/bin/sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix --resample 22050 -b 32 -
  • Save the edited file
sudo /etc/init.d/gnump3d restart

How to downmix MP3 to Ogg Vorbis (better quality)

sudo cp /etc/gnump3d/gnump3d.conf /etc/gnump3d/gnump3d.conf_backup
gksudo gedit /etc/gnump3d/gnump3d.conf
  • Find these lines
downsample_high_mp3   = /usr/bin/lame  --mp3input -b 56 $FILENAME -
downsample_medium_mp3 = /usr/bin/lame  --mp3input -b 32 $FILENAME -
downsample_low_mp3    = /usr/bin/lame  --mp3input -b 16 $FILENAME -
  • Replace them with these lines
downsample_high_mp3   = /usr/bin/madplay $FILENAME -o raw:- | oggenc --raw --downmix -b 96 -
downsample_medium_mp3 = /usr/bin/madplay $FILENAME -o raw:- | oggenc --raw --downmix -b 64 -
downsample_low_mp3    = /usr/bin/madplay $FILENAME -o raw:- | oggenc --raw --downmix --resample 22050 -b 32 -
  • Save the edited file
sudo /etc/init.d/gnump3d restart

How to add downmixing support for FLAC audio

sudo apt-get install flac
  • Find the following lines
downsample_high_ogg   = /usr/bin/sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix -b 96 -
downsample_medium_ogg = /usr/bin/sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix -b 64 -
downsample_low_ogg    = /usr/bin/sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix --resample 22050 -b 32 -
  • Just under those, add the following lines
downsample_high_flac 	= /usr/bin/oggenc --downmix -b 96 $FILENAME -o -
downsample_medium_flac 	= /usr/bin/oggenc --downmix -b 64 $FILENAME -o -
downsample_low_flac 	= /usr/bin/oggenc --downmix --resample 22050 -b 32 $FILENAME -o -
  • Save the edited file
sudo /etc/init.d/gnump3d restart

How to add downmixing support for AAC/MPEG-4 audio

sudo apt-get install faad
  • Find the following lines
downsample_high_ogg   = /usr/bin/sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix -b 96 -
downsample_medium_ogg = /usr/bin/sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix -b 64 -
downsample_low_ogg    = /usr/bin/sox -t ogg $FILENAME -t raw - | oggenc --raw --downmix --resample 22050 -b 32 -
  • Just under those, add the following lines
downsample_high_m4a 	= /usr/bin/faad $FILENAME -d -o - | oggenc --raw --downmix -b 96 - -o -
downsample_medium_m4a	= /usr/bin/faad $FILENAME -d -o - | oggenc --raw --downmix -b 64 - -o -
downsample_low_m4a	= /usr/bin/faad $FILENAME -d -o - | oggenc --raw --downmix -b --resample 22050 -b 32 - -o -
  • Save the edited file
sudo /etc/init.d/gnump3d restart

Groupware (Email/Calendaring)

How to install Meldware Communication Suite

  • Read #General Notes
  • Read #How_to_install_Java_Development_Kit_.28JDK.29_v5.0
  • Meldware Communication Suite provides a multi-platform alternative to popular groupware like Exchange or Lotus Notes including Email(SMTP/POP/IMAP) and Calendaring(iCAL,WCAP). It depends on Java and, optionally, for the webmail/webcal client, Flash.
sudo apt-get install sun-java5-jdk
sudo update-java-alternatives -s java-1.5.0-sun
  • Download the jar file for a recent milestone or build here
  • Open a new terminal (capture java path updates)
  • change directory to your download directory
  • replace below filename with correct version based on your download
sudo java -jar buni-meldware-20070225.jar
  • A series of configuration questions are asked, for destination directory specify /opt/mcs
sudo cp /etc/init.d/skeleton /etc/init.d/meldware-cs
gksudo gedit /etc/init.d/meldware-cs
  • Replace the value in the line beginning with PATH with "/usr/sbin:/usr/bin:/sbin:/bin:/opt/mcs/bin" excluding quotes (assuming you specified /opt/mcs as the destination directory to the installer)
  • Replace the value in the line beginning with DESC with "Meldware Communication Suite" including quotes
  • Replace the value in the line beginning with NAME with "run.sh" excluding quotes
  • Replace the value in the line beginning with DAEMON with "/opt/mcs/bin/$NAME" excluding quotes
  • Replace the value in the line beginning with DAEMON_ARGS with "-c meldware" excluding quotes
  • Replace the value in the line beginning with SCRIPTNAME with "/etc/init.d/meldware-cs" excluding quotes
  • save (ESC):wq
sudo chmod 755 /etc/init.d/meldware-cs
sudo ln -s /etc/init.d/meldware-cs /etc/rc3.d/S21meldware-cs
sudo ln -s /etc/init.d/meldware-cs /etc/rc6.d/K21meldware-cs
sudo ln -s /etc/init.d/meldware-cs /etc/rc4.d/S21meldware-cs 
  • start MCS
sudo /etc/init.d/meldware-cs restart
  • Additional documentation is available here

Image Gallery Server

  • For a comparison between Gallery1 and Gallery2 see here

Gallery1

How to install Gallery1 for Image Gallery Server service
sudo apt-get install gallery (when prompted to restart Apache, choose No or Cancel)
sudo apt-get install imagemagick
sudo apt-get install jhead
sudo apt-get install libjpeg-progs
sudo /etc/init.d/apache2 restart
sudo sh /usr/share/gallery/configure.sh
Gallery Configuration Wizard: Step 1
Next Step ->
Gallery Configuration Wizard: Step 2
General settings Tab ->
Admin password: Specify the password

Locations and URLs Tab ->
Album directory: /var/www/albums/
Temporary directory: /tmp/
Gallery URL: http://localhost/gallery
Albums URL: http://localhost/albums
Next Step -->
Gallery Configuration Wizard: Step 3
Next Step -->
Gallery Configuration Wizard: Step 4
Save Config ->
How to configure Gallery1 to be accessible via Internet (Hostname or fix IP) or LAN (fix IP)
  • In this example:
The host's Internet URL is http://www.url.com
sudo cp /etc/gallery/config.php /etc/gallery/config.php_backup
gksudo gedit /etc/gallery/config.php
  • Find this section:
...
$gallery->app->photoAlbumURL = "http://localhost/gallery";
$gallery->app->albumDirURL = "http://localhost/albums";
...
  • Replace with the following lines:
$gallery->app->photoAlbumURL = "http://www.url.com/gallery";
$gallery->app->albumDirURL = "http://www.url.com/albums";
  • Verify the gallery is accessible:
http://www.url.com/gallery/albums.php
How to configure Gallery1 to be accessible via LAN (dynamic IP)
  • For this example:
the host running Gallery 1 is located on the LAN at (dynamic IP): 192.168.0.2
sudo cp /etc/gallery/config.php /etc/gallery/config.php_backup
gksudo gedit /etc/gallery/config.php
  • Find this section
...
$gallery->app->photoAlbumURL = "http://localhost/gallery";
$gallery->app->albumDirURL = "http://localhost/albums";
...
  • Replace with the following lines
$gallery->app->photoAlbumURL = "/gallery";
$gallery->app->albumDirURL = "/albums";
  • Look for the gallery:
http://192.168.0.2/gallery/albums.php
How to backup/restore Gallery1 data
sudo tar zcvf gallery.tgz /var/www/albums/ /etc/gallery/
  • To restore Gallery data
sudo tar zxvf gallery.tgz -C /

Gallery2

How to install Gallery2
How to configure Gallery2

How to install Subversion version control server (with Apache support)

  • Install Subversion and Apache 2 Module
sudo apt-get install subversion apache2 libapache2-svn
  • Enable Subversion/DAV Apache 2 Module
sudo a2enmod dav_svn
  • Configure Apache 2
sudo nano /etc/apache2/mods-enabled/dav_svn.conf

Edit the file to look something like this:

<Location /svn>
  DAV svn
  SVNPath /home/svn

  AuthType Basic
  AuthName "Subversion Repository"
  AuthUserFile /etc/apache2/dav_svn.passwd
  Require valid-user
</Location>
  • Create Subversion Repository
sudo mkdir /home/svn
sudo svnadmin create /home/svn
  • Give Apache 2 Permissions to Repository
sudo chown -R www-data /home/svn
  • Create Repository User

Replace 'username' with your username

sudo htpasswd -cm /etc/apache2/dav_svn.passwd username

Enter password when prompted.

  • Restart Apache 2
sudo /etc/init.d/apache2 restart
  • Working with the new repository

Open a terminal window and paste:

svn checkout http://username@localhost/svn lucky

You will be prompted to enter the password. Now you have a working copy in the directory 'lucky'. Now lets create a file and commit it.

cd lucky
mousepad Hello.txt

Enter anything you like in the file and click save, Exit.

svn add Hello.txt

Now you added the file but it won't appear in the repository yet, you have to commit it. To commit, its as easy as doing the following:

svn commit

Now check your repository using the web browser at http://localhost/svn/.

How to install Subversion version control server (svnserve)

  • Install Subversion and Internet services daemon
sudo apt-get install subversion xinetd
  • Create user that will own the repositories
sudo adduser --system --no-create-home --home /var/svn --group --disabled-login svn
  • Create directory that will hold the repositories
sudo mkdir /var/svn
sudo chown -R svn:svn /var/svn
  • Create file /etc/xinetd.d/svnserve with the following content
service svn
{
       port = 3690
       socket_type = stream
       protocol = tcp
       wait = no
       user = svn
       server = /usr/bin/svnserve
       server_args = -i -r /var/svn
}
  • Restart xinetd
sudo /etc/init.d/xinetd restart
  • Create the first repository
sudo -u svn svnadmin create /var/svn/testrepo
  • It should be possible to check out the repository and work on it
svn co svn://localhost/testrepo

PhpGedView Server

PhpGedView allows you to view and edit your genealogy (family tree) on your website.

How to install PhpGedView Server

sudo apt-get install phpgedview

How to configure PhpGedView with MySQL

gksudo gedit /etc/phpgedview/config.php

Edit /etc/phpgedview/config.php to reflect the following changes.

$DBTYPE = "mysql";
$DBHOST = "localhost";
$DBUSER = "phpgedview_my_family";
$DBPASS = "password_for_dbuser";
$DBNAME = "phpgedview_my_family";

I made $DBUSER the same as $DBNAME because it is easier to create user and database privileges using phpMyAdmin.

http://localhost/phpmyadmin

Log into phpMyAdmin as root with no password if you have not changed the root password for MySQL yet.

Click on "Privileges" (fourth from the bottom in the middle column).

Click "Add a new User".

Login Information
  User name: [Use text field:] phpgedview_my_family (same as $DBUSER above)
  Host: [Local] localhost
  Password: [Use text field:] password_for_dbuser (same as $DBPASS above)
  Re-type: password_for_dbuser (same as $DBPASS above)
Database for user
  [x] Create database with same name and grant all privileges

Click "Go".

MySQL should now have your new PhpGedView user and database. Go back to phpMyAdmin's home page and "Reload privileges".

Add PhpGedView to Apache.

sudo ln -s /etc/phpgedview/apache.conf /etc/apache2/sites-available/phpgedview
sudo a2ensite phpgedview #equivalent to 'ln -s /etc/apache2/sites-available/phpgedview phpgedview'
sudo /etc/init.d/apache2 restart
gksudo gedit /etc/phpgedview/config_gedcom.php

Optionally edit /etc/phpgedview/config_gedcom.php to reflect the following changes.

$CONTACT_EMAIL = "you@yourdomain.com";
$WEBMASTER_EMAIL = "webmaster@yourdomain.com";
$HOME_SITE_URL = "http://localhost/phpgedview";
$HOME_SITE_TEXT = "My Family PhpGedVIew";

Create the initial administrator account for your new PhpGedView server.

http://localhost/phpgedview

Continue creating users, uploading your existing GEDCOM file, or start creating your family tree.

http://wiki.phpgedview.net/en/index.php/Installation_Guide

Troubleshooting

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

sudo cp /etc/default/rcS /etc/default/rcS_backup
gksudo gedit /etc/default/rcS
  • Find this line
...
UTC=yes
...
  • Replace with the following line
UTC=no
  • Save the edited file
  • System -> Administration -> Time and Date

Set the correct time/date

sudo /etc/init.d/hwclock.sh restart

How to configure sound to work properly in GNOME

sudo killall esd
sudo cp /etc/esound/esd.conf /etc/esound/esd.conf_backup
gksudo gedit /etc/esound/esd.conf
  • Find this section
...
auto_spawn=0
spawn_options=-terminate -nobeeps -as 5
...
  • Replace with the following lines
auto_spawn=1
spawn_options=-terminate -nobeeps -as 2 -d default
  • Save the edited file
sudo apt-get install libesd-alsa0
gksudo gedit /etc/asound.conf
  • Insert the following lines into the new file
pcm.card0 {
type hw
card 0
}

pcm.!default {
type plug
slave.pcm "dmixer"
}

pcm.dmixer {
type dmix
ipc_key 1025
slave {
pcm "hw:0,0"
period_time 0
period_size 2048
buffer_size 32768
rate 48000
}
bindings {
0 0
1 1
}
}
  • Save the edited file
sudo ln -fs /usr/lib/libesd.so.0 /usr/lib/libesd.so.1
System -> Preferences -> Sound
Sound preferences
General Tab -> Sounds for events (Un-Checked)
  • Save and close all opened applications, Reboot computer

How to forcefully empty Trash in GNOME

sudo rm -fr $HOME/.Trash/*

How to remove duplicate menu/menu items in GNOME

How to refresh Places menu in GNOME (if mounts to /media/ in /etc/fstab does not show up)

sudo /etc/init.d/dbus restart



Requests

If you have requests that you would like to be part of this guide, put them here.

  • How to run Windows Live Messenger or MSN Messenger under wine.
  • How to connect to mobile phones.
  • How to connect to a mobile phone via infrared to use phone as an IR modem.
  • How to produce an update cd/dvd similar to the install cd which can be used as a repository
  • How to upgrade to new release from an ISO file (without burning)
  • How to enable bluetooth and bluetooth internet connection sharing
  • How to install SElinux on ubuntu 7.04 Server?
  • How to install (and use) a Intel 536ep modem?
  • How to enable sound on a Toshiba Satellite A110-103?
  • How to enable optical audio out via IEC958, aka. S/PDIF?
  • How to set up Spam Assasin to filter emails on a client machine?
  • How to emulate an iPod device when have just a simple MP3 player attached via firewire or USB device?
  • How to get a very simple text editor for the konsole that compares to MS-DOS EDIT style editors / Ncurses interface?
  • How to install low saxon support for feisty
  • How to install and configure OpenVPN server and client
  • How to change default applications from archive manager to Package Installer
  • How to stop your cat from walking on your keyboard while you type.

Guide Development

Place ideas here to increase the look and performance of this guide.

  • Add a new section for Gnome Themes from http://art.gnome.org and KDE Themes from http://www.kde-look.org/.
  • Make headings (categories) stand out more visually.
  • Have entries under their headings in alphabetical order.
  • Try to keep the guide neat and clutter free.
  • Possible "Short Version" Table of contents without each "How to".
  • Add a [top] link to the end of each article.
Reference.

If possible, include a 'find/search' function to easily access queries.

Personal tools
Sponsor
   CuBox