Wednesday, September 19, 2012

DVD Ripping

I have a problem with ripping some DVD's, right now it is Ratatouille.
Basically the rip failed with every single DVD ripper on Linux. It seems they have won the DRM battle to get me not to rip this DVD.

That is until I came across this simple "fix". Simple explanation of the problem:
Some DVDs have bad sectors as a copy protection mechanism, which makes some tools choke. However, ddrescue can rip copy-protected DVDs to iso.
Now down to bussiness!
Make sure the DVD is unmounted, then use ddrescue to make an ISO of the disk:


Code:
ddrescue /dev/sr0 movie.iso


This may take a while, once this is finished you can use any decoding app, like Handbrake, to rip the ISO.

Saturday, April 14, 2012

Bash scripts

Forgive me for using this space to bookmark a few scripts I pick up all over the internet, this is for me personally, but anyone can copy and use as they please. This will be updated each time I find new and interesting scripts.

Batch convert .wav to .mp3:

Put this scripts in the same folder as all the .wav files and execute it.

Code:
#!/bin/sh
# wav to mp3

for i in *.wav; do
 if [ -e "$i" ]; then
   file=`basename "$i" .wav`
   lame -h -b 192 "$i" "$file.mp3"
 fi
done


You could also use ffmpeg if you get the following error:
Unsupported data format: 0x0011

Code:
#!/bin/sh
# wav to mp3

for i in *.wav; do
 if [ -e "$i" ]; then
   file=`basename "$i" .wav`
   ffmpeg -i "$i" "$file.mp3"
 fi
done

The reason for the error?
This indicates that the data was compressed using Microsoft's ADPCM
codec and LAME supports PCM only.

More to follow soon!

Thursday, August 11, 2011

StarCraft 2 and Linux - Part 2

I have tried various ways of getting this running well on Linux and read a lot of tutorials on different wikis which led me to believe that every setup is almost unique. In general it will run with any installation method, but to get the best performance out of it you will have to fiddle with the settings a bit and test out what is best for your system.

I could not get the game to install from the DVD so I had to resort to the following method.

Step 1
I had to install the digital downloaded version from Battle.net.
If you bought the game and have the serial number then simply register an account with them, you will need to in any way to play the game, so might as well do it now.
Once you have registered the game you can now download the digital game client. It goes without saying, but to be complete, download the Windows client!



Step 2
Start the client in wine:

Code:
wine StarCraft_2_EU_en-GB.exe

It is basically just a peer-to-peer program that allows you to download the game data (7GB in total) from either the official server or from other peers who is seeding the game at the time. Some people get great response and speed improvements from allowing peer-to-peer traffic, while others, like myself, had to disable it to eventually have the game downloaded after 36 hours.

Tips:

  • Each time you disconnect from the internet (your ISP reset your connection, whatever) you will need to download the client again. It seems that it logs the IP you used to download it and if there are any IP conflicts then you will get an error message "This download is not authorized."
    You will need to log back into Battle.net and download a new client. The game data is still safe and the client will first check the integrity of the data before continuing the download.
  • The data is saved in /home/[user]/SC2/SC2-WingsOfLiberty-enGB-Installer/
    Make a back-up of the data as soon as the download has finished!


Step 3
Once the download is complete the installer will start. I canceled this. You can always continue and try your luck, but I took the easier route.
Get yourself PlayOnLinux and install it. It should either be in your disto repository or you can download the package file and install it yourself.

Once installed, launch it. Click on Install -> Games -> StarCraft II Wings of Liberty
Now you can just follow the installer instructions and point it to the digital download and install the game, could not be more simple.

Along the way you will need to answer a simple few questions, like how much RAM your graphics card has, but I'm sure you will know how to handle this!

Step 4
Optimizing the game.
There is a lot of different articles on the net regarding performance tuning your installation, I'll link some of them here and you can sift through them to see what works on your system.

I left mine with the default PlayOnLinux configuration and only added a few bits and pieces from here:

Check out the "regedit" part and see what you can pirate from it.

More on Linux and StarCraft 2 performance in general:
http://appdb.winehq.org/objectManager.php?sClass=version&iId=20882

Well, that should do it. Got a problem, ask away!

Thursday, August 04, 2011

Starcraft 2 and Linux - Part 1

Okay, I'm a bit late to the party. I only bought the game a couple of days ago after finally getting around to playing the demo.


Last week I installed the StarCraft 2 demo with winetricks and I really enjoyed it, a lot! So after spending a few hours on the demo I finally decided that this game is worth the while and I headed out to buy it.

First check the on-line store at Battle.net, $80-00 + (R600-00, ZAR), are you kidding me?! NEVER!
So I put that on the ice, no way am I ever going to pay that much for a game.
The rest of the week, whenever I went past a gaming shop I would just quickly pop in to see what they list it for, and finally I got the game for $58-00 (R400-00), now that is more like it, still very expensive for a year old game, but do-able.

At home I popped in the DVD and started the installation... I/O error. No problem, copy the entire DVD to PC, I/O error.
Okay, then dd it to an ISO, I/O error.

Lets try another PC, I/O error. How can this be, it seems the disk is corrupt? Well, yes and no. It seems there is a bug in ext4 that does not handle single large files very well. The main installation file of the game is 7GB large.
You can read more on this here:
Error while copying file
Any of the following topics

So it is either a DVD issue or a file system issue, whatever the case I will need to get the digital copy.

No problem, I'll just download the game client from Battle.net.
What a frustration this was, 36 hours it took me to finally finish the download, 36 hours!
And each time my line DSL is reset, and I get assigned a new IP, the download client would fail with a "this download is not authorised".
I then have to log into Battle.net, get the new client and start again. Luckily it resumes the download but I had to download a new client at least seven or eight times.

Wow, I bought the hard copy and still have to play a single skirmish.

It seems that the everything went fine with the installation of the digital copy and the game is now being updated, nineteen patches to install.

Once that is done I'll be back with a more "how-to" post on getting the best performance out of StarCraft 2 on Linux.

Wednesday, July 27, 2011

Remote control your Linux desktop from an Android phone!

I just recently came across this nifty little app that lets you turn you Android phone into a remote mouse of keyboard, and the best part is it works 100% on Linux!

First install this on your Android phone:
PRemotedroid

Now download and extract this zip file on your Linux desktop machine:
PRemotedroid server

Change into the directory of that you just unzipped and issue this command:

Code:
java -classpath bluecove-2.1.jar -classpath blucove-gpl-2.1.0.jar -jar PRemoteDroid-Server.jar

On your desktop you will see the app running in the taskbar, from this you can get the IP and password you will need to sync with your phone.
Set up the app on your phone with these details and under "Connections" you should see the connection you just set up. Long press on the icon to bring up a menu and choose "Use".

You should now be able to use your Android phone as a remote mouse and keyboard! Success!

Tuesday, July 26, 2011

0 A.D. RTS Game

The title leaves much to be desired, but the game hits a sweet spot that has been neglected on Linux for a long time.

I'm not a fan of RTS, but every now and then I get the urge to manage my own country and hopefully live long enough not to ruin it!
Linux has been on the short end when it comes to native RTS games, there are only a handful of them around and a while ago I stumbled onto this little gem from Wildfire Games: 0 A.D.

Let me just start by saying the development on the game is spot on with timely releases and huge improvements with every other update. Since I began playing it last year it has come in leaps and bounds, especially the graphics of this game is impressive!
Quite recently they updated the in-game bots to a more challenging level, so that made the game a bit more realistic, however the AI is not that difficult to beat. It would be nice if the introduced a more advance bot in the future.

Multi-player is still not implemented, and you cannot change any settings off-hand, but hey, this is an Alpha release!

Game play is like every other RTS out there, you gather resources, build your base and attack. There are no unit and building upgrades to be had like the more modern RTS games (StarCraft 2, WarCraft, etc. for example) and the pace of the game is on the slower side, but this makes it perfect for the beginner to pick it up and start learning.
The only "upgrades" to your units can get is the special elite units that will increase damage, range, etc. of your normal units. I really can't tell if this makes a difference, just amass a large enough army and pummel the enemy is my usual strategy.

All this said, the game is still slated as an Alpha release, but what an Alpha this is! I just hope the project doesn't get abandoned and grows into a very fine game. Because of this it would be very unfair to criticize the game, so let me then just add a wish list of feature I hope they implement in future releases:

  • Unit grouping - assigning key numbers to unit groups would be very nice. Micro management without this is impossible.
  • Better bots to practice against - add a higher difficulty bot
  • Better notifications on units build, workers being idle and buildings complete
  • Notifications on units being attacked
Off the top of my head, this is the biggest features I would love to see added. If one is going to play this game at a competitive level then you really need those notifications to draw your attention while busy elsewhere on the map. I usually find myself with workers standing idle and no indication that they were finished building or working on a building. I have this eerie voice in the back of my head of a WarCraft troll shouting: "Jobs done!"

I enjoy the game, and for a challenge get three bots to gang up on you.

Here is some of the game play footage I slapped together of the latest release:


There you have it, a promising start and lets hope a successful game in the near future!

Thursday, July 07, 2011

Team Fortress 2 free! and installing Steam on Linux

If you have Steam installed via WINE, then you should start it up immediately and download Team Fortress 2.

It is free to play and a lot of fun, it runs flawlessly in Linux.

Installing Steam on Linux. There is the easy way and then the way I prefer.

The easy way is to install PlayOnLinux and just follow the prompts once you start the application. This should install all the needed WINE applications and dependent packages.
Once you start PlayOnLinux you can now just choose for it to install Steam and everything should go without a hitch.

If you however find something missing or that WINE complains that something additional is needed, use winetricks to install what is missing. The biggest problem is usually the Tahoma font that is missing or not installed propely, so just install it with winetricks:

Code:
winetricks tahoma

Start up Steam and get your game on!

If you like the old school way to install Steam, then this is the way to go about it.

First install WINE, now this can be done by searching for it in your distro package manager, so I'm not going to cover this since it should be straight forward.
Just as a precaution start up winecfg once to create the registry and directories to get everything going.

Additional packages that you may need and find useful for other applications as well is cabextract and wine-Gecko. Search for them in your distro package manager and install it as well.

Next, download the Steam installer and issue the following command in the download directory and follow the instructions that follow:

Code:
wine start SteamInstall.msi

Again, once this is done install the Tahoma font with winetricks.

That should do it! Happy gaming!

Linux Mint

Just a quick update regarding Linux Mint.

I'm very pleased with the performance on the Netbook and have decided to convert all the remaining Ubuntu machines over to Linux Mint.

This signals the end of a rather shaky *buntu journey for me and frankly, I couldn't be happier.

Until next time.