GNU | Linux

Home > Interests > GNU | Linux español

Contents (hide)

  1. 1. Old Pages
  2. 2. My Linux Box
    1. 2.1 Wireless LAN
    2. 2.2 Audio
    3. 2.3 Video + 3D Desktop (XGL, Compiz & Beryl)
    4. 2.4 DVD Playback
    5. 2.5 Making The Lid Switch Work
  3. 3. Wine
    1. 3.1 Winetools Setup
    2. 3.2 Using the KDE Print System with Wine
    3. 3.3 Applications
  4. 4. Cedega
    1. 4.1 Games
  5. 5. Other
    1. 5.1 Development
    2. 5.2 Internet
    3. 5.3 Multimedia
    4. 5.4 The X-Window System
    5. 5.5 KDE
    6. 5.6 Printing

http://xkcd.com/

1.  Old Pages

2.  My Linux Box

2.1  Wireless LAN

The Intel® PRO/Wireless 2200BG Driver for Linux works well with the integrated wireless card.

Update (June 30, 2008): The mirror above finally died, however, the packages do not seem to be necessary anymore with the 2.6.22.14–72.fc6 kernel. Installing the package ipw2200-firmware from the fedora repositories seems to have been sufficient.

2.2  Audio

Audio worked right out of the box. The integrated intel card seems to be pretty standard hardware by now. It also seems that the aoss script is not necessary anymore to enable sound on non-KDE applications.

2.3  Video + 3D Desktop (XGL, Compiz & Beryl)

A proprietary Linux driver with full hardware acceleration support for the ATI Radeon M300 video card is available from the livna repository. Update (April 20, 2008): The most recent driver for the Radeon M300 card from ATI includes AIGLX support and offers improved overall performance. Use that driver instead of the one available from the Livna repository. However, if the latest ATI driver doesn’t really cut it for you, then download version 8.476, which worked pretty well for me (right click, save as…).

In order to install Compiz and Beryl for 3D desktop support, follow the instructions by Nicofo in this page.

2.4  DVD Playback

In order to optimize the performance of the DVD/CDRW combo drive on the dell D610, it is necessary to enable DMA on the drive, which means you have to recompile the kernel. Fortunately, there is a workaround:

Step 1:

Add the following line to the end of the /etc/modprobe.conf file:

options libata atapi_enabled=1

Step 2:

Add the following parameter to the kernel boot line in /boot/grub/menu.lst:

combined_mode=libata

Take a look at the complete workaround here

2.5  Making The Lid Switch Work

You can determine the state of the lid switch by doing:

cat /proc/acpi/button/lid/LID/state

You can turn on/off the backlight of the LCD panel with radeontool. This tool is available from the dries repository. You can also download the source here. After installing both the laptop-mode-tools (also in the dries repository) and radeontool packages, I created the following script:

#!/bin/bash

LIGHT=$(radeontool light | grep "looks on")

if [ "$LIGHT" = "" ]; then
        radeontool light on
else
        radeontool light off
fi

This enables turning on/off the backlight of the LCD panel. You can then use xbindkeys to assign a keyboard shortcut and save some additional battery power.

Turn panel backlight off when lid closes

In order to set and maintain the state of the backlight when the lid is closed, you can create a daemon and call it with laptop-mode-tools. This is specially handy if some of your applications (usually games) like to turn the panel backlight back on when resetting the video resolution or when going into fullscreen.

Step 1

Add the following lines at the end of the /etc/acpi/actions/lm_lid.sh script:

LID_CLOSED=$(cat /proc/acpi/button/lid/LID/state | grep open)
if [ "$LID_CLOSED" = "" ]; then
  /usr/sbin/blightoffd &
else
  /usr/sbin/radeontool light on
fi

Step 2

Save the following script as /usr/sbin/blightoffd

#!/bin/bash

#
# Keeps panel backlight off when computer lid is closed.
#

LID_CLOSED=$(cat /proc/acpi/button/lid/LID/state | grep open)

while [ "$LID_CLOSED" = "" ]; do

  LIGHT_ON=$(/usr/sbin/radeontool light | grep "looks off")
  if [ "$LIGHT_ON" = "" ]; then
    /usr/sbin/radeontool light off
  fi
  sleep 1
  LID_CLOSED=$(cat /proc/acpi/button/lid/LID/state | grep open)

done

3.  Wine

Does your brand new Windows system refuses to install that awesome application you loved in Windows 98? Well, I bet you can run it with Wine! Wine is an Open Source implementation of the Windows API on top of X and Linux. This means that Wine allows you to run Windows applications on Linux!

Note: You should complete the winetools setup before installing any Windows application. This will ensure a stable Windows environment. I installed both Wine and Winetools from rpm.

3.1  Winetools Setup

  1. Type winetools on a console window.
  2. Complete the Base Setup.
  3. If the Microsoft Foundation Classes 4.x download hangs, save the files mfc40.dll and mfc42.dll to the sys directory in your $HOME/winetools folder. You can get the dll files here
  4. Complete the Windows System Software installation. If the Windows Scripting download hangs, you can get the executable from here. Save it to the sys directory and install it later by issuing $ wine scr56en.exe in that directory.
  5. Complete the Microsoft TrueType core fonts installation.
  6. If the font installation hangs, you can download the files directly from here.

3.2  Using the KDE Print System with Wine

Step 1:

Edit the win.ini file in your C:\Windows directory, located in $HOME/.wine/drive_c/windows, to make kprinter the default printer. Add or change the following entries:

[windows]
device=KDE Print System,WINEPS.DRV,KDE:

[devices]
KDE Print System=WINEPS.DRV,KDE:

Step 2:

Add to $HOME/.wine/system.reg:

[System\\CurrentControlSet\\Control\\Print\\Printers\\KDE Print System]
"Attributes"="dword:00000000"
"Name"="KDE Print System"
"Port"="KDE:"
"Print Processor"="WinPrint"
"Printer Driver"="PS Driver"
"Priority"="dword:00000000"
"Start Time"="dword:00000000"
"Status"="dword:00000000"
"Until Time"="dword:00000000"

[System\\CurrentControlSet\\Control\\Print\\Printers\\KDE Print System\\PrinterDriverData]
"PPD File"="/usr/share/wine/generic.ppd"

Step 3:

Add to $HOME/.wine/user.reg:

[Software\\Wine\\Printing\\Spooler]
"FILE:"="tmp.ps"
"KDE:"="|kprinter --stdin"
"LPT1:"="|lpr"

Step 4 (Optional):

Note: This step must be repeated for each application. The procedures may vary or may not be available at all in some applications. You can substitute the now redundant “Print…” function with the “Print” (i.e. print directly) function available from the toolbar customization menu. In Microsoft Office 2000 do the following:

  1. On the menu bar do rigth click | Customize…
  2. Drag the “Print” button to the desired position in the File menu.
  3. Drag the “Print…” button away from the File menu and drop it anywhere.

3.3  Applications

Application Installation Status Issues Screenshot
WinAVR
  1. Configure a virtual desktop for the installer using winecfg (otherwise, you won’t be able to browse through the installation windows)
  2. Run the installer
Running smoothly None
Duke Nukem 3D (eDuke32) Running smoothly
  • Minor sound clipping
Duke Nukem 3D on Linux
Microsoft Office 2000
  1. Simply run the installer from CD: $ wine "Path to CD Drive\SETUP.EXE"
  • Note: Do not install the Office Assistant, it will make your installation unstable.
Running
  • PowerPoint crashes while editing but presentations are ok.
Microsoft Office 2000 on Linux: Word
Age of Mythology
  1. Run the installer (remember to execute the command at a location different from the CD mount point, otherwise you won’t be able to switch to the second installation CD): $ wine "Path to CD\SETUP.EXE"
  2. When prompted for second CD, eject the first CD, mount the second CD and press “OK”.
  3. Using winecfg setup a virtual desktop for AoM.exe (prevents screen size/resolution changes).
Running smoothly None
Age of Mythology on Linux: Campaign

4.  Cedega

These days, game support is about the only reason why I sometimes still regress to Windows, but that is rapidly changing. Cedega is a neat piece of software that you can use to install and run Windows games under Linux. You can download it from their site after paying a US$15 registration fee which includes a 3 month period of technical support. They have a fairly large library of games supported and they tend to focus on the hottest titles. Here is what I have managed to install (that I actually like):

4.1  Games

Application Installation Status Issues Screenshot
Unreal Tournament (v4.36 Patch)
  1. Simply run the installer from CD: $ cedega Path_to_CD_Drive/Setup.exe
  2. Follow the instructions
  3. Repeat for v4.35 Patch: $ cedega Path_to_Patch/utpatch436.exe
Running smoothly None
Unreal Tournament
VisualBoy Advance (v1.7.2)
  1. Download the latest version from http://vba.ngemu.com/
  2. Unzip the downloaded file.
  3. Run: $ cedega Path_to_Files/VisualBoyAdvace.exe
Running smoothly None
VisualBoyAdvance

5.  Other

5.1  Development

HOWTO create patches with diff

$ diff -Naur olddir newdir > new-patch

or

$ diff -Naur oldfile newfile > new-patch

5.2  Internet

Send Email from Firefox with KMail

  1. Enter about:config into the url field, this will bring up the configuration & preferences data.
  2. Look for the entry network.protocol-handler.external.mailto and make sure its value is set to true
  3. Right click on an open space and select New → String. This opens up a name box.
  4. In the entry field write network.protocol-handler.app.mailto
  5. Hit enter and write kmailservice in the next dialog box.
  6. Restart your browser.

Post Flash Videos Online with FFmpeg and FlowPlayer

5.3  Multimedia

Encode a Windows-Compatible Video

There are a lot of constantly updated video and audio codecs available in Linux. Unfortunately, the choice in Windows is way more limited. Because of this, it is common that videos compressed with the best and latests codecs in Linux cannot be read by common Windows applications. You can encode windows-compatible videos in Linux with mencoder by typing the following command:

$ mencoder -oac mp3lame -ovc lavc -lavcopts vcodec=msmpeg4v2:vhq:vbitrate=1600
  -o videoout.avi videoin.xxx

5.4  The X-Window System

Add True Type Fonts as User

  1. Add the *.ttf file to $HOME/.fonts folder.
  2. Open a console and type:
$ cd $HOME/.fonts
$ fc-cache ./

´ 3. Restart the X display manager.

5.5  KDE

Open a new konqueror tab from command line

kfmclient newTab <URL> "text/html"

Record Audio from Soundcard Output

  1. Open KMix
  2. In the “Switches” tab, activate “Mix”
  3. Open a console and type:
$ arecord -f cd -t wav test.wav

´ 4. Press Ctrl+C when finished
´ 5. You can edit the resulting file with audacity

Integrate Firefox with KDE

Convert TeX files to HTML with Kile

  1. Download and install TeX4ht. Get the Fedora rpm here.
  2. Start kile
  3. Then, choose: Settings>Configure Kile>Build>New Tool. Type in TeX4ht. Click Next button, then Finish button.
  4. At the command text field, type in: mzlatex
  5. At the Options text field, type in: '%source' 'xhtml,mathml-' (with all quotes intact and there is a space between the quoted options)
  6. Click the OK button.

5.6  Printing

The Linux Printing System (CUPS)