Tuesday, 17 September 2013

Virtual Machine Manager Error: "The emulator may not have search permissions" for a certain path

While installing a new virtual machine (VM) using Virtual Machine Manager (VMM) , if you ever come across this error:



it is probably because you have stored the ISO file where the emulator is not able to read and also create an image file for the Virtual Machine.

To resolve this error, store the ISO file where you can change the permissions of the directory to assign read-write permissions to the emulator. For example, you can store the ISO file in the home directory of the user you are logged into.

However, it is recommended to store the ISO file in the /var/lib/libvirt/images/ directory. To assign read-write permissions to this directory, open a terminal and do the following:

sudo chmod 755 /var/lib/libvirt/images/

and enter your password. If you get the following error:

$USER is not in the sudoers file. This incident will be reported.

you are not in the "sudoers" group and therefore, cannot perform some priviledged commands(executed by prepending "sudo"). Either ask you system adminstrator to execute this for you, or if you have access to a user in sudoers group, log in using that user and add the following lines to /etc/sudoers file:

$USER ALL=(ALL:ALL) ALL

replacing $USER by the user you want to add to the sudoers group.

Now copy the ISO image of the Virtual Machine you want to create to this directory and create the VM again using VMM. Please feel free to report any errors you face, as comments below.

Monday, 12 August 2013

How to install Dangerous Dave in Ubuntu and other linux-based systems

Dave has been one of favourite games right from childhood. It had been a long time playing John Romero's ultimate creation and felt I should install it on my Ubuntu. So lets start rightaway!

First, we need wine, an application used to run programs designed to run on Windows-based platform to run on Linux-based Operating Systems like Ubuntu. Wine is available in Ubuntu repository, so we can install wine using

sudo apt-get install wine

Install dosbox using

sudo apt-get install dosbox

Get the Dangerous Dave compressed file from here:



Unzip the contents either by right-clicking on the file and clicking on "Extract" or using the following command:

unzip dave.zip

Now right-click on DAVE.EXE and choose open-with "Wine Windows Program Loader" or in the terminal type:

dosbox DAVE.EXE

and here you go!

Troubleshooting:

If you are getting the following error when trying to run DAVE.EXE from the terminal:

DOSBox version 0.74
Copyright 2002-2010 DOSBox Team, published under GNU GPL.
---
CONFIG:Loading primary settings from config file /home/jobin/.wine/dosdevices/c:/users/jobin/Temp/cfgbab4.tmp
MIXER:Got different values from SDL: freq 44100, blocksize 512
ALSA:Can't subscribe to MIDI port (65:0) nor (17:0)
MIDI:Opened device:none


Then you need to copy the contents of dave directory into your /home/.wine/drive_c/ using the following command:
cp /home/$USER/.wine/drive_c/

Wednesday, 24 April 2013

PHP script downloading instead of executing in browser

To run a PHP script in Ubuntu or likewise other Linux-based distributions, your file should be located in the /var/www/ folder. To run the script in the terminal, you can type php filename.php when in /var/www folder. To run the script in browser, type the url as localhost/filename.php.

If opening the file in the browser, downloads the file, instead of executing it, you need to install some packages. To do this, type the following in a terminal:

sudo apt-get install apache-mod2-php5

Now open the file again in the browser by using the url shown above, and your script should be up and running.