How to Update Wine and PlayOnLinux on Backtrack 5 R3
WARNING: THIS ALSO ENABLES PLAYONLINUX TO RUN AS ROOT, WHICH IS NECESSARY!!!!!
Step 1: Adding Necessary Repositories
The first step to updating PlayOnLinux is to add what are considered "third-party" repositories to your installation, as the latest Wine and PlayOnLinux packages are not on the default repositories.
The first repository you will need to add is the WineHQ repository. All you need to do is open a terminal window, whether it is xterm, konsole, or some other, it doesn't matter. (If you are using Backtrack, you should be familiar with this procedure). Type this command or copy and paste it into your terminal window:
add-apt-repository ppa:ubuntu-wine/ppa
Next, add the PlayOnLinux repository by typing this:
wget -q "http://deb.playonlinux.com/public.gpg" -O- | apt-key add -
wget http://deb.playonlinux.com/playonlinux_lucid.list -O /etc/apt/sources.list.d/playonlinux.list
Step 2: Update Your Sources and Upgrade Already-Installed Packages
The next thing you will need to do is update your repositories and upgrade all packages. To do this all you need to do is type this in terminal:
apt-get update && apt-get dist-upgrade
Make sure you type 'Y' (without quotes) when asked.
If you already had PlayOnLinux installed, then you can skip to Step 4. If not or you don't know, then...
Step 3: Installing PlayOnLinux
This is extremely simple, just type this in terminal:
apt-get install playonlinux
Once again, remember to answer 'Y' when asked.
Step 4: Configuring PlayOnLinux to Run as Root
Unfortunately, allowing PlayOnLinux to run as root is completely necessary in order to use it on Backtrack. There are 2 options for using PlayOnLinux within Backtrack, the 1st I will not be explaining, as it is explained many places elsewhere and is fairly easy to look up, and that is to add a separate, non-root, user to your installation, then login and run PlayOnLinux via that user.
The second, which I will be showing you, will require the modification of 2 files in your POL installation. The 1st is located at /usr/share/playonlinux and is called sources
It can be modified like this:
nano /usr/share/playonlinux/sources
'nano' can, of course be replaced with any of your favorite text editors, like gedit, kwrite, vim, or your prefered IDE such as geany.
You will need to change the lines looking like this:
if [ "$(id -u)" = "0" ]
then
echo "PlayOnLinux is not supposed to be run as root. Sorry"
exit
fi
To look like this:
#if [ "$(id -u)" = "0" ]
#then
# echo "PlayOnLinux is not supposed to be run as root. Sorry"
# exit
#fi
Save it, and close is
The next file you will have to modify is located in /usr/share/playonlinux/python and is called mainwindow.py. You can start editing with this command:nano /usr/share/playonlinux/python/mainwindow.py
Once again, feel free to use whichever editor you like best.
You will need to change the lines that look like this:
#### Root uid check
if(os.popen("id -u").read() == "0\\n" or os.popen("id -u").read() == "0"):
wx.MessageBox(_("{0} is not supposed to be run as root. Sorry").format(os.environ["APPLICATION_TITLE"]),_("Error"))
os._exit(0)
To this:
#### Root uid check
#if(os.popen("id -u").read() == "0\\n" or os.popen("id -u").read() == "0"):
# wx.MessageBox(_("{0} is not supposed to be run as root. Sorry").format(os.environ["APPLICATION_TITLE"]),_("Error"))
# os._exit(0)
Save it and you're all done! NOTE: You will have to redo Step 4 after POL gets an update, when it does. Thanks for reading, hope it helped someone! Please comment if you have any questions or improvements!