Install Windows Games in Linux with PlayOnLinux …

Hi all… I have a Dell XPS M1530 running on Fedora 10. It has got a 2 GHz Intel Centrino Duo processor, 2GB RAM, 256 MB Nvidia GeForce 8600M GT, quite a configuration for decent gaming. But till today I had to boot in Windows Vista to play games. So I have been trying to install and run Windows games in Fedora. There are a few tools for this purpose. The famous and proprietory and non-free Transgaming Cedega, Codeweavers Crossover Games and the all free PlayOnLinux. All these use wine which is a free software for running Windows applications in Linux. Though paid, Cedega and Crossover Games don’t support as many applications as PlayOnLinux. And when you are not sure that whether your games are going to run or not in Linux, wine and PlayOnLinux is the free and good option to stick to.

PlayOnLinux has got a lot of .pol scripts to automate the installation of games, but they require that the game’s installation source is in a cd/DVD ROM. I tried installing from the game ISO mounted or from any local folder, but failed till yesterday. I did a bit google and tried to read the .pol file and found that games can be installed from a source folder of the game without it being on a cdrom. Here’s how to do it:

1. Open playonlinux, its better if you open it from the terminal, it gives many useful information :


2. Select Install.

3. Then select “Install a .pol package or an unsupported application“.

4. If you don’t have any custom .pol package select “Manual installation” and click “Next” .

5. Do as directed, then under “What do you want to do?” select “Install a program in a new prefix”  in case you are installing the application for the first time. Select “Edit an application already installed” if you have to update your installed application like patching it to a newer version, or installing mods, or other packs, or may be other support softwares like DirectX, etc.

Select “Delete a prefix” if you want to delete an already installed application (wineprefix)

6. Do as directed.

7. “Do you want to confiure your prefix before installing your application?”

If you want to configure wine before installtion, select “Yes”, otherwise “No”

8. “Browse the file to execute”

Browse the setup.exe (or whatever for your game) in the game source folder, and select Forward.

9. Then follow the onscree instructions and finish the installation, and allow creating shortcuts (if you want…)

10. Now you will be able to see the installed game in Playonlinux window. Select the game, and choose “Configure this application“. Use the “Use advanced wine configuration plugin” to do some wine tweaks. You get the options of configuring

  • DirectDrawRenderer
  • UseGLSL
  • VideoMemorySize
  • OffscreenRenderingMode
  • RenderTargetLockMode
  • Multisampling
  • MouseWarpOverride

After configuring these based on the hardware abilities on your system, you are almost done.

11. But still we don’t have DirectX installed and without these, the DirectX requiring games will fail to run. You can either Install DirectX manually via PlayOnLinux and choose the concerned prefix of the game which you want to update.

Or you can just copy some dll files from the Windows/System32 folder if you have Windows installed in your system, or you can get from your friend’s computer running Windows and having DirectX 9.

Playonlinux has got a lot of supported games, and you always have the option of adding new games to the list.

Day 2, DGPLUG Fedora Activity Day, 2009 …

15th May, 2009, Day 2, DGPLUG FAD in Dr. B. C. Roy Engineering College, Durgapur.

It was around 11:30 AM, that we started the 2nd Day of FAD. The number of participants were less than the Day 1, it was around 15, but we could see some new faces. The ECE students couldn’t join because they had their internals and Lab Examinations the very same day. We started the day with some cool videos from on Okular, KSnapshot, Packagekit, etc.

It was followed by a session on basic shell commands by Harsh Verma (yevlempy). He showed to the participants the usage of basic shell commands like cp, mv, rm, … and others. Arindam Ghosh gave a nice intro on the FHS, i.e, File Hierarchy System of Linux systems. The students simultaneously tried the shell commands being taught in their respective terminals. Then Arindam and Subhodip started speaking on the execution rights and thus the chmod command. They lucidly explained the features of chmod and how to use it. Then they explained to the students that it is because of the Linux way of file permissions that Linux is very secure against viruses. They also laid stress on the evils of Graphical root login and told that they can always use the terminal for root access while logged in as normal user to do administrative tasks. They also said why to learn using the command line.

Then I ( rtnpro) took on the how to install softwares in Fedora via the YUM package manager and Package-kit. I configured the system being used for the presentation to use the Fedora 10 repository in my Pocket Hard-drive … I call it Mirror-in-a-Disk , he..he.. 🙂 . Then Subhodip explained what is a repository, and the details of /etc/yum.repos.d/ and the details in the *.repo files. Then I showed them how to install softwares via YUM and its other options like search, grouplist, groupinstall, update, etc. Then I also showed how to install packages via the Package-Kit.

It was followed by a session on the Vi Text Editor by Dibyanshu Jaiswal. He explained to the students the basics of the Vi text editor and some advanced features of it. In between, Subhodip and Arindam setup a local mirror in a computer Lab 207 to cater to the local needs for installing packages in BCREC. Other text editors like Gedit and Kwrite were also showed. Then there was a break.

After a 30 minute break, I started taking on a session on GCC, the GNU Compiler Collection.  Just as I started the session, I saw some new faces showing up. It was welcoming. I also showed them how to use google search and wikipedia to find information. For this I myself did a wkipedia search on GCC and showed it to them. Its so easy to get info 🙂 . In between Arindam and Subhodip kept on explaining on what needed more explanation to make these new topics clear. I told the basic do’s and dont’s in gcc like avoiding conio.h, using int main in place of void main. I started with the classic Hello World program and introduced to them-c, -x, -std, -o, -lm and -I options of GCC. Then we did some class assignments like the Fibonacci series. I showed them a c program involving command line arguments. There were some wonder moments during the c drills. A girl practised so much Python lately that she was typing Python code in place of c code. Here, have a look. Then Arindam and Subhodip introduced the Anjuta IDE to the students. The students who were finding the command line hard found it interesting.

A Power cut again disrupted the proceedings. However, that did not stop Subhodip from giving the students a sneak peek into Java in near-darkness on a laptop with the stuents surrounding him. He also showed them his GSoC JOSM project work, which he developed using Java. Having distributed Fedora 10 DVDs, Fedora 10 FEL Live DVDs, and stickers, we called it a day at 5:45 p.m.

Stay tuned for event Pics.

DGPLUG Fedora Activity Day … Day 1, 14 May 2009

The Linux Users’ Group of Durgapur, i.e, DGPLUG conducted a Fedora Activity Day in Dr. B. C. Roy Engineering College, Durgapur. Though it was planned to be a 1 day FAD, it got extended to one more day, i.e, 15th May 2009. The people working for this FAD to happen are Harsh Verma, Kishan Goyal, me , i.e, Ratnadeep Debnath (rtnpro), Subhodip Biswas, Arindam Ghosh, Meejanur Rahaman, Dibyanshu Jaiswal. Also, we had Rangeen Basu Roy Chowdhury with us. And also Arpita, Amrita, Debashree were there to talk on Inkscape. There was also with us Sunny Sharma, another FOSS enthusiast.

The event began at 12:00 PM in the Computer Science Department Lab No. 207 of BCREC. Projector and other necessary things were arranged beforehand by the DGPLUG volunteers working for the event. The Lab computers ran on Live Fedora Electronic Lab DVD, and a few ran on FEL Live USB. Around 25 students from various Departments like CSE, IT and ECE participated in the event. The event began with Arindam Ghosh talking on the Fedora Project. It was followed by Kishan Goyal speaking on “Myths about Linux busted with Fedora”. In between, whenever needed, Subhodip Biswas elucidated some of the topics being discussed. This was followed by a presentation on Inkscape by Amrita, Arpita and Debashree and a hands-on session on Inkscape. This was followed by me, Rangeen and Sunny giving a demo of KDE to the participants. It was around 2:10 that the 1st session ended. Then there was a break.

It was around 3:00 PM that we resumed the session. Rangeen then started with the introduction of IRC to the participants and soon Arindam and Subhodip joined the discussion. An Airtel Mobile Office Connection was arranged for the purpose. Since Airtel does not allow IRC clients like ChatZilla, X-Chat, etc. we had to use for the purpose. The participants were shown how to use the IRC. Shrink (Shreyank Gupta), Roshan08, mbuf (Shakthi Kannan) were online that time and took part in the live demo of IRC. The particiapnts were told about IRC ettiquetes.

It was followed by Rangeen’s session on Fedora Electronic Lab. Rangeen prepared some cool slides for the purpose which made the students interested in the topic. He showed them various cool FEL tools and did some small exercises on them with the students. The session was great except for the unepected power cuts that disturbed the session. Finally the FAD Day 1 was wrapped up at 4:30 PM. The participants were very enthusiastic. It was announced that the 15th May is going to be a day long session on Programming ( c, java, etc.) using FOSS tools.

After the session enden, Rangeen left for Bankura. We went back to our mess happy and exhausted.

Pictures of today’s eventw will be uploaded soon.

How to make a custom Fedora Linux Distribution

The following is a nice tutorial on how to create a custom Linux Distribution .

IconPCPlus has a tutorial on building your own Linux distribution with the customizations you want, derived from Fedora, using the graphical interface called Revisor. “We’re used to thinking of Linux distributions being set in stone. They’re either KDE or Gnome, use a certain kernel and bundle certain applications. But this doesn’t have to be the case. If you find yourself making the same adjustments each time you install a new distribution, it’s worth creating your own customised version. Revisor is a tool that lets you do just this, and in this tutorial, we’ll show you how.”

Working with some bluetooth coding :)

It’s been quite some time since I started poking with bluetooth coding, but didn’t understand it much. But it was quite some moment this afternoon. I was trying to study the rfcomm source code, and finally could able to find out the part of the code responsible for the “bind” option for rfcomm. Had a code already for scanning for nearby bluetooth devices. Edited some of theirs codes, added some lines, and came up with a code in c which scans for nearby bluetooth devices, displays them, asks the users to choose one of the devices to bind, and accordingly binds that device. But for that, the device must be already paired up with the host computer. Here’s the code:

#include <stdio.h>
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/wait.h>

#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
#include <bluetooth/hci_lib.h>
#include <bluetooth/rfcomm.h>

int bt_scan (char baddr_list[][19], char name_list[][248] )
inquiry_info *ii = NULL;
int max_rsp, num_rsp;
int dev_id, sock, len, flags;
int i, j;
char addr[19] = {0};
char name[248] = {0};

struct sockaddr_rc loc_addr = { 0 }, rem_addr = { 0 };
char buf[1024] = {0};
int s, client, bytes_read;
socklen_t opt = sizeof (rem_addr);

dev_id = hci_get_route(NULL);
sock = hci_open_dev( dev_id);
if (dev_id < 0 || sock < 0){
perror(“opening socket”);

len = 8;
max_rsp = 255;
ii = (inquiry_info*)malloc(max_rsp * sizeof(inquiry_info));

num_rsp = hci_inquiry(dev_id, len, max_rsp, NULL, &ii, flags);
if( num_rsp < 0 ) perror(“hci_inquiry”);

for (i = 0; i < num_rsp; i++) {
ba2str(&(ii+i)->bdaddr, addr);
memset(name, 0, sizeof(name));
if (hci_read_remote_name(sock, &(ii+i)->bdaddr, sizeof(name), name, 0) < 0)
strcpy(name, “[unknown]”);
strcpy(name_list[i], name); strcpy(baddr_list[i], addr);
printf(“%d. %s %s\n”, i+1, addr, name);

close( sock );
return i;


static int create_dev(int ctl, int dev, uint32_t flags, bdaddr_t *bdaddr, char *strba)
struct rfcomm_dev_req req;
int err;

memset(&req, 0, sizeof(req));
req.dev_id = dev;
req.flags = flags;
bacpy(&req.src, bdaddr);

str2ba(strba, &req.dst); = 1;

err = ioctl(ctl, RFCOMMCREATEDEV, &req);
if (err == EOPNOTSUPP)
fprintf(stderr, “RFCOMM TTY support not available\n”);
else if (err < 0)
perror(“Can’t create device”);

return err;

int bind_bt(char *strba)
bdaddr_t bdaddr;
int i, opt, ctl, dev_id, show_all = 0, err;

bacpy(&bdaddr, BDADDR_ANY);
if (ctl < 0) {
perror(“Can’t open RFCOMM control socket”);

dev_id = atoi (“/dev/rfcomm0”);

err = create_dev(ctl, dev_id, 0, &bdaddr, strba);

return err;

int main (int argc, char *argv[])
int count, choice, err;
char name_list[10][248], baddr_list [10][19], strba[19];

count = bt_scan(baddr_list, name_list);
if (count > 0){
printf(“Enter the serial number of the device that you want to connect to : “);
scanf (“%d”, &choice);

if (choice > count){
printf (“Enter proper choice…\n”);
goto x;
strcpy(strba, baddr_list[choice-1]);
err = bind_bt(strba);
if (err < 0) printf (“Might be you don’t have sufficient privileges, try running it as root\n”);
return 0;

To compile this code :

gcc foo.c -lbluetooth

Run the a.out file as root because the rfcomm binding operation needs root privileges.

Any suggestions or ways to improve the code are welcome.

DGPLUG Fedora Activity Day, 2009

A Fedora Activity Day is going to be conducted by the Linux Users’ Group of Durgapur, DGPLUG in Dr. B. C. Roy Engneering College, Durgapur on 14 May, 2009.

The agenda of this FAD is to increase FOSS awareness among the students of BCREC and to introduce them to the wide spectrum of things that they can do in Linux in their day to day life.

Fedora is not just an operating system, it is a community comprised of people coming from different walks of life, yet all believing in the foundations of Fedora

Freedom Friends Features First

There is a place for anyone in Fedora, for anyone who wants to contribute, irrespective of their technical skill level. We will be trying to convey this message with the help of a talk on Fedora Project. Then, there will be a session on “Fedora in your day to day life”.

This will be followed by workshops on :

  • Introduction to Vim text editor
  • Coding in c and c++ in Linux, introduction to gcc and gdb, an Introduction to Anjuta IDE.
  • Basic shell commands
  • Programming in Java in Linux
  • An introduction to FEL

Rangeen Basu Roy Chowdhury has consented to take the session on FEL. Programming in Java in Linux will be taken by Arindam Ghosh and Subhodip Biswas, Introduction to gcc and gdb and coding in c by Ratnadeep Debnath, Basic shell commands by Harsh Verma, and Introduction to Vim text editor and Anjuta IDE by Kishan Goyal. In “Fedora in your day to day life”, Amrita, Debashree and Arpita will be talking on the Free graphic and imaging tools like Inkscape and Gimp. If required, Fedora installations will also be done. Free Fedora 10 installation DVDs will be distributed.

People working to conduct this FAD :

  • Arindam Ghosh
  • Subhodip Biswas
  • Ratnadeep Debnath
  • Harsh Verma
  • Kishan Goyal

Expected attendees : Students of 1st, 2nd and 3rd year from CSE, IT, ECE, EIE of Dr. B. C. Roy Engineering College.

The DGPLUG FAD 2009 event page can be found at

Further details and updates will be notified soon. Any suggestions are welcome.

How to create an ssh key?

I’m not going to talk on the theory of ssh key encryption and all, but how to create one.

OpenSSH is needed to be installed in the system to create an ssh key. Generally, OpenSSH comes with Fedora. But, anyways you can do:

$ yum install openssh

to install it.

Once it is installed, do the following :

$ ssh-keygen -t rsa

You will be prompted to enter the location to store the ssh key files, press Enter for default. The default location is


Then you will be asked to enter the passphrase. Be careful, choose a passphrase that you can remember, otherwise you will not be able to recover your key. In that case you have to create a new key.

By default, your new private and public keys will be stored in ~/.ssh/id_rsa and ~/.ssh/, respectively.

You can share the public key openly, but keep the private key a secret. The public key is used by server administrators to grant you access.

For more details, visit