Between Linux and Anime

Kind of like Schrodinger's Cat

Category: Linux (Page 2 of 5)

Cannot play anything with VLC on OpenSUSE?

Mplayer and Kaffeine and such work perfectly fine (which means codecs are properly installed)? Getting irritating and inexplicable errors like these?

main decoder error: no suitable decoder module for fourcc `mpga’.
VLC probably does not support this sound or video format.
main decoder error: no suitable decoder module for fourcc `mpgv’.
VLC probably does not support this sound or video format.

I have absolutely no idea why this happens, but apparently the VLC that comes with some common repos for OpenSUSE (I think I got this having installed from Packman!) is somewhat borked. Want a working VLC? Grab it from the Videolan repo. I installed that in desperation and all was suddenly right with the world.

(I half didn’t want to make this post since I can’t actually explain what the problem is and am too lazy to find out, but this solution needs some Google love, so here)

Rate this post
An error occurred!

Building mplayer-mt for Multi-Core HD Video Decoding

Unable to play that 1080p video without lagging? Wanna watch that 720p video file on dated hardware? Well here’s something you can try. Basically the default behavior of most video players is such that they only hog a single core while doing video decoding. If we also commit all the other available cores to the task, well, we’ll of course expect to get better performance. You won’t get double or triple the performance of course – things don’t work out that simply. The difference is noticeable though.

This isn’t a new method. However, the old instructions don’t seem to work anymore – the ffmpeg-mt branch no longer seems to build with mplayer without non-trivial modifications. Fortunately, all the improvements in the ffmpeg-mt branch have recently been merged into the main release. So we can now use the main release instead.

  1. Grab the mplayer source:

    svn co svn:// mplayer

  2. Grab the source for the latest ffmpeg release here. The version I tried is the latest one as of the writing of this post: 0.9.1. Simply download and extract the ffmpeg folder into the mplayer folder from the previous command.
  3. Now build mplayer:

    cd mplayer
    nice make -j 4

  4. And install it as ‘mplayer-mt’:

    sudo install -m 755 mplayer /usr/bin/mplayer-mt

Now you can use mplayer-mt to play more performance-intensive videos and should perceive a noticeable improvement, assuming you have a multi-core processor. If you use a GUI frontend like smplayer, look for an option that lets you specify the mplayer executable, and replace it with mplayer-mt.

Unfortunately I have no idea if anything similar is possible with VLC. If you do, kindly let me know at the comments.

Rate this post
An error occurred!

Running Graphical/GUI programs from rooted terminal on Linux

Everywhere across the Internet you’ll find “answers” to this question that tell you to do gksudo and kdesu and if you’re like me you get by by working around your problem in some way that lets you gksudo or kdesu – until that one time when it just doesn’t cut no matter which way you slice it. That time is now for me, and what a surprise, it’s a damn pain in the neck to actually dig out a solution from amidst the mountain of “use gksudo/kdesu”s.

So here’s me penning this post to hopefully help combat the million other gksudo/kdesu posts out there – because sometimes, you need stuff run – graphically and as root – when you’re not around to type a password.

Solution is surprisingly simple. Your X display is normally loyal only to you (the user) and will not answer to any other user, not even root. If you tried to run a graphical application from a rooted terminal, it’ll say something like the following:

X11 error: Can’t open display :0

Which is your application’s plaintive cry at being shut out by X. So to get around this, you basically just need to tell X to stop doing that. Like so:

xhost +

Run it as your regular user (X normally ignores everyone else remember?). And that’s it! Try it. Open a terminal, su, and open firefox or something.

PS: yes I’m not dead yet, and yes I still haven’t finish that blasted Eva post I’ve been sitting on for ages ;_;

Rate this post
An error occurred!

Fixing sound problems on “Ori, Ochi, Onoe” (and other old renpy games) on Linux

Well that was an unwieldy title, but I had been googling hard for this and have basically turned up blank. Now that I’ve worked out a solution, I’m gonna make it as discoverable as I can.

Problem: I was trying to play “Ori Ochi Onoe“, a 2006 short visual novel created with renpy that had some good word going around for it. I played through a good part of it (on my linuxbox of course) having the overarching impression that while the writing was not bad, something was off – it was dullish, not atmospheric enough. I later discovered the problem – sound, and thus BGM, wasn’t working!

Solution: I guessed that the game, being from 2006, probably used python libraries/bindings that are dated and that don’t play well with a modern linuxbox’s sound stack (the linux sound stack is a terrifying can of worms, what else is new). Thus I conjectured that if I were to replace the python binary and its libs with a newer version from a newer game (renpy games ship with all their libraries in the package), that might do the trick.

And it did!

What to do:

  • Find another renpy game, a recent one that works, for example the Katawa Shoujo demo.
  • Remove (or move) everything in o3-linux/py4renpy-2.3.5-5.5.4.

    cd o3-linux/
    mkdir backup
    mv py4renpy-2.3.5-5.5.4/* backup/

  • And copy the contents of the lib/ folder of the new, working renpy game into py4renpy-2.3.5-5.5.4.

    cp -r ../Katawa\ Shoujo\ Act\ 1\ v4-linux-x86/lib/* py4renpy-2.3.5-5.5.4/

  • Done! Run and enjoy!

For the uninitiated, renpy is a free software Visual Novel engine. Games created with renpy can be targetted at Windows, Mac, Linux, and more recently Android. (There is some sketchy support on the N900 too). There are a pretty large amount of games out there and most of them are free. It’s pretty hard to find good ones though. If you’re interested, Ori, Ochi, Onoe and Katawa Shoujo (links above) could get you started.

Omake: I’ve been working to get renpy games to work in a satisfactory way on my tablet. It’s harder than one would expect – it’s linux and it runs, but full screen mode doesn’t seem to work properly with touch, and crashes Kwin every now and then. Plus my tablet only has 600px of vertical space, which is exactly equal to the vertical window size of most games, so I had to do some Kwin window rules and custom settings to get it to appear over the top panel and thus use the full vertical space. I think I’ve more or less nailed it though:

Ren’py atop Plasma Active!

Summary of what needed to be done: get rid of window decorations, set “Keep above others”, and position it so it covers the top panel. I made a set of Kwin window rules to automatically set all these parameters on startup.

Rate this post
An error occurred!

I’m just gonna leave this here

Yes, that is Plasma Active, and yes I am the fresh owner of that tablet. Don’t ask about the hole in my pocket. It’s a Viewsonic Viewpad 10 that came with Android and Windows 7. Well, it runs Android and Plasma Active (on OpenSUSE) now ;)

Also I just enrolled for this AI class. Coolbeans.

A little swamped right now, and as is often the case during times when I am swamped, lots of interesting things are going on and I’m itching to write stuff. Time however, is scarce :( We’ll see what happens.

(Linux + Touch = <3 <3 <3)

Rate this post
An error occurred!

“The host key for this server was not found, but another type of key exists.” When using sftp with dolphin/KIO

I’m halfway through my Cosfest X.1 event post, but I bumped into yet another funny issue while working today, so I’m gonna do another quick solve-it post here. If you ever had the following error message shown to you when attempting to access an sftp location via dolphin or KIO in general:

“The host key for this server was not found, but another type of key exists. An attacker might change the default server key to confuse your client into thinking the key does not exist. Please contact your system administrator.”

This might be for you. In particular if you have successfully ssh-ed into the target host before. Following the discussion here, it appears that the problem, in summary, is KIO not being able to recognize a particular (new?) format of specifying a host in the ssh known_hosts list (a bug which has been filed here). Fortunately there is a workaround – since KIO is unable to recognize the known_hosts entry that ssh produces, we simply need to get KIO to be the one to produce the entry.

Back up your ~/.ssh/known_hosts file, then open it with your favorite text editor. Find and remove the entries associated with the host you’re trying to sftp into. If you cannot find it you can just delete everything in the file – with the side effect that you will be prompted again to add the keys back the next time you ssh into a previously known location. When you’re done, open dolphin and attempt to sftp into your desired target location. It should prompt you to add the host’s key – just tell it yes and you should be able to log in successfully.

That’s it! From then on you should be able to direct ssh or sftp-via-KIO into the location whenever you want.

Rate this post
An error occurred!

Smplayer UI hanging after update in OpenSUSE?

Just gonna pen a quick note. Smplayer, the pretty great Qt-based frontend for mplayer that I use, started behaving strangely after I performed a recent software update. Symptoms are – video plays, but does not respond to common keyboard commands like ‘f’ to full-screen and arrow keys to skip. Also, the GUI becomes unresponsive – you can’t click anything. I didn’t spend too much time looking up the source of the problem, but it may be related to this.

I’ve discovered you can workaround this annoying problem by installing mplayer2 and then configuring smplayer to use that instead of mplayer. Simply install mplayer2 via yast or via

sudo zypper install mplayer2

Then start smplayer (without arguments! If you load it with a video the UI will freeze!) and go to Options > Preferences > General > General and key in “mplayer2” for the field “Mplayer executable:

While there are some differences between mplayer2 and mplayer, everything appears to work fine using it with smplayer so far, so I’m pretty happy.

Rate this post
An error occurred!

The nightmarish “Linux won’t boot, Not even the LiveCD”

Had the hands-down biggest computer scare today since switching to Linux several years ago. I remember boasting to my friend just weeks ago that Linux has never gone down randomly on me all these years, whereas random (and terrifying) system failures are something I wrestle with regularly during my old windows days. Of course I don’t mean Linux has never screwed up period don’t be daft – any self-respecting Linux geek must have wrecked their setup in one way or another before, but that’s different. That’s you, the geek, wrecking the box while feverishly working towards some geeky end or another. That’s not the same as random failures. That’s not the same as leaving the computer last night in a comfortable state and waking up today to find that the thing won’t boot. That’s never happened before with my Linuxbox.

Well, until this morning. 2 hours ago everything is fine. 2 hours later, hang during boot. And I haven’t done any kind of questionable hacking in days, and have no clue what might be wrong. Whats even more terrifying – I can’t even boot a live system – what?? Scared me shitless. I then tried booting into Windows (I dual-boot), and it apparently detected problems with the disk and automatically started a disk check. That’s even scarier, if the problem is with the disk my data could be screwed! My laptop isn’t even a year old too. It finished successfully though, apparently fixing records here and there, and then Windows booted okay. I tried Linux again – no go. Live Linux – no go. I tried doing failsafe boots and did some haphazard googling to no avail. Fast running out of ideas, I decided to boot back into Windows and try and look up whether or not Gparted (my most trusted partition utility) would run on Windows. Well, apparently not, you need to make a live image of it.


And then!

I dejectedly restarted my computer….. and Linux booted. Just like that. I’m currently typing on the revived system, which is working, by all appearances, perfectly normally.

What have I learned from the episode? Nothing. Well, nearly nothing. I have next to no idea what went wrong, but next time my Linux and Live system won’t boot, I’ll just reboot windows multiple times then try again. I’m not even gonna put this post in the ‘howtos’ category, but I’ll leave this here and see if it might help the next guy to desperately google “Linux won’t boot, Not even the LiveCD”.

My speculation? Well, the only clue was that Window’s chkdsk fired and fixed some things, so presumable the NTFS partition got a little corrupted. Maybe Linux hung on trying to mount the corrupted partition. Maybe it takes two reboots into Windows before all the chkdsk fixes go in effect. Yes, I’m just gonna conveniently blame Windows and NTFS.

Rate this post
An error occurred!

Custom Textures for the Kwin Snow Plugin – the Hacky way

Now I am and have always been a fan of the compiz snow plugin. I remember spending some of the earliest days of my Linux life haphazardly getting bombastic desktop effects running and joyfully ignoring how many of the plugins were in the “Bad” list. Those were the days. I sit on KDE’s elegant Plasma nowadays and although Kwin also sports a (not so “Bad”) snow plugin, it has never quite lived up to the compiz version that I knew and loved. Over the years it has matured and stabilized quite a bit, but the key feature that’s still missing for me is being able to swap snow out for autumn leaves and sakura petals – custom textures.

Not entirely sure why, but the other day it just suddenly hit me that hey, it shouldn’t be that hard. There’s a texture stored somewhere that Kwin uses – I just need to find and replace it right? Turns out that was precisely right. The snowflake texture used by the plugin is


So how do we use a custom one? Find a png image to use as custom texture, and simply rename it “snowflake.png” and copy it into /usr/share/kde4/apps/kwin/! Do backup the old one first though just in case. After you’ve done that, disable the plugin, click apply, reenable it, click apply, and when you toggle the snow it should descend with your custom texture.

Here’s a screenshot where I use this leaf to create lazily descending autumn foliage:


Next step would be to find time and see if I could write a patch to make a non-hacky way to do this :)

Rate this post
An error occurred!

Ubunchu 07 ~ Installfest!

Tada! Ubunchu as it turns out is still alive and kicking! Albeit in the same somewhat constipated way my own blog ekes its existence. It looks from the mailing list like the terrible beast called real life has also been wreaking havoc and slowing things down over there, and so in the long time that I had been too busy to check back, only one new chapter has been released. And it’s chapter 7 instead of 6 too! Apparently the author wanted to put some extra touches on 6, and so released 7, which was ready, first. Grab it here if you haven’t.

Nom nom nom

Anyway in this chapter our awkward trio of Sysadmin club members decided to hold an installfest, which as the name suggests is essentially an event where people get together to help each other (in particular new adopters) with setting up their Linux boxes.

Read More

Rate this post
An error occurred!

Page 2 of 5

Powered by WordPress & Theme by Anders Norén