Thursday, June 28, 2012

[HOW TO] Install latest Keymon in Xubuntu

key-mon is utility to show live keyboard and mouse status for teaching and screencasts.

key-mon running on Xubuntu 12.04

Install

Navigate to keymon download page and download the deb file with the highest version number (1.13-1 at the time of this writing), then open a terminal window, change current directory (cd) to the download directory and run:

sudo apt-get install python-xlib -y
sudo dpkg -i keymon_*.deb

Usage

key-mon can be accessed via Applications Menu > Graphics > KeyMon or by typing key-mon on a terminal.

When key-mon is running, it'll show the keyboard and mouse events. If you right click inside the key-mon window you can access its settings and enable window decoration, which is useful for moving the window around.

References

Keyboard Status Monitor (key-mon) at Google Code
Display your pressed keyboard buttons with Keymon

Radeon open source driver power saving

Kernel Mode Settings (KMS) is available in the radeon open source driver since Ubuntu Karmic Koala 9.10. KMS allows automatic hardware settings detection and there are two power saving methods available in KMS: Dynpm and Profile.

!If you're using the proprietary ATI driver (fglrx), ignore this article!

Dynpm

The Dynpm method dynamically changes the GPU frequency on demand. So when an intensive task is being is executed the frequency is increased to provide more performance.

To enable the Dynpm method, open a terminal window and run:

sudo sh -c "echo dynpm > /sys/class/drm/card0/device/power_method"

Profile

With the Profile method the GPU frequency is adjusted according to profile settings. There are 5 power profiles:

  • default, uses default clocks/volts
  • low, forces GPU to lowest available frequency; may cause some issues on certain laptops and displays, as this is the mode used when the display switches to dpms off mode
  • mid, forces GPU to be in the "mid" power state all the time; safer to use than "low" for regular desktop usage
  • high, forces GPU to highest available frequency
  • auto, switches between high and mid power states depending on whether the system in on battery power or not

To enable the Profile method, open a terminal window and run:

sudo sh -c "echo profile > /sys/class/drm/card0/device/power_method"

Then choose one power profile, for example "mid":

sudo sh -c "echo mid > /sys/class/drm/card0/device/power_profile "

Check power saving current status

Power saving method:

sudo sh -c "cat /sys/class/drm/card0/device/power_method"

Power Profile:

sudo sh -c "cat /sys/class/drm/card0/device/power_profile"

ATI core and memory frequencies:

sudo sh -c "cat /sys/kernel/debug/dri/0/radeon_pm_info"

References

RadeonDriver at Ubuntu documentation
Ubuntu open source ATI radeon driver power usage tweaks
[How-To] Power saving with the Radeon driver
Radeon HD 6950 temperature is way too hot at ubuntu forums

Wednesday, June 27, 2012

[HOW TO] Install Ambiance and Radiance Themes in Xubuntu (ppa)

Ambiance and Radiance are two Gtk themes and they have a version compatible with Xfce/Xubuntu.

Ambiance has dark panel, dark toolbar and dark window title bar, while Radiance displays this elements with light colors.

There are also some color variations for each theme: Blue, Graphite, Green, Orange, Pink, Purple, Red and Yellow.

Radiance theme at top left and Ambiance at top right. The panel appearance of each theme is beneath it. At the bottom are two color variations of the Ambiance theme.

Install

Open a terminal window and run:
# Add Ravefinity Project PPA
sudo add-apt-repository ppa:ravefinity-project/ppa -y
# Update package information and install ambiance and radiance themes
sudo apt-get update && sudo apt-get install ambiance-xfce-lxde radiance-xfce-lxde
# Install other colors variations (blue, green, purple, ...):
sudo apt-get install ambiance-colors-xfce-lxde radiance-colors-xfce-lxde

References

RAVEfinity Project

Monday, June 25, 2012

Easy window resizing in Xfce/Xubuntu

Simply hold the Alt key, right-click somewhere inside the window and drag to resize.

References

Window resizing in Xubuntu (and Xfce)

[HOW TO] Graphically edit Xfce/Xubuntu Applications Menu

Xfce/Xubuntu Applications Menu is a panel plugin that displays a menu that allows access to installed applications.

Xfce/Xubuntu Applications Menu
Xfce/Xubuntu Applications Menu

The items on the menu can be edited using one tool called Alacarte. Alacarte can be access at Applications Menu > Settings > Main Menu or just type alacarte in the command line (or in xf4run).

Main Menu editor's (alacarte) interface

The Main Menu editor has 3 main sections: Menus list (left), Items list (center) and Action buttons (right).

The Menus list sorts applications by category. Each menu can hold items and other menus (a menu has to possess at least one item to be displayed). The available action buttons for menus are "New Menu" and "New Item", and their name is self-explanatory.

The Item list displays the list of application launchers for the selected menu/category. Items can be moved up and down on the list and their attributes (name, command...) can be edited using the "Properties" action. Items can also be hidden from the menu using the "Show" checkbox, next to the item's name.

Editing a menu item

On bottom of the Main Menu editor's (Alacarte) interface there is a button "Revert" that restores the default menu layout.

Saturday, June 23, 2012

Save disk space with apt-get option "no-install-recommends" in Xubuntu

Every package in Ubuntu has a set required packages, a set of recommended packages and a set of suggested packages. The required packages are dependencies, so their installation is mandatory, but the installation of other two sets can be skipped. The recommended and suggested packages are not essential to the functioning of the package being installed. Disabling the installation of recommendations allows to save a lot of disk space.

Example 1: recommendations enabled
$ sudo apt-get install texworks
...
The following extra packages will be installed:
  lmodern luatex texlive-base texlive-binaries texlive-common texlive-doc-base
  texlive-latex-base texlive-latex-base-doc texlive-luatex texworks-help-en
Suggested packages:
  perl-tk texlive-xetex texworks-scripting-lua texworks-scripting-python
The following NEW packages will be installed:
  lmodern luatex texlive-base texlive-binaries texlive-common texlive-doc-base
  texlive-latex-base texlive-latex-base-doc texlive-luatex texworks
  texworks-help-en
0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
Need to get 91.6 MB of archives.
After this operation, 174 MB of additional disk space will be used.
Do you want to continue [Y/n]? 
Example 2: recommendations disabled
$ sudo apt-get install texworks
...
Suggested packages:
  texlive-xetex texworks-scripting-lua texworks-scripting-python
Recommended packages:
  texlive-latex-base texworks-help-en
The following NEW packages will be installed:
  texworks
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,360 kB of archives.
After this operation, 3,617 kB of additional disk space will be used.
Do you want to continue [Y/n]?

This is a great example of the amount of disk space that can be saved: 4MB against 174MB.

Disable automatic recommendations

  1. Disable recommendations temporally (for single package installation), adding the --no-install-recommends option:

    sudo apt-get install package --no-install-recommends
    
  2. Disable recommendations permanently, using apt.conf file:

    echo -e 'APT::Install-Recommends "0";\nAPT::Install-Suggests "0";' | sudo tee /etc/apt/apt.conf
    

Alternatively, Synaptic (available at Applications Menu > Settings > Synaptic Package Manager) can be used to disable automatic installation of recommend packages. Just access Settings > Preferences > General and uncheck "Consider recommended packages as dependencies".

Using synaptic to disable automatic installation of recommended packages.

References

Tip: Tell apt-get not to install “recommends” packages in Debian Linux

lshw-gtk: GUI for accessing hardware information

lshw-gtk is a front-end to lshw (tool to extract detailed information on the hardware configuration of the machine).

lshw-gtk running in Xubuntu 12.04

Install

Open a terminal window and run:

sudo apt-get install lshw-gtk -y
# Replace su-to-root for gksu in the *.desktop file
sed 's/su-to-root -X -c/gksu/g' /usr/share/applications/lshw-gtk.desktop > ~/.local/share/applications/lshw-gtk.desktop

Usage

To get accurate information, lshw-gtk should be run as root:

gksu lshw-gtk

It can also be accessed via Applications Menu > Settings > Hardware Lister.

References

Como ver os componentes do computador (hardware)
lshw(1) - Linux man page