Tampilkan postingan dengan label beginner. Tampilkan semua postingan
Tampilkan postingan dengan label beginner. Tampilkan semua postingan

Kamis, 26 Maret 2009

How-To: Change the Wine Theme to Something More Appealing

Notice: I tested this tutorial using Wine 1.1.17, but it should work successfully on previous versions too.

By default, Windows applications which run through Wine don't look very well, since that's the look and feel of Windows 98 at best, to mention nothing about XP:


So what follows are a few easy steps which will allow to change the way applications ran through Wine look like. If you need guidance for installing Wine, here are two tutorials I recently wrote, for Ubuntu 8.04 here and here, and for Debian Lenny here. These should also work in Ubuntu 8.10 (and the upcoming 9.04 Jaunty Jackalope) and the latest Wine release.

1. Download some MS styles from deviantART
First, you will need to get some themes from here. For my example I will be using VistaPerfection X4 (direct download link). After saving it, uncompress the ZIP file and copy the .msstyles file (in our example the file is called VistaPerfection.msstyles) in a location of your choice.

2. Run winecfg and install the theme
Next, run the Wine configuration utility, winecfg, and under the Desktop Integration tab, click the Install theme... button, then navigate to where your .msstyles file is located and select it.

Select the .msstyles file for installation

Now under the Theme drop-down menu, select the VistaPerfection X4 theme and then click OK. This should be all and the new theme should be now installed. Notice that you can still configure the colors if you don't like the default ones.

The look of Wine applications with VistaPerfection X4

Running Notepad

The VistaX theme

Notice: I bumped into this short tutorial in a post on UbuntuForums, here.

Selasa, 24 Maret 2009

How-To: Compile and Install GIMP 2.6.6 in Debian Lenny

GIMP (GNU Image Manipulation Program) is the most popular and powerful image editor on the Linux platform. It benefits from detailed official documentation, as well as a huge number of community-made tutorials and dedicated websites.

The latest stable series, 2.6.x, include several UI improvements, new filters, and the introduction of the GEGL (Generic Graphics Library) framework.

Although the version which comes with Debian Lenny (2.4.7) is stable enough and full-featured, if you want the latest release you can easily compile your own version by following the steps below.

1. Install build-essential and the development libraries

apt-get install build-essential

Next, make sure the sources repositories are enabled (there should be a line which starts with deb-src in /etc/apt/sources.list), for example:

deb-src ftp://ftp.ro.debian.org/debian/ lenny main contrib non-free

Update the package lists:

apt-get update

Install the development libraries:

apt-get build-dep gimp

Install additional dependencies:

apt-get install libgegl-0.0-dev

3. Download the source code
Download the GIMP 2.6.6 source tarball from here, then uncompress it:

tar -xjf gimp-2.6.6.tar.bz2

4. Compile and install GIMP 2.6.6
To compile and install GIMP, just issue the usual commands inside the gimp-2.6.6 directory:

./configure
make
make install

The last one as root. You can also install as normal user using the --prefix parameter, e.g.:

./configure --prefix=/home/USER/usr

Senin, 23 Maret 2009

How-To: Compile and Install VLC 0.9.8 from Source in Debian Lenny


VLC (VideoLAN Client) is one of the most popular video players on Linux, together with players like SMPlayer or Kaffeine. It plays many audio and video formats (including Xvid, DivX, H.264, Theora, WMV, Real Video, Ogg, MP3, FLAC, APE, AC3, WAV) together with DVDs and DVD ISO images.

The version which comes included in the Debian Lenny repositories is 0.8.6h, which uses the wxWidgets kit and it is kind of outdated now. The latest release of VLC is 0.9.8a, which is now built in Qt 4 and includes several improvements over the 0.8.x series.

VLC 0.9.8a running in Debian Lenny

To compile this release from source you can follow the steps below:

1. Install the tools needed for compilation
As root, type:

apt-get install build-essential

build-essential is a meta package which includes tools like gcc or make, needed to compile source code.

2. Install the dependencies
The following command will install the development libraries which are needed for the compilation:

apt-get install libqt4-dev libpostproc-dev libavformat-dev libavcodec-dev libavutil-dev libmad0-dev liba52-0.7.4-dev libhal-dev libdbus-1-dev libfribidi-dev libgcrypt11-dev

3. Fetch the source tarball
Download the VLC 0.9.8a source tarball from here, then uncompress it:

tar -xjf vlc-0.9.8a.tar.bz2

4. Compile and install VLC
To compile VLC, just change the working directory to vlc-0.9.8a and issue the following commands:

./configure --disable-swscale
make
make install

The last one as root.

Configuration

You can also install VLC as normal user by specifying a prefix, i.e.:

./configure --prefix=/home/USER/usr/ --disable-swscale

In this case you can issue make install as normal user. Also make sure to include /home/USER/usr/bin in your $PATH.

How-To: Install the Latest Wine Release in Debian Lenny

Debian Lenny comes with Wine 1.0.1 included in the repositories, which is the stable release of Wine, but it is also a little outdated. Here are a few easy steps for compiling and installing the latest Wine release from source in Debian Lenny. This tutorial should work for the latest Wine release (at the time of writing, the last release is 1.1.17).


1. Install the tools needed for the compilation
Type in a terminal as root:

apt-get install build-essential

2. Install the development libraries needed by Wine
To install the necessary dependencies, first make sure that you have the sources repositories enabled in your /etc/apt/sources.list file. To do this, you should have a line which starts with deb-src, e.g.:

deb-src ftp://ftp.ro.debian.org/debian/ lenny main contrib non-free

Next, update the packages list:

apt-get update

And then install the dependencies:

apt-get build-dep wine

This will take a while, depending on the speed of your Internet connection.

3. Download the source tarball
Get the source tarball for the latest release from the official website, then uncompress it. For example, for Wine 1.1.17 you would issue the following command in the directory where you saved it:

tar -xjf wine-1.1.17.tar.bz2

Next, change the current working directory to wine-1.1.17 and proceed to the next step.

4. Compile and install Wine
You can either do:

./configure
make depend && make
make install

The last one as root. Or you can use their script located in the tools/ directory, wineinstall:

./tools/wineinstall
make install

If you want to install Wine as normal user change the prefix to, say, /home/USER/usr:

./configure --prefix=/home/USER/usr
make depend && make
make install

And make sure to include /home/USER/usr/bin in your $PATH.

Next configure Wine by typing winecfg as normal user and run Windows applications like this:

wine application_name.exe

Make sure to keep the directory wine-1.1.17, so in case you need to uninstall Wine, you will only have to issue the following command from inside that directory:

make uninstall


Alternate way to install Wine: using the WineHQ repository
To set up Wine from the WineHQ repository you will need to follow this simple tutorial, provided on the Wine homepage. To sum it up:

Remove your existing Wine installation as root:

apt-get remove wine

Add this line to your /etc/apt/sources.list file:

deb http://www.lamaresh.net/apt lenny main

Add the GPG key:

wget -O - http://www.lamaresh.net/apt/key.gpg | apt-key add -

Issue the following two commands:

apt-get update && apt-get install wine

This should do it too.

Updated: March 31, 2009

How-To: Compile and Install Wesnoth 1.6 from Source in Debian Lenny and Ubuntu 8.10

The Battle for Wesnoth is a free turn-based strategy game licensed under the GPL. After over one year of constant development, a new stable version, 1.6, was released on March 22, 2009, featuring many graphics and gameplay improvements. To count just a few, you can now log into the multiplayer server using the username and password from the Wesnoth forums; the game includes new graphics for terrain and units (including several new portraits); a new campaign, called 'The Legend of Wesmere' is also available, and it allows the AI to control an allied side.


To compile this release of Wesnoth on Debian Lenny or Ubuntu Intrepid, you only need to follow the steps below.

Note: Ubuntu users, just prefix the commands which need root privileges with sudo.

1. Install the tools needed for compilation
Issue the following command as root:

apt-get install build-essential

2. Install the development packages needed to compile Wesnoth
First of all, make sure you have the sources repositories enabled. To do this, edit as root your /etc/apt/sources.list file and make sure you have a line which starts with deb-src, e.g.:

deb-src ftp://ftp.ro.debian.org/debian/ lenny main contrib non-free

Next, update your packages list as root:

apt-get update

Proceed with the installation of the needed development packages:

apt-get build-dep wesnoth
apt-get install libsdl-ttf2.0-dev libsdl-pango-dev

3. Download the Wesnoth source tarball
Download the source code for 1.6 from the official website, here. Next, make sure the current working directory is the one where the source was saved and uncompress it:

tar -xjf wesnoth-1.6a.tar.bz2

4. Compile and install Wesnoth 1.6
Compiling and installing is simple once you followed all the steps above. Change the working directory to wesnoth-1.6a and issue the following commands:

./configure
make
make install

The last one as root. Notice that you can specify another prefix and install it in your home folder as user instead of root (in this case make sure you include it in your $PATH)

./configure --prefix=/home/YOUR_USER/usr
make
make install

That should be all. You can now run Wesnoth by pressing ALT+F2 and typing wesnoth in the run dialogue box that appears.


Related articles
Review: Battle for Wesnoth 1.6
The Battle for Wesnoth 1.6 Released
Battle for Wesnoth 1.4 Review - Awesome Turn-Based Strategy Game

Updated: March 29, 2009

Jumat, 23 Januari 2009

3 Popular Tips for Konqueror 3.5.9

KDE 3.5.x comes with Konqueror as the default file manager and it is still used in distributions like Debian (the upcoming Lenny release) or older Kubuntu releases, like the LTS 8.04 version. In this article I will show three tips (which I consider popular) for tweaking or working with this older version of Konqueror.

Create an Open as Root menu option
In order to open a directory as root with Konqueror, all you have to do is to create a text file with the .desktop extension with the following content:

[Desktop Entry]
ServiceTypes=inode/directory
Actions=open_as_root

[Desktop Action open_as_root]
Name=Open Directory as Root
Icon=konqueror
Exec=kdesu konqueror %F

Save the file under any name you like with the .desktop extension, say open_as_root.desktop and put it in the ~/.kde/share/apps/konqueror/servicemenus directory, where ~ is your home directory.

Now each time you right click a directory, the option Actions -> Open as Root will be available, and after you will enter the root password you will be able to open it with super user privileges. The screenshot below shows how this should look like:


Use profiles
Since Konqueror is not only a web browser or file manager, but also an image and document viewer (not to mention the ability to embed kaffeine-part and the amarok sidebar), it's normal to use it with profiles, so you can open a different instance of Konqueror for each task separately. This can be easily done by using profiles. For example, to create a profile for file management which will open three tabs in three different directories, you can do the following: first open Konqueror and the tabs you want to be automatically opened (also notice that you can configure previews, icon size or sorting methods - they will also be saved); next go to Settings -> Configure View Profiles... and enter a name for your new profile (FM in this example); now hit Save. You can open Konqueror using this profile with the following command (in Konsole or the Run dialogue - ALT+F2):

konqueror --profile "FM"

Also, see this article to know how to create a launcher for it.

Create web shortcuts
Although on Linux the most popular browser is Firefox, Konqueror still is a pretty good alternative (well, 3.5.9 has some trouble submitting certain forms). One of the features which comes with Konqueror by default are web shortcuts. Web shortcuts can be used to search for a specific term using a specific search engine. The default ones are very numerous, including Google or Wikipedia.


To add a new web shortcut, just go to Settings -> Configure Konqueror... -> Web Shortcuts.


Hit New and fill in the necessary fields. For example, for a search on Uncyclopedia, you would go to http://uncyclopedia.wikia.com/wiki/Main_Page, then search on it any term, like FOOBAR. Then copy the address name (which is http://uncyclopedia.wikia.com/wiki/FOOBAR) into the Search URI field in Konqueror, and replace FOOBAR with \{@}


Finally, give a name to the shortcut, say unc. You can now search on Uncyclopedia just by typing unc:search_term in Konqueror's address bar.

Senin, 12 Januari 2009

How-To: Compile and Install Code::Blocks from Source in Debian Lenny

Code::Blocks is a complete, cross-platform integrated development environment for C and C++, built using the wxWidgets toolkit. Code::Blocks is available on Linux, Windows and OS X, so you may find it useful on Linux if you switched and are already used to it or an IDE like Dev-C++, for example.


The last stable version is 8.02, and was released almost an year ago. Since Code::Blocks is not included in the Debian repositories, I will show in this tutorial how to compile and install it from source in Lenny, the upcoming stable Debian release. Just follow the steps below:

1. Download the source and uncompress it
Download the source code from the official website, here, then make sure to switch the current directory to the one where you saved the source and uncompress it using the following command:

tar -xjf codeblocks-8.02-src.tar.bz2

2. Install the needed dependencies
This should be easy since only a few dependencies are needed. First, make sure you have the build-essential meta-package installed, which contains tools like make or g++, needed for compilation:

su
apt-get install build-essential

Next, install the development packages needed by Code::Blocks:

su
apt-get install wx-common libwxgtk2.8-dev libgtk2.0-dev

You will also need package zip to build it:

apt-get install zip

3. Update wx-config to point to wxWidgets 2.8
Issue the following command as root:

update-alternatives --config wx-config

What appears should look something like this:

# update-alternatives --config wx-config
There are 4 alternatives which provide `wx-config'.

Selection Alternative
-----------------------------------------------
1 /usr/lib/wx/config/base-unicode-release-2.6
+
2 /usr/lib/wx/config/gtk2-unicode-release-2.6

3 /usr/lib/wx/config/base-unicode-release-2.8

* 4 /usr/lib/wx/config/gtk2-unicode-release-2.8


Press enter to keep the default[*], or type selection number:
4
Using '/usr/lib/wx/config/gtk2-unicode-release-2.8' to provide 'wx-config'.

Select option 4 from the list, that is /usr/lib/wx/config/gtk2-unicode-release-2.8

4. Compile from source and install
Make sure the working directory is the uncompressed source of Code::Blocks (codeblocks-8.02) and issue the usual commands:

./configure
make
make install

The last one as root.

5. Run ldconfig as root
Finally, run the ldconfig utility as root to update the links to shared libraries:

su
ldconfig

Code::Blocks should be now properly installed in /usr/local/bin/ and you can run it using codeblocks from a terminal or from a run dialogue (ALT+F2 and type codeblocks in KDE and GNOME).


Related articles
Compiling C/C++ Code in Ubuntu and Available IDEs
Running Google Chrome Under Wine 1.1.6 in Debian
Create a Launcher in KDE3