If you are using an outdated version of Ubuntu, you should consider updating it to Feisty. There have been considerable improvements to this version, and the updater used in Feisty will ease transitions to future versions. If you are in a production environment, or if everything works perfectly for you, you may wish to stay with a Long-Term Support (LTS) version.
To upgrade an outdated version or update your current version, read #Updates and Upgrades.
General Notes
- This is an Unofficial Ubuntu 7.04 (Feisty Fawn) Starter Guide. It is neither associated with Ubuntu nor with Canonical Ltd.
- This guide can be discussed at the official UbuntuGuide.org Forum at ubuntuforums.org. Stop by and join the discussion.
- 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.
- 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)
- "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.
- 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.
- If you are tired of typing "apt-get" all the time, use the synaptic package manager, a front end to apt-get.
- "apt-get" and "wget" requires Internet connection to install/update/download programs
- All references to "aptitude" will be replaced with "apt-get". You may still use "aptitude" if you wish, however could cause dependency issues.
- To download file, right click on the link -> Select "Save Link As..." -> Make sure file name and extension are correct
- If you wish to help translating Ubuntu to your native language or to help Ubuntu otherwise visit https://launchpad.net/
- 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?
- KubuntuGuide
- XubuntuGuide
- Ubuntu Step By Step Guides For Ubuntu Users
- The Ubuntu Wiki
- Free Ubuntu Linux E-books
- Official Ubuntu Documentation Help Guide
Desktop environments
Where to view Ubuntu screenshots / screencast
This is the Gnome based desktop environment, which is the default for Ubuntu.
- Ubuntu 7.04(Feisty Fawn) Screenshots Tour
- Ubuntuclips.org - video howto's for human beings
- Ubuntu Video - linux videos for human beings
Where to view Kubuntu screenshots / screencast
This is the KDE based desktop environment. See Kubuntuguide.org.
How to install KDE (Kubuntu)
- Read #General Notes
- Read #How to add extra repositories
- You may also look at some KDE Screenshots
- See Kubuntuguide.org
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)
- Remove the desktop package:
sudo apt-get 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)
- Read #General Notes
- Read #How to add extra repositories
- You may also look at some XFCE Screenshots
- See Xubuntuguide.org.
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)
Remove the desktop package:
sudo apt-get 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.
- Read #General Notes
- Read #How to add extra repositories
sudo apt-get install fluxbox menu
- Start Fluxbox from GDM:
echo "exec startfluxbox" > ~/.xinitrc
- Change the login sound:
sudo apt-get install sox 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 (/usr/share/backgrounds) for users other than root. The simplest way around this is to create any folder (into which you will place your pictures to be used for the screensaver) and then place a symbolic link to that folder in /usr/share/backgrounds. In the example, I will make a folder called screensaverpics, but it can be any folder.
mkdir ~/screensaverpics gksudo ln -s /usr/share/backgrounds ~/screensaverpics
Using gksudo vs. sudo
Commands (in the command line terminal) that require administrator or root privileges must be preceded by sudo, or the graphical version, gksudo. For most uses, the commands are interchangeable and either can be used.
However, there are some subtle differences. Specifically, gksudo launches with the root configuration files, while sudo launches with the user's configuration files.
Here is a nice discussion. This discussion recommends gksudo 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, gksudo can usually be substituted.
(Note: gksudo 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 Beryl (ATI)
- For an introduction to Beryl, read Beryl (Wikipedia)
- Read: #General Notes
- Read #How to add extra repositories
- These are legacy instructions and may not work. Always try the Ubuntu compiz package first.
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.
- Read #How to add extra repositories. Add this to your repository list (or directly to /etc/apt/sources.list using gedit):
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
- For more info:ubuntuforums discussion
- This has been tested for 32-bit version only.
- 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 -
- Read #How to add extra repositories. Add this to your repository list (or directly to /etc/apt/sources.list using gedit):
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)
- For an introduction to Beryl, read Beryl (Wikipedia)
- Read #General Notes
- Read #How to add extra repositories
- These are legacy instructions and may not work. Always try the Ubuntu compiz package first.
- Read Beryl and Nvidia Drivers Installation Steps
- Read Howto Fix Beryl Workspaces Problem in Feisty Fawn
- 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.
- 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
- For more info: Video playback problems(black) after installing Beryl (or Compiz)/February 23rd, 2007 and Re: Movies minus blue background/May 3rd, 2007
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.
- For i386, read #How to add extra repositories and add the following to the repository list (or directly to /etc/apt/sources.list using gedit):
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 -
- For AMD64/EMT read #How to add extra repositories and add the following to the repository list (or directly to /etc/apt/sources.list using gedit):
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
- Reboot your computer or restart X-Windows to see the changes take effect.
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)
- Read: #General Notes
- Read #How to add extra repositories and add this repository (or edit your /etc/apt/sources.list using gedit to include):
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
- More info: How to Install Compiz Fusion on Ubuntu)
How to install Compiz (Nvidia)
Project Looking Glass
This is a 3-D window manager based on Java technology.
- Read Getting Started with Project Looking Glass
- A .deb package is available for download.
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
- Read #General Notes
- Read #How to add extra repositories
- From the command line:
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
- Read #General Notes
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:
sudo 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
- Other third-party repositories are listed at: http://www.ubuntulinux.nl/source-o-matic or http://3v1n0.tuxfamily.org/blog/lista-repository-sourceslist-ottimizzata-per-ubuntu-kubuntu-linux/
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.
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 doe.
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
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.
- For info: Simple GIP Installation Guide
How to install Firefox Widgets
Firefox Widgets fixes Firefox's icons, such as Buttons and Radio Buttons.
- For info: Firefox Widgets
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
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
- Read #General Notes
- Read #How to add extra repositories
- (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)
- Visit Adobe.com: Version test for Adobe Flash Player. Follow the steps for installation.
Install from tarball (method 3)
- Visit:[1]
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 sudo 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)
- Read #General Notes
- Read #How to add extra repositories
- 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.2-1.x86_64.rpm wget http://gwenole.beauchesne.info/projects/nspluginwrapper/files/nspluginwrapper-i386-0.9.91.2-1.x86_64.rpm
Install alien and unrar:
sudo apt-get install alien unrar
Debianize packages with alien:
sudo alien nspluginwrapper-0.9.91.2-1.x86_64.rpm sudo alien nspluginwrapper-i386-0.9.91.2-1.x86_64.rpm
Install packages:
sudo dpkg -i nspluginwrapper-0.9.91.2-1.x86_64.deb sudo dpkg -i nspluginwrapper-i386-0.9.91.2-1.x86_64.deb
(Filenames might be slightly different)
Download FlashPlayer from the Adobe site:
wget http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_9_linux.tar.gz tar xf install_flash_player_9_linux.tar.gz
Go into the directory of created from untar and copy the 2 files �libflashplayer.so� and �flashplayer.xpt� into /usr/lib/mozilla-firefox/plugins:
sudo cp libflashplayer.so /usr/lib/mozilla-firefox/plugins sudo cp flashplayer.xpt /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 built in 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.
Until I viewed this page from a browser other than Firefox recently, I hadn't even known that there were 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
- Read #General Notes
- Read #How to add extra repositories
- 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.
- Read #General Notes
- Read #How to add extra repositories
- 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.
- Read #General Notes
- Read #How to add extra repositories
- 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):
sudo gedit /etc/default/timidity
Uncomment the following line (remove the "#" sign):
#TIM_ALSASEQ=true
- Set the required modules to load at bootup:
sudo 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)
- Read #General Notes
- Read #How to add extra repositories
- Read #How to install Multimedia Codecs
- Read #How to install DVD playback capability
sudo apt-get install totem-gstreamer-firefox-plugin
- Restart Mozilla Firefox
Kaffeine plug-in (KDE users)
- Read #General Notes
- Read #How to add extra repositories
- Read #How to install Multimedia Codecs
- Read #How to install DVD playback capability
sudo apt-get install kaffeine-mozilla
- Restart Mozilla Firefox
MPlayer plug-in (Installs MPlayer media player as well)
- Read #General Notes
- Read #How to add extra repositories
- See also:#How to install Multimedia Player (MPlayer)
sudo apt-get install mozilla-mplayer
- Restart Mozilla Firefox
VLC plug-in (Installs VLC media player as well)
- Read #General Notes
- Read #How to add extra repositories
- See also: #How to install Multimedia Player (VLC)
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)
- Read #General Notes
- Read #How to add extra repositories
- See also: #How to install Helix Multimedia Player
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.
- Read #General Notes
- Read #How to add extra repositories
- Step By Step Installation Guide for Elisa Multimedia Player
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)
- Read #General Notes
- Read #How to add extra repositories
- 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
- Read #General Notes
- Read #How to add extra repositories
- Read #How to install Multimedia Codecs
- Read #How to install DVD playback capability
- Read How to install xine 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
- Read #General Notes
- Read #How to add extra repositories
- Read #How to install Multimedia Codecs
- Read #How to install DVD playback capability
- Read Mplayer Installation and Multimedia Codecs (libdvdcss2,w32codecs) in Ubuntu Feisty Guide
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
- Read #General Notes
- Read #How to add extra repositories
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
- Read #General Notes
- Read #How to add extra repositories
- Read #How to install Multimedia Codecs
- Note: Amarok is already installed if you are using KDE.
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 actually based on the open-source Helix player. Helix itself can be installed as a package easily (see below) and used instead of Realplayer. These instructions are to install the proprietary version of Realplayer only.
- Read #General Notes
- Read #How to add extra repositories
- Download Realplayer's Official Linux Version
- Add execute permissions to the installer and run it:
chmod +x RealPlayer10GOLD.bin sudo ./RealPlayer10GOLD.bin
How to install Helix Multimedia Player
Helix is the open-source package that plays Realplayer files. Realplayer is actually based on this package.
- 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)
- Read #General Notes
- Read #How to add extra repositories
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
- To get the newest version of Miro, see instructions here:
- Read #How to add extra repositories. Add this to your repository list (or directly to /etc/apt/sources.list using gedit). (It is an Ubuntu-affiliated repository.):
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)
- Read #General Notes
- Read #How to add extra repositories
- Read azureus Bittorrent Setup Guide including Screenshots
- Install:
sudo apt-get install azureus
- Run:
Applications-->Internet-->Azureus
How to install P2P BitTorrent Client (Deluge)
- Read #General Notes
Installing Binary (Stable)
- Download and install (i386)
wget http://download.deluge-torrent.org/ubuntu/feisty/0.5.3/deluge-torrent_0.5.3-1_i386.deb && \ sudo apt-get install libboost-date-time1.33.1 libboost-filesystem1.33.1 libboost-thread1.33.1 && \ sudo dpkg -i deluge-torrent_0.5.3-1_i386.deb && \ rm deluge-torrent_0.5.3-1_i386.deb
- Download and install (amd64)
wget http://download.deluge-torrent.org/ubuntu/feisty/0.5.3/deluge-torrent_0.5.3-1_amd64.deb && \ sudo dpkg -i deluge-torrent_0.5.3-1_amd64.deb && \ rm deluge-torrent_0.5.3-1_amd64.deb
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/
- Download Deluge Plugins (Optional)
- 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:
sudo 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.1.0 Instant Messenger
This is an Internet messenger replacement for GAIM. You can also choose Interenet Messenger programs from the Applications-->Add/Remove.. menu bar (recommended).
- Install the Pidgin debian package:
wget http://download.ubuntu.pl/_Feisty_Fawn/pidgin/2.1.0/pidgin_2.1.0-1_i386.deb sudo dpkg -i pidgin_2.1.0-1_i386.deb
How to configure Google Talk for Pidgin
How to install Ninan (NZB usenet client)
- Read #General Notes
- Read #How to add extra repositories
- Ensure that Java is installed by reading #How to install J2SE Runtime Environment (JRE) v6.0 with Plug-in for Mozilla Firefox
- Set the export Path for Java:
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:
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.
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 sudo 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
- Beginner's instructions are at: Drupal Cookbook.
- 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
- Read #General Notes
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
- Read #General Notes
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
Miscellaneous
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
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.
- Read #General Notes
- Read #Ubuntu_Feisty_LAMP_Server
- Detailed instructions at http://www.zoneminder.com/wiki/index.php/Ubuntu_7.04
- 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-6_i386.deb
- Install using the Debian package manager. (No other method seems to work.)
dpkg -i zoneminder_1.22.3-6_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
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).
- Read the Home Automation website and the Linux Home Automation website.
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.
- Read Linux software. Here are some examples:
- Heyu works with the CM11A interface. BlueLava allows you to access Heyu over the Internet for remote control. xtend is a frontend for Heyu.
- HomeDaemon uses the CM11A interface.
- Bottlerocket works with the C17A Firecracker device. There are several GUI frontends and web interfaces for it (see site.) bottlerocket is available as a module from Synaptic Package Manager, as is wmx10, an applet GUI for bottlerocket.
- GtkX10 is a GUI for the C17A Firecracker.
- The Tk (Wish)-based GUI for X10 is available as a Synaptic Package Manager package named x10-automate (which will also install the x10 interface package). It works with the the (older) CP290 interface.
- Project WiSH provides drivers to control PowerLinc interfaces (version 1 USB and Serial, but not version 2), and CM11A. It is provided as a .tar.gz package. It can be used with x10web Java GUI.
- Insteon PowerLinc support page -- you must like to get into the nuts and bolts! Not for the beginner.
- MisterHouse is a collection of powerful perl scripts that is quite configurable, if you don't mind customizing perl scripts.
- Zoneminder surveillance software can trigger X10 events using built-in perl scripts over a CM11A interface.
- Commercial-grade Linux home automation software:
- LinuxMCE -- open source whole home automation and multimedia manager, based on KDE (Kubuntu). An outgrowth of the Pluto project, for use on an existing Linux platform.
- Pluto Software -- Linux based open source and commercial home automation software and multimedia manager for your entire home. Designed as a stand-alone server, it is distributed with its own integrated Debian distro.
- ECS (Omnipotence Software) -- controls X10, Insteon, and many other types of devices (commercial).
How to install applications for study of religious texts
- For study of Bible see GnomeSword
- For study of Quran see Zekr
How to install Gnomesword (Bible study program)
- Read #General Notes
- Read #How to add extra repositories
- This installs the english version of the 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.
- Read #General Notes
- Read #How to add extra repositories
- Read #How to install J2SE Runtime Environment (JRE) v6.0 with Plug-in for Mozilla Firefox
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 ttf-farsiweb sudo apt-get install ttf-me-quran ttf-scheherazade zekr
- To install extra Quran translations available for zekr:
sudo apt-get install zekr-quran-translation-extras
- For more info see Zekr wiki.
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
- For more info: http://icanthack.com/?p=53
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.
- Read #General Notes
- Read #How to add extra repositories
Install from Synaptic Package Manager
System-->Administration-->Synaptic Package Manager-->Search--> wine
All dependencies and setup will be done automatically.
- 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.
Install Wine from command line (apt-get)
- Add the repository's key to your system's list of trusted APT.
wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add - sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/feisty.list -O /etc/apt/sources.list.d/winehq.list
sudo apt-get install wine
Finally, go to your Update Manager to check if you have the latest Wine release. System -> Administration -> Update Manager
How to manually run programs in Wine (from a command-line terminal)
- Read #How to Install Wine
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
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"
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
- Get and install Citrix ICA Client (English package) from the Citrix website at http://www.citrix.com/site/SS/downloads/details.asp?dID=2755&downloadID=3323#top:
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.
- Alternate installation instructions are here (German site) and here (Malaysian site).
How to Uninstall Citrix ICAClient 10
/usr/lib/ICAClient/setupwfc
User Administration
How to switch to root user in Console mode
- Read #General Notes
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
- Read #General Notes
sudo passwd root
How to disable root user account
- Read #General Notes
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
- Read #General Notes
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
- Read #General Notes
System -> Administration -> Users and Groups Groups -> Add Group.../Properties/Delete
How to automatic login into GNOME
- Read #General Notes
- Automatic login is not secure.
System-->Administration-->Login Window Security-->Enable Automatic Login
Choose a user from the drop-down menu.
How to allow more sudoers
- Read #General Notes
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)
- Read #General Notes
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
- Read #General Notes
sudo -K
How to change files/folders permissions
- Read #General Notes
Right click on files/folders -> Properties
Permissions Tab -> Read/Write/Execute (Checked the permissions for Owner/Group/Others)
How to change files/folders ownership
- Read #General Notes
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
- Read #General Notes
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 "67" & 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
- Select 'System' > 'Preferences' > 'Sessions'
- Click the StartUp tab
- Click Add, then input: /home/login/mouse
- 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" 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
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" 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" 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)
- WARNING this is very error prone.. a better method is to use Alberto Milones Envy program; http://albertomilone.com/nvidia_scripts1.html
- Thanks to Alberto Milone
- The nVidia driver has been split into different branches; latest and new legacy. See http://us.download.nvidia.com/XFree86/Linux-x86/1.0-9755/README/appendix-a.html to find out which driver you should be using. Latest=97xx / New Legacy=96xx
sudo 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
sudo 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
- Read #General Notes
- Some LCD monitors are equipped with the pivot feature, to take advantage of it the display has to be rotated 90 degrees. The default nVidia drivers shipped with X.org ("nv") support software screen rotation. Note that it's unaccelerated and can be slow, read #How to install Graphics Driver (NVIDIA) if you decide to install the proprietary driver.
- If you have the proprietary drivers from nVidia installed, please read #How to setup pivot (screen rotation) with proprietary NVIDIA drivers instead.
- To rotate the screen find the "Device" section for the "nv" driver in the /etc/X11/xorg.conf file:
Section "Device" Identifier "NVIDIA Corporation NV34 [GeForce FX 5200]" Driver "nv"
- Add the following options to this section:
Option "Rotate" "CW"
Where the "Rotate" option has two possible values (depending on the orientation of the monitor):
- CW - rotate the display clockwise (right).
- 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:
- Setting the "Rotation" property to either "Left" or "Right" in the "System > Preferences > Screen Resolution" dialog.
- 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"
- Save the edited file
- Read #How to restart GNOME without rebooting computer
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
- Information and inspiration drawn from http://ubuntuforums.org/showthread.php?p=1773584
How to install Graphics Driver (ATI)
How to Correct the Graphics Resolution (Intel)
- Read #How to enable Large Widescreen Support if you have a larger (>20") monitor
- 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)
- Read #General Notes
- Read #How to add extra repositories
sudo apt-get install lm-sensors
Create file called mkdev.sh, and paste in the following
#!/bin/bash # Here you can set several defaults. # The number of devices to create (max: 256) NUMBER=32 # The owner and group of the devices OUSER=root OGROUP=root # The mode of the devices MODE=600 # This script doesn't need to be run if devfs is used if [ -r /proc/mounts ] ; then if grep -q "/dev devfs" /proc/mounts ; then echo "You do not need to run this script as your system uses devfs." exit; fi fi i=0; while [ $i -lt $NUMBER ] ; do echo /dev/i2c-$i mknod -m $MODE /dev/i2c-$i c 89 $i || exit chown "$OUSER:$OGROUP" /dev/i2c-$i || exit i=$[$i + 1] done #end of file
Make this file executable, then run it
sudo chmod +x mkdev.sh sudo ./mkdev.sh
Now detect sensors, and answer "y" to all questions.
sudo sensors-detect
To load the manual modules, type
sudo /etc/init.d/module-init-tools
Load the modules into kernel with
sudo sensors -s
And check the output
sudo sensors
How to control fan speed (lm-sensors)
Install and config lm-sensors first, see section above. Then run pwmconfig to test your fans
pwmconfig
If you can control fan speeds, great. Now creat a file called /etc/init.d/fancontrol, and paste in the following
#!/bin/sh # # Fancontrol start script. # set -e # Defaults DAEMON=/usr/sbin/fancontrol PIDFILE=/var/run/fancontrol-pid PATH=/sbin:/bin:/usr/sbin:/usr/bin test -f $DAEMON || exit 0 . /lib/lsb/init-functions case "$1" in start) log_begin_msg "Starting fancontrol daemon..." start-stop-daemon --start -o -q -m -b -p $PIDFILE -x $DAEMON log_end_msg $? ;; stop) log_begin_msg "Stopping fancontrol daemon..." start-stop-daemon --stop -o -q -p $PIDFILE log_end_msg $? ;; force-reload|restart) sh $0 stop sh $0 start ;; *) log_success_msg "Usage: /etc/init.d/fancontrol {start|stop|restart|force-reload}" log_success_msg " start - starts system-wide fancontrol service" log_success_msg " stop - stops system-wide fancontrol service" log_success_msg " restart, force-reload - starts a new system-wide fancontrol service" exit 1 ;; esac exit 0
Make it excutable
sudo chmod +x /etc/init.d/fancontrol
Test it
/etc/init.d/fancontrol start
and
/etc/init.d/fancontrol stop
If it works fine, autoload it when you reboot. Insert the following line into /etc/rc.local, before "exit 0"
/etc/init.d/fancontrol start
How to monitor CPU, GPU temperatures, fan speeds and voltages (GKrellM)
- Read #General Notes
- Read #How to add extra repositories
- Install lm-sensors first to monitor CPU temps, fan speed, and voltages in GKrellM. #How to detect CPU temperature, fan speeds and voltages (lm-sensors)
- Install nvidia video driver to monitor the nvidia GPU temperature. #How to install Graphics Driver (NVIDIA)
- 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)
- Read #General Notes
- Read and Complete #How to monitor CPU, GPU temperatures, fan speeds and voltages (GKrellM)
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
- Read #General Notes
- Read Howto Change CPU Frequency Scaling in Ubuntu For an easier way to enable CPU scaling.
- 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.
Modems / Network
How to identify Modem chipset
- Read #General Notes
- To install Modem chipset identifier
- Read #How to install Basic Compilers (build-essential)
- Read Setting up Dial-up connection in Ubuntu
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 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
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)
- Read #General Notes
- Read #How to add extra repositories
uname -r (must be 2.6.10-5-386) wget -c http://easylinux.info/uploads/sl-modem-modules-2.6.10-5-386_2.9.9a-1ubuntu2+2.6.10-34_i386.deb sudo dpkg -i sl-modem-modules-*.deb sudo apt-get install sl-modem-daemon
Using mobile phone/GPRS/EDGE as Internet modem
"GPRS Easy Connect" (GPRSEC) is a free program for Linux which configures and manages Internet connection via mobile phones. GPRSEC supports COM, USB, IrDA and Bluetooth connections on GPRS, EDGE and UMTS technologies.
Palm
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.
- Read #General Notes
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
- Read #General Notes
sudo fdisk -l
How to list filesystem disk space usage
- Read #General Notes
df -Th
- You can also use System -> Administration -> Disks
How to list mounted devices
- Read #General Notes
mount
How to remount /etc/fstab without rebooting
- Read #General Notes
mount -a
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.
- Read LVM HOWTO.
- Read #Install EVMS GUI for LVM2 and RAID.
- 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
- Read #General Notes
- Read RAID HOWTO.
- Read #Install EVMS GUI for LVM2 and 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
- LVM GUI Project. Java based. Not updated since 2001.
How to Increase ext3 and ReiserFS filesystems Performance
- Read #General Notes
- Read: Step By Step Tutorial How to Increase ext3 and ReiserFS filesystems Performance
How to backup/mirror/synchronize directories using rsync
- Read also #How to copy files/folders from local machine into remote Ubuntu machine (rsync)
- Read also #How to copy files/folders from remote Ubuntu machine into local machine (rsync)
- Read also #Rsync Daemon
- Read this tutorial.
- 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
- Read #General Notes
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
Optical Drives
How to speed up CD/DVD-ROM
- Read #General Notes
- 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
- Read #General Notes
- 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
- Read #General Notes
- 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
- Read #General Notes
- Read #How to add extra repositories
sudo apt-get install i810switch
Turn on CRT output
i810switch crt on
Turn off CRT output
i810switch crt off
Sound
How to make sound work with Intel Integrated Sound Cards
- Read #General Notes
- 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
- If this doesn`t work for you, see the other flavours and options in the source of this information: https://help.ubuntu.com/community/HdaIntelSoundHowto
How to setup surround-sound speakers (5.1 and others) with ALSA
- Read #General Notes
- Edit the ~/.asoundrc file (create it if it doesn't exist):
gksudo gedit ~/.asoundrc
- Enter the following section:
pcm.!default { type plug slave.pcm "surround51" slave.channels 6 route_policy duplicate }
- This will play the surround output by duplicating the stereo output to all 6 channels (not only the front ones).
How to change the default soundcard
- Read #General Notes
- 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 sudo 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�
- Go to Applications->Sound & Video->PulseAudio Preferences (or in a terminal type):
paprefs
Set the following settings:
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.
- To control the volume:
Applications->Sound & Video->PulseAudio Volume Control
- 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
Misc
How to list PCI devices
- Read #General Notes
lspci
How to install a Wacom tablet
For a detailed guide with screenshots about how to configure the "Extended input devices" in your graphic applications, please follow the official Dapper guide at https://wiki.ubuntu.com//Wacom
With the version of the Linux Wacom driver (0.7.2) in Ubuntu 6.06 Dapper Drake, if you unplug you tablet, it won't function when you plug it back in and you will have to restart X. For this reason, it is best to leave the tablet plugged in. This limitation will be removed when the 0.7.4 version of the driver is included in Ubuntu.
- Read #General Notes
- 1. Using Synaptic package manager, check if the packages xserver-xorg-input-wacom and wacom-tools are already installed - if not, install them. If you prefer using the command line, you can also execute :
sudo apt-get install xserver-xorg-input-wacom wacom-tools
- 2. Save a copy of your /etc/X11/xorg.conf :
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
- then edit it with the command line :
gksudo gedit /etc/X11/xorg.conf
- and change all /dev/wacom occurences into /dev/input/wacom (created by wacom-tools udev scripts), then save the file.
- You should be ready to go after you have restarted X. Remember to configure the "Extended input devices" in your graphic applications (Gimp, Inkscape), however you can already check if it's working by moving your stylus on the tablet : the mouse cursor should go through the whole screen.
How to fix strange mouse behavior when using a KVM switch
- Read #General Notes
Some 2-way KVM switches with PS/2 connectors (Keyboard-Video-Mouse switches which allow sharing of these peripherals between different machines) do not function properly. The mouse may jump around on the screen and randomly activate functions.
When the KVM switch is activated, power is briefly lost to the mouse. This resets the kernel's mouse driver (psmouse) to 'basic (base)' mode even if it had been set to 'advanced' mode previously (imps or exps protocols).
- Check whether your psmouse kernel driver supports the options needed:
modinfo psmouse
- Look for the line:
parm: resetafter:Reset(...)
The resetafter parameter tells the mouse driver how many bad packets are accepted before the mouse is told again which protocol to use. In this case you want to change from the default (= never) behavior.
- Edit the /etc/modprobe.d/options file:
gksudo gedit /etc/modprobe.d/options
- Add:
options psmouse resetafter=1
- Restart the mousedriver:
sudo modprobe -r psmouse sudo modprobe psmouse
- For more info: see here.
CD/DVD Burning
How to blank CD-RW/DVD-RW
- Read #General Notes
- 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
- Read #General Notes
Places -> CD/DVD Creator
- Drag files/folders into window
File Menu -> Write to Disc... -> Write
How to burn Image (ISO) files into CD/DVD
- Read #General Notes
Right click on Image (ISO) file -> Write to Disc... -> Write
How to duplicate CD/DVD
- Read #General Notes
- Read #How to create Image (ISO) files from CD/DVD
- Read #How to burn Image (ISO) files into CD/DVD
How to create Image (ISO) files from CD/DVD
- Read #General Notes
- 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
- Read #General Notes
mkisofs -r -o file.iso /location_of_folder/
How to generate MD5 checksum files
- Read #General Notes
md5sum file.iso > file.iso.md5
How to check MD5 checksum of files
- Read #General Notes
- 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
- Read #General Notes
- To mount Image (ISO) file
sudo mkdir /media/iso sudo modprobe loop sudo mount file.iso /media/iso/ -t iso9660 -o loop
- 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/ gedit Mount
Copy this script into Mount file
#!/bin/bash # for I in "$*" do foo=`gksudo -u root -k -m "Enter your password for root terminal access" /bin/echo "got r00t?"` sudo mkdir /media/"$I" sudo mount -o loop -t iso9660 "$I" /media/"$I" && nautilus /media/"$I" --no-desktop done done exit0
Save and close, than do the same with unmount file:
gedit Unmount
Copy these script into Unmount file
#!/bin/bash # for I in "$*" do foo=`gksudo -u root -k -m "Enter your password for root terminal access" /bin/echo "got r00t?"` sudo umount "$I" && zenity --info --text "Successfully unmounted /media/$I/" && sudo rmdir "/media/$I/" done done exit0
Make them executable with:
chmod +x Mount chmod +x Unmount
- Or a graphical tool type in terminal:
sudo apt-get install gisomount
to run type in terminal:
sudo gisomount
How to set/change the burn speed for CD/DVD Burner
- 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)
- Read #General Notes
- Read #How to add extra repositories
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 aptitude 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
- Complete Ubuntu Networking Tutorial This is Step By Step Ubuntu Networking Guide for Beginners and Advanced Users
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
- Read #General Notes
- To configure dialup
sudo pppconfig
- To connect dialup
pon provider_name
- To disconnect dialup
poff
How to configure broadband connections
- Read #General Notes
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
sudo vi /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 sudo 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
- Read #General Notes
- Read #How to add extra repositories
- Register a free account at Dynamic DNS (http://www.dyndns.com/services/dns/dyndns). You can register up to 5 free URLs, or more for a monthly fee.
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 ddclint configuration file:
sudo gedit /etc/ddclient.conf
- Place the following in the file:
protocol=dyndns2 use=web, web=checkip.dyndns.org/, web-skip='IP Address' # found after IP Address # 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
- Read #General Notes
- e.g. Assumed that network connections have been configured properly
- If computers or network folders could not be found, try access them directly
- Read #How to access network folders without mounting
- Places -> Network Servers
How to access network folders without mounting
- Read #General Notes
- e.g. Assumed that network connections have been configured properly
- 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
- e.g. Assumed that network connections have been configured properly
- 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
- e.g. Assumed that network connections have been configured properly
- 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
- e.g. Assumed that network connections have been configured properly
- 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
- If you do not have smbfs installed yet, install that first:
apt-get install smbfs
- Insert the following lines into the new file
username=myusername password=mypassword
- Save the edited file
sudo chmod 700 /root/.smbcredentials 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
- Save the edited file
- Read #How to remount /etc/fstab without rebooting
How to mount network folders on boot-up, and allow all users to read/write
- e.g. Assumed that network connections have been configured properly
- 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
- Save the edited file
sudo chmod 700 /root/.smbcredentials 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
- Save the edited file
- Read #How to remount /etc/fstab without rebooting
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
Under Feisty, do:
sudo apt-get install BCM43xx-fwcutter
Allow the driver to be downloaded.
How to Configure and start PPTP tunnels (VPN)
- Read #General Notes
You can use NetworkManager which comes with Feisty.
- Configure VPN with Network Manager
In a terminal
sudo apt-get install network-manager-pptp
You have to restart after install.
To setup a VPN Click the NetworkManager Icon in the tray VPN Connections->Configure VPN Use the defaults and be sure to check the box: Refuse EAP under the Authentication tab. To get my connection to work I also had to check Require MPPE Encryption under Compression & Encryption
- A Nice tutorial here
Alternative programs listed below
- Use these instructions to automatically install PPTP Client
- 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 ..
- To configure 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 we put a nice icon that appears in the menu.
- Start the client with Applications -> Internet -> PPTP Client
How to setup a PGP key with Seahorse and Evolution
- Read #General Notes
- Install seahorse
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.
- Wait for key to finish generating.
- You may now 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
Remote Login via XDMCP
What is XDMCP?
GNOME windows can support several different users simultaneously. Unlike VNCviewer, which just duplicates the current screen on a remote system, XDMCP allows several different users to login and run different Gnome sessions at the same time. If you have a fast computer running Ubuntu, several users can use their slow machines to login and run heavy applications only available on the fast machine.
How to turn on the XDMCP feature
- To turn on the XDMCP feature on the host computer:
System-->Administration-->Login Window--> Remote-->Style:Same as Local
Reboot.
How to login from another PC running Ubuntu
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.
Remote Desktop Sharing/Duplication using VNC
How to configure Remote Desktop
- Read #General Notes
Note: Remote Desktop is not a completely secure method of sharing your desktop.
- 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
- Use (System-->Lock Screen) and switch off the monitor when the computer is left unattended
- 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 Ubuntu desktop from another Ubuntu/Linux machine
- Read #General Notes
- Remote Ubuntu machine must have Remote Desktop configured (read #How to configure Remote Desktop)
- In this example, the remote 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 remote Ubuntu desktop from a Windows machine
- Read #General Notes
- Remote Ubuntu machine must have Remote Desktop configured (read #How to configure Remote Desktop)
- Port 5900 must be open. If more than one VNC/Remote Desktop session is to be used, you must open more ports (5901, 5902, etc.) See Wikipedia port forwarding.
- Several VNC clients are available. 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.)
How to connect into remote Ubuntu desktop from OS X
- Read #General Notes
- Remote Ubuntu machine must have Remote Desktop configured (read #How to configure Remote Desktop)
- Port 5900 must be open. If more than one VNC/Remote Desktop session is to be used, you must open more ports (5901, 5902, etc.) See Wikipedia port forwarding.
- 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.)
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
- Read #General Notes
- Read #How to list partition tables
- e.g. Assumed that /dev/hda1 is the location of Windows partition (NTFS)
- Local mount folder: /media/windows
- To mount Windows partition
sudo mkdir /media/windows sudo mount /dev/hda1 /media/windows/ -t ntfs -o nls=utf8,umask=0222
- To unmount Windows partition
sudo umount /media/windows/
How to mount/unmount Windows partitions (FAT) manually, and allow all users to read/write
- Read #General Notes
- Read #How to list partition tables
- e.g. Assumed that /dev/hda1 is the location of Windows partition (FAT)
- Local mount folder: /media/windows
- To mount Windows partition
sudo mkdir /media/windows sudo mount /dev/hda1 /media/windows/ -t vfat -o iocharset=utf8,umask=000
- To unmount Windows partition
sudo umount /media/windows/
How to mount Windows partitions (NTFS) on boot-up, and allow all users to read only
- Read #General Notes
- Read #How to list partition tables
- e.g. Assumed that /dev/hda1 is the location of 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
- Save the edited file
- Read #How to remount /etc/fstab without rebooting
How to mount Windows partitions (FAT) on boot-up, and allow all users to read/write
- Read #General Notes
- Read #How to list partition tables
- e.g. Assumed that /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
- Save the edited file
- Read #How to remount /etc/fstab without rebooting
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
- Read #General Notes
- Enable universe. Read #How to apt-get the easy way (Synaptic)
- 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)
- Further troubleshooting is listed at this comprehensive howto thread.
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
- To prevent trespassers from modifying kernel boot-up arguments which allows them to have root user access
- Read #How to disable all interactive editing control for GRUB menu
- Ensure history listing is disabled in Console mode
- To prevent trespassers from seeing previously issued commands
- Read #How to disable history listing in Console mode
- Ensure Ctrl+Alt+Del is disabled in Console mode
- To prevent trespassers from restarting the system without permission in Console mode
- Read #How to disable Ctrl+Alt+Del from restarting computer in Console mode
- Ensure interactive option is set for remove, copy and move of files/folders in Console mode
- To prevent accidental removal/overwritten of files/folders
- Read #How to enable prompt before removal/overwritten of files/folders in Console mode
- For day to day usage, login as a normal user
- To prevent accidental deletion/modification of system files/folders
- Read #How to add/edit/delete system users
- 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
- A firewall does not guarantee security but it is in most environments the first line of defense against network based attacks
- Read #How to install Firewall (Firestarter)
- Perform vulnerability test
- Nessus is a great tool designed to automate the testing and discovery of known security problems
- Read #How to install Vulnerability Scanner (Nessus)
How to disable all interactive editing control for GRUB menu
- Read #General Notes
- 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
- Read #General Notes
- From Gentoo Wiki:
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 Ctrl+Alt+Del from restarting computer in Console mode
- Read #General Notes
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
- Read #General Notes
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
- Read #General Notes
- Read #How to add extra repositories
- Read #How to use dynamic IP addressing for your host using the free DynDNS service
- Read #Maintain Dynamic IP address with ddclient utility
- 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.
- Get a free dynamic IP account from one of the many providers, such as DynDNS. Read #How to use dynamic IP addressing for your host using the free DynDNS service. Remember the hostname you set up, such as yourhostname.dyndns.org.
- Install ddclient. Read #Maintain Dynamic IP address with ddclient utility. Ddclient updates the IP address at DynDNS every 5 minutes by default (unless you change it).
- 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
- Restart Nautilus (may need to be manually restarted). See Eiciel installation page for more details.
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
- Read UbuntuHelp Iptables
- Read Netfilter's documentation for iptables
- Read the manual:
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.
- To install the package, the universe repository must be enabled. Read #How to add extra repositories. Then install the package:
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
- Read #Security
- Warning: This is NOT secure. It is unnecessary for most users.
- 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
- Read #General Notes
- Read #How to add extra repositories
- 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
- e.g. Automatically scan files/folders for viruses at midnight everyday
- * * * * * means minute hour date month year
export EDITOR=gedit && sudo crontab -e
*Append the following line at the end of file
00 00 * * * sudo clamscan -r /location_of_files_or_folders
- Save the edited file
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)
- Press 'Enter' to boot
- Other methods
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
- Read #General Notes
- Read #How to gain root user access without login
- To change root user password
# passwd root
- To change main user password
# passwd system_main_username
How to change GRUB menu password if forgotten
- Read #General Notes
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
- Use Super Grub Disk
- More info on how to use it here
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
- Read #General Notes
- Read #How to list partition tables
- 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
- e.g. Assumed that hd0,1 is the location of Ubuntu boot partition
wget -c http://easylinux.info/uploads/ubuntu.xpm.gz chmod 644 ubuntu.xpm.gz sudo mkdir /boot/grub/images sudo cp ubuntu.xpm.gz /boot/grub/images/ sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup gksudo gedit /boot/grub/menu.lst
- Find this section
# menu.lst - See: grub(8), info grub, update-grub(8) # grub-install(8), grub-floppy(8), # grub-md5-crypt, /usr/share/doc/grub # and /usr/share/doc/grub-doc/. ...
- Add the following line below it
splashimage (hd0,1)/boot/grub/images/ubuntu.xpm.gz
- NOTE: If you have seperate boot partition use this line: splashimage (hd0,1)/grub/images/ubuntu.xpm.gz
- Save the edited file
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
- splashimage.xpm.gz is the Splash Image for GRUB menu
- ImageMagick is installed
convert -resize 640x480 -colors 14 wallpaper.png splashimage.xpm && gzip splashimage.xpm
- Read #How to display Splash Image for GRUB menu on boot-up (use splashimage.xpm.gz instead of ubuntu.xpm.gz)
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
- Read #General Notes
- Download Explore2fs: Here
- 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 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
- Save the edited file
- Read #How to restart GNOME without rebooting computer
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.
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
- Read the following post: http://ubuntuforums.org/showthread.php?t=189192
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
- Save the edited file
- Read #How to restart GNOME without rebooting computer
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
- To install File Browser (Root)
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;
- Save the edited file
- Read #How to refresh GNOME panel
- 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
- Read #How to install Email Client (Mozilla Thunderbird)
- System -> Preferences -> Preferred Applications
- Preferred Applications
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
chmod +x $HOME/.gnome2/nautilus-scripts/Open\ as\ root 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
- For more info go to CheckInstall home page and the Installing software on Ubuntu page. Autodeb uses a modified version of AutoApt to complete the entire process above including extraction from the .tar.gz file, however it is still in an early stage of development.
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
- To install bash batch image processing script
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
- Clean up Ubuntu GNU/Linux System - This is a very detailed step by step procedure on how to Clean up Ubuntu GNU/Linux System with different tools.
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 set up automatic background change (KDE)
- Go to K-menu -> System Settings -> Desktop -> Background
- Choose Slide Show
- Press Setup...
- Press Add... to add pictures you wish to see as desktop background
- Set 'Change picture after' to desired picture rotation interval.
- Press 'OK'
How to add keyboard layouts for other languages
- Go to 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
- Read #How to add keyboard layouts for other languages
- Read #How to add the Keyboard (Layout) Indicator applet
- 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
- Read #How to add keyboard layouts for other languages
- Read #How to add the Keyboard (Layout) Indicator applet
- 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
- Read #How to install PDF Reader (Adobe Reader) with Plug-in for Mozilla Firefox
- Open Nautilus (Places -> Desktop)
- Browse to a .pdf file
- Right-click the .pdf file, select Properties, go to the Open With tab, choose Adobe Reader.
Now when you double-click on a .pdf file, it will be opened with Adobe Reader.
How to print from Adobe Reader
- Read #How to install PDF Reader (Adobe Reader) with Plug-in for Mozilla Firefox
- Read #How to add a printer
- Applications -> Office -> Adobe Reader
- File -> Print
- In the Print Command box, append -d printername. For example, if your printer was named FS-1010, the Print Command would read:
/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 commandlxtermwill 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
- Read #General Notes
- Read #How to add extra repositories
- 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
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
/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
- Backup sysklogd file
sudo cp /etc/init.d/sysklogd /etc/init.d/sysklogd_backup
- Edit sysklogd file
gksudo gedit /etc/init.d/sysklogd
- After the following lines...
stop) log_begin_msg "Stopping system log daemon..." start-stop-daemon --stop --quiet --oknodo --exec $binpath --pidfile $pidfile log_end_msg $?
- Add this line:
rm -fr /tmp/* /tmp/.??*
How to tile windows in gnome
First, download the wmtile debian package here.
If you are not running i386, the project's homepage is here.
- Double click the package and install it.
- Login as root and browse to /usr/share/tile/
- Open the rc file in gedit
- Change the second option to read "multi-desktop netwm"
- Save the rc file
Now, create a launcher:
- Right-click on the gnome panel (the taskbar at the top of the screen) and choose "Add to Panel"
- Select "Custom Application Launcher" and fill in these values:
- Type: Application
- Name: Tile Windows Vertically
- Command: tile -v -w
- You can also select an icon to use with the launcher.
- Click "OK"
Now open a couple windows and click your new launcher button to test it. This works great with two or three windows, but it can get a bit strange with more.
If you want to create another launcher that tiles windows horizontally, just follow the same directions, but use the command "tile -h -w"
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
- Fix broken Ubuntu Feisty Fawn This is simple Procedure how to fix broken Ubuntu Feisty
Servers
Monitoring Server
- Read #General Notes
- Read #How to add extra repositories
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)
- Read #General Notes
- Read #How to add extra repositories
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
- Read #How to install Samba Server for files/folders sharing service
- Read #How to print on remote Ubuntu machine via samba
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
- Read #General Notes
- Read #How to add extra repositories
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
- Read #General Notes
- Read #How to install Samba Server for files/folders sharing service
- To add network user
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
- Save the edited file
- Read #How to add/edit/delete network users
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
- Save the edited file
- Read #How to add/edit/delete network users
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
- Save the edited file
- Read #How to add/edit/delete network users
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
- Save the edited file
- Read #How to add/edit/delete network users
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
- Save the edited file
- Read #How to add/edit/delete network users
sudo testparm sudo /etc/init.d/samba restart
How to share public folders with read/write permissions (Authentication=Yes)
- Read #General Notes
- Read #How to install Samba Server for files/folders sharing service
- If sharing a FAT32 partition, read #How to mount Windows partitions (FAT) on boot-up, and allow all users to read/write
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
- Save the edited file
- Read #How to add/edit/delete network users
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)
- Read #General Notes
- Read #How to install Samba Server for files/folders sharing service
- If sharing a FAT32 partition, read #How to mount Windows partitions (FAT) on boot-up, and allow all users to read/write
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
- Read #Print Server (cupsd)
- Make sure your Ubuntu printers are configured properly.
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
- Read #General Notes
- Read #How to add extra repositories
sudo apt-get install netkit-inetd
How to install SWAT for Samba daemon
- Read #General Notes
- Read #How to add extra repositories
- Read #How to install Samba Server for files/folders sharing service
- Read #How to install INETD Superserver
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
- If you have not set root password, do it, because you'll need it to access swat for editing
- Read #How to set/change/enable root user password
SSH Server
How to install SSH Server for remote administration service
- Read #General Notes
- Read #How to add extra repositories
sudo apt-get install ssh
How to SSH into remote Ubuntu machine
- Read #General Notes
- e.g. Assumed that remote Ubuntu machine have installed SSH Server service
- Read #How to install SSH Server for remote administration service
- Remote Ubuntu machine: 192.168.0.1
ssh username@192.168.0.1
How to copy files/folders from remote Ubuntu machine into local machine (scp)
- Read #General Notes
- e.g. Assumed that remote Ubuntu machine have installed SSH Server service
- Read #How to install SSH Server for remote administration service
- Remote Ubuntu machine: 192.168.0.1
- Remote files/folders location: /home/username/remotefile.txt
- Local machine save location: . (current directory)
scp -r username@192.168.0.1:/home/username/remotefile.txt .
How to copy files/folders from local machine into remote Ubuntu machine (scp)
- Read #General Notes
- e.g. Assumed that remote Ubuntu machine have installed SSH Server service
- Read #How to install SSH Server for remote administration service
- Local files/folders location: localfile.txt
- Remote Ubuntu machine: 192.168.0.1
- Remote Ubuntu machine save location: /home/username/
scp -r localfile.txt username@192.168.0.1:/home/username/
How to copy files/folders from remote Ubuntu machine into local machine (rsync)
- Read #General Notes
- e.g. Assumed that remote Ubuntu machine have installed SSH Server service
- Read #How to install SSH Server for remote administration service
- Remote Ubuntu machine: 192.168.0.1
- 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.1:/home/username/remotefile.txt .
How to copy files/folders from local machine into remote Ubuntu machine (rsync)
- Read #General Notes
- e.g. Assumed that remote Ubuntu machine have installed SSH Server service
- Read #How to install SSH Server for remote administration service
- 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 folders into local Ubuntu machine (sshfs)
- Read #General Notes
- e.g. Assumed that remote machine has installed SSH Server service
- Read #How to install SSH Server for remote administration service
- Remote machine: 192.168.0.1
- 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.1:/media/music ~/remote_music
How to SSH into remote Ubuntu machine via Windows machine
- Read #General Notes
- e.g. Assumed that remote Ubuntu machine have installed SSH Server service
- Read #How to install SSH Server for remote administration service
- Download PuTTY: Here
How to copy files/folders from/into remote Ubuntu machine via Windows machine
- Read #General Notes
- e.g. Assumed that remote Ubuntu machine have installed SSH Server service
- Read #How to install SSH Server for remote administration service
- Download FileZilla: Here
How to limit the user accounts that can connect through ssh remotely
- Read #General Notes
- e.g. If you enable the SSH server, then any user with a valid account can connect remotely
- This can lead to security risks, as there exist remote password cracking tools that
- try common username/password pairs.
- Keep a backup of the ssh server configuration file with
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.ORIGINAL
- Edit the configuration file
gksudo gedit /etc/ssh/sshd_config
- Change the parameter PermitRootLogin from yes to no. The superuser must not be able to connect directly from remote.
- Add the parameter AllowUsers and specify the usernames (space separated) that can connect remotely.
NOTE: This will allow ONLY the users specified to connect. You may use wildcards here (example: j* will allow jsmith to connect but not fsmith)
- You can also use DenyUsers for fine-grained selection of users.
- If you enable the openssh server and you have no intention for now to enable remote connections, you may add AllowUsers nosuchuserhere to disable anyone connecting.
Using SSH to Port Forward
- Read #General Notes
- e.g. Assumed that remote machine has installed SSH Server service
- Read #How to install SSH Server for remote administration service
If is possible to create secure SSH tunnels between multiple sites. Imagine two sites (home and office). If you have an SSH server available in the office available via the Internet, you can tunnel across to this server and communicate with any local PC in the office from home.
- Example: Make Port 80 (Web Server) on 10.0.2.10 in the office available locally on Port 81
From home:
ssh -L 81:10.0.2.10:80 user@office.net
Once logged in, you can now browse to http://localhost:81 which is really a secure tunnel to the web server in your office. You can setup multiple port forwardings.
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, port 81 locally forwards to port 80 on 10.0.2.10, port 82 forwards to port 80 on 10.0.2.20 and port 83 forwards to port 80 on 10.0.2.30
For example, http://localhost:81 connects you to port 80 on 10.0.2.10 (computer at remote location)
Specify port with -p?? if SSH Server on office.net does not run on default port 22.
Explanation:
ssh -L <local port>:<remote computer>:<remote port> <user>@<remote ip>
Protecting SSH from brute force attack
- Read #General Notes
- Read #How to add extra repositories
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:
- Manually according to pam_abl documentation and manually apply patch for a bug №405041 onto openssh-server
- Automatically by the repository from tolero.org
To install from a repository:
- Add a repository for your distribution listed on the ssh brute force protection page
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
- Read #General Notes
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 a "banner" file's contents displayed on the user's screen.
- First of all open up the sshd's configuration file:
sudo gedit /etc/ssh/sshd_config
- Find:
#Banner /etc/issue.net
- Replace:
Banner /etc/issue.net
- Save and close.
- Now you need to edit the issue.net file to contain what you want displayed:
sudo gedit /etc/issue.net
- Add what you want:
_ ___ _ _ ___ _____ ___| |___
Welcome to my server
- Save and close
- Restart SSHD:
sudo /etc/init.d/ssh restart
DHCP Server
How to install DHCP Server for automatic IP addresses assignment
- Read #General Notes
- Read #How to add extra repositories
- e.g. Assumed that "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; }
- Save the edited file
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
- Backup Using Sbackup - Backup and Restore Ubuntu System Using Sbackup
Dar and Kdar
- Backup Using Dar and Kdar - Backup and Restore Ubuntu System Using Dar and Kdar
Ubuntu Feisty LAMP Server
LAMP stands for Linux, Apache, MySQL, and PHP. These components comprise the easiest and most widely used web servers.
- 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 intial 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
- A manual installation (much more complex) can be found at Ubuntu Feisty LAMP Server Installation with Screenshots.
- 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
- Read #General Notes
- Read #How to add extra repositories
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.
- Download from here
- AutoMySQLBackup Requirements
The AutoMySQLBackup script only requires mysqldump (A standard utility provided with the mysql client) and gzip or bzip2 for compression of the backup files. If you would like to have the log emailed to you then you will need to have permission to execute the �mail� program. If you want the compressed backup files mailed to you then Mutt must be available on the server. Finally you will need a bash shell and the standard 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
- Read #How to refresh GNOME panel
- Applications -> System Tools -> MySQL Administrator
How to install MySQL Query Browser (SQL Client)
sudo apt-get install mysql-query-browser
- Read #How to refresh GNOME panel
- Applications -> Programming -> MySQL Query Browser
How to install Oracle Database XE
- Read #General Notes
- Read #How to add extra repositories
- Read http://www.oracle.com/technology/tech/linux/install/xe-on-kubuntu.html
- 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
- Read #General Notes
- Read #How to add extra repositories
- Note: The Apache2 server 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.
sudo apt-get install apache2
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
- Note: PHP4 is no longer supported in Feisty.
- Read #General Notes
- Read #How to add extra repositories
- Read #How to install Apache HTTP Server for HTTP (Web) Server service
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(); ?>
- Save the edited file
- http://localhost/testphp.php
- Be sure to remove the file afterwards, as it may pose a security risk
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
- (Optional) Install recommended PHP5 modules
sudo apt-get install php5-xsl php5-gd php-pear
- 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.
pear help
How to install MYSQL for Apache HTTP Server
- Note: MySQL can be installed separately or as part of a LAMP integrated server package (Linux, Apache2, MySql, Perl). To install the integrated package, read #Ubuntu Feisty LAMP Server.
- Read #General Notes
- Read #How to add extra repositories
- Read #How to install Apache HTTP Server for HTTP (Web) Server service
- Read #How to install PHP for Apache HTTP Server
- Read #How to install MYSQL Database 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
- e.g. Assumed that new port number is 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
- Save the edited file
sudo /etc/init.d/apache2 restart
How to parse RSS into PHP for Apache HTTP Server
- Read #General Notes
- Read #How to install Apache HTTP Server for HTTP (Web) Server service
- Read #How to install PHP for Apache HTTP Server
- e.g. Assumed that 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>
- Save the edited file
- http://localhost/feeds/index.php
FTP Server
How to install FTP Server for File Transfer service
- Read #General Notes
- Read #How to add extra repositories
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
- e.g. Assumed that new port number is 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
- Save the edited file
sudo /etc/init.d/proftpd restart
How to ftp into remote Ubuntu machine via Windows machine
- Read #General Notes
- e.g. Assumed that remote Ubuntu machine have installed FTP Server service
- Read #How to install FTP Server for File Transfer service
- Download FileZilla: Here
- Paste the FTP url to the Windows Explorer Address Bar
- Windows Explorer is Windows' "File Manager," Goto "My Computer"
- The Address Bar may be hidden, right-click the toolbar area and make sure "Lock toolbars" is not selected, rearrange the toolbars so you can paste the address
- FTP addresses take the form ftp://[username]:[password]@[hostname].[domain].[tld]:[portnumber]/[directory]/
- the username and password are optional, if not given and the server is not configured for anonymous access then Windows will request them
- Don't tell Windows to save the password, because there's no obvious way to edit this record
- If a directory on the FTP server allows uploads, you can drag-and-drop or copy-paste files or folders to it just like Windows Explorer
How to ftp into/from remote Windows machine via Ubuntu machine
- Install FTP Server on your Remote Machine
- System Requirement: Sun Java 1.4+.
- Download CrossFTP Server and start by Java Web Start (javaws). You can configure the server's port, and add user accounts through its GUI interface. (Home)
- Install FTP Client on your Local Machine
- System Requirement: Sun Java 1.4+.
- Download CrossFTP Client and start by Java Web Start (javaws). (Home)
- Paste your FTP Server's address in the FTP client's quick connect bar. The FTP address normally has the form of ftp://[username]:[password]@[hostname]:[port]
How to configure your NAT/router/gateway/firewall for FTP server
- Read #General Notes
- e.g. Assumed that remote Ubuntu machine have installed FTP Server service
- Read #How to install FTP Server for File Transfer service
- Configure your FTP server with a limited passive port range so that TCP range can be opened in the incoming firewall
- For proftpd, this is parameter "PassivePorts" in /etc/proftpd/proftpd.conf
- For security, it's a good idea to operate the server at a non-standard port, see #How to change the default port number for FTP Server
- For proftpd, this is parameter "Port" in /etc/proftpd/proftpd.conf
- NAT/router/gateway/firewall devices or software must be configured to allow the configured incoming TCP ports.
Personal Apt Repository
- Read #General Notes
Setting Up Repository
- Read #How to add extra repositories
- Read #How to install Apache HTTP Server for HTTP (Web) Server service
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
- Read #General Notes
- Read #How to add extra repositories
- Read #How to install Apache HTTP Server for HTTP (Web) 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
- e.g. Assumed that 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
- Save the edited file
sudo /etc/init.d/gnump3d restart
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)
- Read #General Notes
- Read #How to install GNUMP3d for Streaming Media Server service
- Read #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 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
- Read #General Notes
- Read #How to install GNUMP3d for Streaming Media Server service
- Read #How to enable downmixing support (for streaming outside your LAN)
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
- Read #General Notes
- Read #How to install GNUMP3d for Streaming Media Server service
- Read #How to enable downmixing support (for streaming outside your LAN)
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
- Read #General Notes
- Read #How to add extra repositories
- Read #How to install Apache HTTP Server for HTTP (Web) Server service
- Read #How to install PHP for Apache HTTP Server
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
- http://localhost/gallery/setup/index.php
- Gallery Configuration
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)
- e.g. Assumed that network and internet connections have been configured properly
- Internet (Hostname or fix IP) or LAN (fix IP): 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";
- Save the edited file
- http://www.url.com/gallery/albums.php
How to configure Gallery1 to be accessible via LAN (dynamic IP)
- e.g. Assumed that network connections have been configured properly
- LAN (dynamic IP): 192.168.0.1
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";
- Save the edited file
- http://192.168.0.1/gallery/albums.php
How to backup/restore Gallery1 data
- Read #General Notes
- To backup Gallery 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)
- Read #General Notes
- 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
How to install Subversion version control server (svnserve)
- Read #General Notes
- 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
sudo vi /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
sudo vi /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)
- Read #General Notes
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
- Read #General Notes
- Read #How to add extra repositories
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
- Read #General Notes
sudo rm -fr $HOME/.Trash/*
How to remove duplicate menu/menu items in GNOME
- Read #General Notes
- Type "rm -f $HOME/.config/menus/applications.menu" in a terminal window
- Read Ubuntu:Edgy/TipsAndTricks#How to refresh GNOME panel
How to refresh Places menu in GNOME (if mounts to /media/ in /etc/fstab does not show up)
- Read #General Notes
sudo /etc/init.d/dbus restart
How to consume static (not dhcp) wireless LAN (WLAN) connection (KDE)
- I assume you have successfully consumed WLAN connection in Windows
- To enable the network device please follow the following steps
- Go to K-menu -> System Settings -> Network Settings
- Enable Administrator mode
- Select Network Interfaces tab and the wireless interface (usually ath0) to configure
- Click Configure Interface...
- Choose Manual or Automatic. Choose Manual
- Fill the preferred IP address to identify your computer and the netmask. Choose to activate when computer starts
- Click Advanced Settings to for more properties
- Select Routes tab and fill the gateway IP address
- Make sure you choose the correct device in the right dropdown (e.g. ath0)
- Click apply to commit all changes
- To choose wireless connection please follow the following steps
- Go to K-menu -> Internet -> Wireless Assistant
- Right click on preferred connection ssid
- Choose and complete fields for Manual connection
- Click Ok
- Create connection configuration
gksudo gedit /etc/wpa_supplicant.conf
- Insert the following lines into the new file
network={ ssid="YOUR_PREFERRED_CONNECTION_SSID" scan_ssid=1 proto=WPA key_mgmt=WPA-PSK psk="STRING_TO_GENERATE_PASSWORD" #psk=123456789 #you have option to use connection key instead of connection password }
- Save the edited file
- Create script to easily activate connection
gksudo gedit /etc/init.d/wifi_wpa.sh
- Insert the following lines into the new file
#! /bin/sh # wifi: wpa_supplicant init echo " * [Wifi]: Enabling WPA supplicant..." if [ -x /sbin/wpa_supplicant ]; then /sbin/wpa_supplicant -B -i ath0 -c /etc/wpa_supplicant.conf -D madwifi -w fi exit 0
- Save the edited file
- Make sure both file readable and executable
sudo chmod +r /etc/wpa_supplicant.conf sudo chmod +x /etc/init.d/wifi_wpa.sh
- make wireless connection automaticaly starts when computer starts
sudo ln -s /etc/init.d/wifi_wpa.sh /etc/rcS.d/S40netwifiwpa
- Close all opened applications, Reboot computer
How to get 1400x1050 resolution working
- See http://ubuntu.vdb-studios.be/installationDapper.php (is not working)
Requests
If you have requests that you would like to be part of this guide, put them here.
- How to connect to mobile phones.
- How to connect to a mobile phone via infrared to use phone as an IR modem.
- How to produce an update cd/dvd similar to the install cd which can be used as a repository
- How to upgrade to new release from an ISO file (without burning)
- How to enable bluetooth and bluetooth internet connection sharing
- 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?
Guide Development
Place ideas here to increase the look and performance of this guide.
- Make headings (categories) stand out more visually.
- Have entries under their headings in alphabetical order.
- Try to keep the guide neat and clutter free.
- Possible "Short Version" Table of contents without each "How to".
- Thanks ;-)
- Please add a [top] link to the end of each article....will improve navigation.A huge Thanx for this guide too....