Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

25 June 2010

Set minimum font size for Chromium browser

While using Ctrl+Shift++ or Ctrl+Shift+- can be used as a workaround for fonts that render either too big or too small it is somewhat problematic because it changes all of the fonts on the page. Additionally, any changes are lost once the browser is closed. A better and more permanent solution is to force a minimum font size.
  1. Close any open sessions of Chromium.
  2. From the desktop, launch a new terminal session by selecting: Applications > Accessories > Terminal. A new terminal window will display.
  3. At the prompt (the blinking cursor), type: gedit ~/.config/chromium/Default/Preferences then press Enter.
  4. Locate the section titled webkit.
  5. Within webkit, you will see webprefs. Under webprefs, add the following 2 lines "minimum_font_size": 11,
    "minimum_logical_font_size": 11,
    Be sure to include the trailing comma for both lines.
  6. Save your changes and close gedit.
  7. Launch Chromium and navigate to a site that would normally have rendered with ridiculously small fonts. You should now be able to actually view the content without glasses. To increase or decrease the minimum font size, simply repeat the first few steps to open Chromium's Preferences in gedit. Replace 11 with your desired font size.

02 June 2010

Install Lighttpd, MySQL and PHP5 for my local development environment

  1. From the desktop, launch a new terminal session by selecting: Applications > Accessories > Terminal. A new terminal window will display.
  2. At the prompt (the blinking cursor), type: sudo apt-get update then press Enter.
  3. When prompted, type the sudo password then press: Enter. This is done to resynchronize the package index files with their sources, ensuring that your system is aware of new and updated packages. If updates are found, simply type: sudo apt-get upgrade then press: Enter. Otherwise, proceed to the next step.
  4. Once update/upgrade is complete, type: sudo apt-get install mysql-client mysql-server then press: Enter and follow the prompts to complete the installation.
  5. Next you will install the Lighttpd server and Lighttpd Doc (the documentation files). At the prompt, type: sudo apt-get install lighttpd lighttpd-doc then press: Enter.
  6. Once this installation is complete, open your web browser and navigate to either http://127.0.0.1/ or http://localhost/. If all went as planned, you should see: Placeholder page The owner of this web site has not put up any web pages...
  7. Next we will install PHP5. At the prompt, type (or copy/paste): sudo apt-get install php5 php5-cgi php5-common php5-imagick php5-intl php5-mcrypt php5-pspell php5-recode php5-memcache php5-memcached php5-librdf php5-ps php5-ming php5-mysql php5-imap php5-ldap php5-snmp php5-sqlite php5-svn php5-tidy php5-xmlrpc php5-xsl php5-curl php5-gd then press: Enter.
  8. We then need to modify the php.ini file to enable cgi.fix_pathinfo. At the prompt, type: gksudo gedit /etc/php5/cgi/php.iniA gedit window will open and display the php.ini file. Search (Ctrl+F) for the line: ;cgi.fix_pathinfo=1 and uncomment this line by simply deleting the leading ; (semi-colon).
  9. Save your changes then close gedit.
  10. At the prompt, type:gksudo gedit /etc/lighttpd/lighttpd.conf then press Enter.
  11. In the server.modules section, add "mod_fastcgi",
  12. Scroll to the bottom and paste the following fastcgi.server = ( ".php" => ((
    "bin-path" => "/usr/bin/php-cgi",
    "socket" => "/tmp/php.socket",
    "max-procs" => 2,
    "bin-environment" => (
    "PHP_FCGI_CHILDREN" => "16",
    "PHP_FCGI_MAX_REQUESTS" => "10000"
    ),
    "bin-copy-environment" => (
    "PATH", "SHELL", "USER"
    ),
    "broken-scriptfilename" => "enable"
    )))
  13. Save your changes then close gedit.
  14. Next we will create a PHP info file that will enable us to view details about our PHP installation. At the terminal prompt, type (or copy/paste): sudo sh -c "touch /var/www/php-info.php ; echo '<?php phpinfo(); ?>' > /var/www/php-info.php" then press: Enter.
  15. Open your web browser and navigate to either http://127.0.0.1/php-info.php or http://localhost/php-info.php. You should see something similar to: PHP Version 5.3.2-1ubuntu4.2.... You should also see: CGI/FastCGI in the: Server API row.

The installation is now complete. Here is a short list of additional tools that you may wish to add. Either click the apturl protocol link or use the terminal commands to install.

Here are a few useful commands for working with your Lighttpd server.
  • Stop Lighttpd:sudo /etc/init.d/lighttpd stop
  • Start Lighttpd:sudo /etc/init.d/lighttpd start
  • Restart Lighttpd:sudo /etc/init.d/lighttpd restart

Installing applications in Ubuntu using Synaptic Package Manager

GUI: Synaptic Package Manager (SPM)

Screenshot of Synaptic Package Manager

As is cleverly depicted in the above screenshot, there are essentially five areas of the SPM window that concern us:
  1. Reload
  2. Search
  3. Package List
  4. Package Description
  5. Apply

SPM Usage
  1. From the desktop, select: System > Administration > Synaptic Package Manager. If prompted, enter the administrator password then press: Enter. The Synaptic Package Manager window will open.
  2. In the SPM window click: Reload (area 1). This action will reload the package information so that SPM becomes aware of any new, removed or updated software that may be available for your system.
  3. Once SPM has obtained the most recent package information, click: Search (area 2). The Find window will appear.
  4. In the Find window, type: frozen bubble then press: Enter.
  5. The results of your search will be displayed in the Package List (area 3). Scroll through the list and locate the package titled: frozen bubble.
  6. In the Package column, click the frozen bubble package name. This will display additional details of Frozen-Bubble in the Package Description (area 4).
  7. Click the checkbox for the frozen bubble package then click: Mark for Installation. This will open a window listing additional packages that need to be installed in support of our selected application. Click: Mark.
  8. Once you are satisfied with you selections simply click: Apply (area 5). The Summary window will appear. Click: Apply again to start the installation.
  9. Once installation is complete, the Changes Applied window will display. Click: Close then close SPM after it has refreshed. You may now access the newly installed application. In our case Frozen Bubble is located in: Applications > Games. Though this particular application is installed in a fairly obvious location, it is possible that you may not be so lucky with all of your installations. In those instances, a little hunting may be necessary.

For additional information, please refer to the official: SynapticHowto.

Installing applications in Ubuntu using the APT command-line

  1. From the desktop, launch a new terminal session by selecting: Applications > Accessories > Terminal. A new terminal window will display.
  2. At the prompt (the blinking cursor), type: sudo apt-get update then press Enter. This action will reload the package information so that APT (Advanced Package Tool) becomes aware of any new, removed or updated software that may be available for your system.
  3. Once APT has obtained the most recent package information, type: sudo apt-cache search frozen bubble then press Enter. This tells APT to search the cached package list that you updated in the previous step. The result of your search will look something like this: fb-music-high - High quality, large music files for Frozen-Bubble
    fb-music-low - Lower quality, small music files for Frozen-Bubble
    frozen-bubble - Pop out the bubbles!
    frozen-bubble-data - Data files for Frozen-Bubble
    junior-puzzle - Debian Jr. Puzzles
  4. By reading the results of our search, it should be clear that the package we want is the third from the top, titled: frozen-bubble with the description: Pop out the bubbles!. If it is not clear, you may view the complete details of the package in question by typing: sudo apt-cache show frozen-bubble then pressing: Enter. This returns: Package: frozen-bubble
    Priority: extra
    Section: universe/games
    ...
    Description: Pop out the bubbles!
    Frozen-Bubble is a clone of the popular "Puzzle Bobble" game, in which
    you attempt to shoot bubbles into groups of the same color to cause them
    to pop. It features 100 single-player levels, a two-player mode, music
    and striking graphics.
  5. By reading the details of the package, it is now obvious this is the game we are looking for. To install, simply type: sudo apt-get install frozen-bubble then press: Enter. If additional packages (referred to as dependencies) need to be installed, they will be added to the list displayed in the terminal window. When the summary is shown, you will have an opportunity for a final review before installing. When prompted, type either: y to confirm the installation or n to cancel. Since we cannot wait to play Frozen Bubble, type: y then press Enter.
  6. Once installation is complete, you may close the terminal by simply typing: exit then pressing: Enter. You may now access the newly installed application. In our case Frozen Bubble is located in: Applications > Games. Though this particular application is installed in a fairly obvious location, it is possible that you may not be so lucky with all of your installations. In those instances, a little hunting may be necessary.

Installing applications in Ubuntu (GUI/CLI)

Though there are multiple approaches for installing applications or packages in Ubuntu, they essentially all take one of two forms:
  • A graphical user interface (GUI), in which the user interacts with the package manager via familiar clickable buttons and menus
  • A command line interface (CLI), in which the user issues commands via a text terminal


There are advantages and disadvantages to both methods but we are not here to debate these points. Rather, we are here to gain a basic understanding of how to use the tools available to accomplish what we want: installing and removing software packages from our Ubuntu system. For the purposes of this tutorial, we will be using the Frozen Bubble application. Though we are installing a specific piece of software, these instructions apply to the majority of packages available for your system.


Now that we have shown you the menu, it is time to choose:


Advanced Package Tool (apt) basics

For this tutorial, we are again using our go-to favorite: Frozen Bubble. However, it should be noted that these instructions apply to virtually every application or package that you wish to install. This is intended only to be a basic introduction to the most used functions or methods of apt.
  • Reload the package information so that apt becomes aware of any new, removed or updated software that may be available for your system. sudo apt-get update
  • Search for and display a list of packages from the cache that include the term frozen bubble in either the name or description of the package. Note: Spaces are allowed when using apt-get search. apt-cache search frozen bubble
  • Once the name of a particular package is identified (using apt-cache search from above), obtain detailed information about said package. Note: Package names normally use hyphens in place of spaces. apt-cache show frozen-bubble
  • Install the chosen package and all necessary supporting files (dependencies). Note: This automatically resolves dependencies. If one package or ten packages are needed to install your chosen application, they are installed automatically, thus saving you (fingers crossed) from dependency hell.sudo apt-get install frozen-bubble
  • Remove a particular package and any accompanying dependencies no longer needed by other packages. sudo apt-get autoremove frozen-bubble

Uninstalling packages in Ubuntu using apt

As with package installation, package removal may be accomplished using both graphical and command-line tools. In my opinion however, the more reliable avenue for removing (and, arguably, even installing) packages is done via the command-line. If things go wrong with GUI tools, those "in the know" will invariably refer you to the command-line in an effort to resolve the issue. Why not simply hasten the point and start there from jump street.


Although for this tutorial we are removing a specific application (Frozen Bubble), the process may be applied to virtually any package you wish to remove.


  1. From the desktop, launch a new terminal session by selecting: Applications > Accessories > Terminal. A new terminal window will display.
  2. At the prompt (the blinking cursor), type:sudo apt-get autoremove frozen-bubble the press: Enter. The terminal will display a list of packages to be removed (including any accompanying dependencies no longer needed by other packages). Note: If you do not recall the exact name of the package you wish to uninstall, refer to: Advanced Package Tool (apt) basics for more information.
  3. When prompted to confirm removal, type: Y then press: Enter.
  4. Once removal is complete, close the terminal.

Enable the Nautilus address bar

Method 1 (Current Nautilus session only)
  1. From the desktop, open a new session of Nautilus.
  2. Press: Ctrl+L to enable the address bar. Note: This method will only display the address bar for the current Nautilus session. Once you close Nautilus, you will be back to the button controls.
Method 2 (All Nautilus sessions)
  1. From the desktop, select: Applications > Accessories > Terminal.
  2. At the prompt, type: gconf-editor then press: Enter. The Configuration Editor - preferences window will appear.
  3. In the left pane, navigate to: apps > nautilus > preferences then locate the checkbox titled always_use_location_entry. Enable the address bar by checking the box. Once you are satisfied with your selection, close the Configuration Editor - preferences window then close the terminal window and launch Nautilus to confirm your changes.

Create a shortcut to launch Nautilus as root

  1. Right-click an empty space on the desktop and select Create Launcher then configure the following items:
    1. Type: Application
    2. Name: Whatever name you want (should be unique, like RootNautilus or something)
    3. Command: gksudo nautilus
    4. Comment: Whatever comment you want (optional)
    5. Additionally, you could select a different icon for your shortcut by clicking the default spring-board icon in the top left corner. A sizable collection of icons is located at /usr/share/icons/hicolor/scalable.
  2. Click OK.
  3. Double-click your new launcher and you should be prompted to enter the password for the root account. Once this is done, root-level Nautilus file browser will open. Take extra caution when using root-level access to anything.

Launch applications using Alt+F2

Launching applications via Alt+F2 is fairly straight forward, provided you know at least most of the application's name. I say most because Run Application is able to use tab completion (i.e. hitting the Tab key once you have enough of the name typed for it to match) to make things easier. For this example we will be launching a new terminal session.

  1. From the keyboard, press Alt+F2. The Run Application window will display.
  2. Type gnome-ter then press Tab. You will see that the full name gnome-terminal now appears. Press Enter. A new terminal session will launch.
  3. Try this again. This time type fir and press Tab. You should see Firefox. Press Enter to open Firefox.

19 May 2010

Choosing an alternate screensaver in Ubuntu

  1. From the desktop, select: System > Preferences > Screensaver. The Screensaver Preferences window will display.
  2. From this window, you may select the desired screensaver as well as configure additional settings such as: automatically locking your computer when the screensaver is activated and Power Management.

Determine which brand of graphics card is installed on my system

  1. From the desktop, launch a new terminal session by selecting: Applications > Accessories > Terminal. A new terminal window will display.
  2. At the prompt (the blinking cursor), type: lspci | grep VGA then press Enter. This will return something similar to: 01:00.0 VGA compatible controller: nVidia Corporation G86 [GeForce 8400M GS] (rev a1)
  3. From this information, it is clear I have an NVIDIA GeForce 8400M GS graphics card.

Install proprietary graphics drivers

Though probably not required, it may be helpful to determine which brand of graphics card is installed on your system.
  1. Ensure that you are connected to the Internet.
  2. From the desktop, select: System > Administration > Hardware Drivers. The Hardware Drivers window will display after a quick hardware scan of your system is performed. The scan will determine what proprietary drivers are available and list the results.
  3. Select the available driver. If multiple drivers for the same hardware are displayed (as is likely the case when installing the NVIDIA graphics driver), simply click the driver that identified as [Recommended].
  4. Once you have chosen the appropriate driver, click: Activate. The new graphics driver will be downloaded and installed.
  5. Once installation is complete, it is likely that you will need to reboot your system for the changes to take effect. For NVIDIA graphics cards, you will also now have an application titled: NVIDIA X Server Settings, located in the: System > Administration menu. This application will enable you to access information and settings specific to your graphics card.

Configure Déjà Dup Backup Tool to do it's business

  1. From the desktop, select: Applications > System Tools > Déjà Dup Backup Tool. The Déjà Dup window will display.
  2. Select: Edit > Preferences. Déjà Dup Preferences will display.
  3. If you are backing up to an external drive, ensure that this drive is connected now. To define a backup location (i.e. where you want your backup files stored), click: Edit. Note: You may also choose to backup to other external resources via the Connect to Server button. Though for now, we will assume you are using an external hard drive.
  4. From the Backup Location dropdown list, select the desired external drive.
  5. Include files in folders: Next you will add the folders to be backed up. Click: Add then select the desired folder. To select additional folders, simply repeat this step.
  6. Exclude files in folders: Here you may define the sub-folders (i.e. the folders inside the ones you added in the previous step) that you do not want Déjà Dup to backup. For example, you may not necessarily care to waste time and storage space by creating a backup of your Trash directory. As before, you simply click: Add then select the desired folder(s).
  7. To encrypt your backups, click: Encrypt backup files. You may also schedule recurring backups by clicking: Automatically backup on a regular schedule and defining the frequency with the How often to backup dropdown.
  8. After configuring the remaining Keep backups option, click: Close and you will be returned to the main Déjà Dup window.
  9. Pretty self-explanitory from here. To perform a manual backup, simply ensure that your external drive is still connected then click: Backup followed by Backup again. A restore of your backed up data is done with ...wait for it ...Restore.

Install Déjà Dup Simple Backup Program in Ubuntu 10.04 and (Lucid Lynx) and 9.10 (Karmic Koala)

  1. From the desktop, launch a new terminal session by selecting: Applications > Accessories > Terminal. A new terminal window will display.
  2. At the prompt (the blinking cursor), type: sudo add-apt-repository ppa:deja-dup-team/ppa then press Enter
  3. If prompted, type the sudo password then press Enter. Ubuntu will now fetch the PPA (Personal Package Archive) key for Déjà Dup.
  4. Once this is complete, you should see something like: Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv B24F18C361712E3A495E1184FEFFB8F041556EEA
    gpg: requesting key 41556EEA from hkp server keyserver.ubuntu.com
    gpg: key 41556EEA: "Launchpad PPA for Déjà Dup Administrators" not changed
    gpg: Total number processed: 1
    gpg: unchanged: 1
    If you receive an error indicating: gpgkeys: HTTP fetch error 7: couldn't connect to host simply verify the command you entered and run it again.
  5. Once you have successfully imported the PPA key, type sudo apt-get update then press Enter.
  6. After the update is completed, you may install Déjà Dup using either Synaptic Package Manager or by typing: sudo apt-get install deja-dup and pressing Enter.
  7. Once installation is complete, you may access Déjà Dup by selecting Applications > System Tools > Déjà Dup Backup Tool.

OK, great! Now, uhhh ...what do I do with it? Read on...

Install the Chromium web browser

Method 1
  1. From the desktop, launch a new terminal session by selecting: Applications > Accessories > Terminal. A new terminal window will display.
  2. At the prompt (the blinking cursor), type: sudo apt-get install chromium-browser then press Enter
  3. If prompted, type the sudo password then press Enter.
  4. Once installation is complete, you may access Chromium by selecting: Applications > Internet > Chromium Web Browser.

Method 2
  1. Click here to install the ubuntu-restricted-extras package
  2. When prompted, click to open the link with apturl and install the package automatically.

Change the default Ubuntu fonts

  1. From the desktop, select System > Preferences > Appearance. The Appearance Preferences window will display.
  2. Select the Fonts tab.
  3. Make the desired font adjustments (Family, Style and Size) by selecting the desired dropdown list. Your changes will take effect immediately, giving you an opportunity to view the result.
  4. Once you are satisfied with your selections, click Close.

18 May 2010

Playing restricted media formats in Ubuntu 10.04 and (Lucid Lynx) and 9.10 (Karmic Koala)

Ubuntu strives to make all software that meets the licensing terms in the Ubuntu License Policy available. However patent and copyright restrictions complicate...
Blah, Blah, Blah. While Ubuntu makes playback of non-proprietary media formats a snap, additional steps are required to enable the more widely used formats including MP3, WMA and others.

Method 1
  1. From the desktop, launch a new terminal session by selecting: Applications > Accessories > Terminal. A new terminal window will display.
  2. At the prompt (the blinking cursor), type: sudo apt-get install ubuntu-restricted-extras then press Enter.
  3. When prompted, type the sudo password then press Enter.
  4. Once installation is complete, you will have the ability to play all of your favorite proprietary media files.

Method 2
  1. Click here to install the ubuntu-restricted-extras package
  2. When prompted, click to open the link with apturl and install the package automatically.

24 September 2009

Remove fortune messages in the GNOME Terminal?

While periodically amusing, the fortune cookie texts that appear at the top of your terminal prompt can be annoying. Have no fear as these little gems are easily removed.
  1. From the desktop, launch a new terminal session by selecting: Applications > Accessories > Terminal. A new terminal window will display.
  2. At the prompt (the blinking cursor), type: gksu gedit /etc/bash.bashrc then press Enter
  3. At the prompt, enter the gksu (Administrator) password. This is likely the same password you use when logging in. The gedit application will launch with the bash.bashrc file ready for editing.
  4. Locate the line that reads:/usr/games/fortune
  5. Comment this line out by preceding it with a "#" (the hash symbol). The new line should read: #/usr/games/fortune
  6. Save your changes then close the gedit editor.
  7. Close and re-launch the terminal. You should now be greeted with the plain old vanilla terminal.

14 May 2008

How do I determine which version of Ubuntu I am using?

  1. From the desktop, select: Applications > Accessories > Terminal. A command-line terminal window will open.
  2. At the terminal prompt, type: lsb_release -a then press Enter.
  3. Information about your installation will be displayed.