Between Linux and Anime

Kind of like Schrodinger's Cat

Tag: Tech (Page 2 of 8)

Applying Kwin Blur to Transparent Konsole/Yakuake Windows

If you use Konsole or Yakuake with transparency you might have noticed that Kwin’s blur effect, that has been around for awhile and that blurs the background of various transparent elements in the UI (eg panels and plasma popups), does not apply to transparent Konsole or Yakuake windows. This has always irked me a tiny bit, but when I discovered that you can blur transparent terminal windows on OSX, that got me itchy enough to do the token research.

The story is a familiar one: it’s not too hard just to GET WORKING, and patches to do it exist, however getting it to work in a sensible way is non-trivial, and so the patches are rejected and the feature itself is pending future structural changes. Basically, it’s not going to happen on it’s own anytime soon.

Fortunately, there are ways to get it working on your own – and they do not involve applying custom patches and rebuilding anything. Turns out there is a terminal command one can run to immediately apply blur on, for example, current active Konsole windows:

xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id `qdbus org.kde.konsole /konsole/MainWindow_1 winId`

And for a currently active Yakuake:

xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -name Yakuake

Now to do this automatically so that your yakuake and konsole windows are ALWAYS blurred, you can simply add the following lines to your ~/.bashrc:

Spoilered: Old, not so good code Show

Edit: commenters have posted improved versions of the code, thanks commenters! See improved version below:

Spoilered: Code for non-KF5 and old yakuake Show

Edit2: KF5 Konsole and Yakuake 3 onwards requires updated code, as well as xdotool to be installed so we can fetch yakuake’s win id:

konsolex=$(qdbus | grep konsole | cut -f 2 -d\ )
if [ -n "$konsolex" ]; then
for konsole in `xdotool search --class konsole`; do
xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $konsole;
done
fi
if [ `qdbus | grep yakuake` ]; then
xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id `xdotool search --class yakuake`;
fi

Of course, this often results in the command being run redundantly, but that doesn’t appear to bring any tangible ill-effects. It all works well enough for a quick hackaround. And the results are delicious indeed.


1316
Rate this post
Thanks!
An error occurred!

Hana no Android Gakuen Specials 3 and 4 English Translated

And these are it: the last of the Android Gakuen manga strips freely available online. I originally planned to close the curtains on this whole translation endeavor with the release of these last strips, but it turns out that a friendly neighbourhood reader Elaine Nguygen has volunteered to send me the raw strips in the first Android Gakuen manga volume, and so I now plan to work on those too, which means more Android Gakuen translated strips to come! Of course, those may not stay up as the raws aren’t freely available, so I may have to take them down if the authors/copyright holders complain, but at least for now the plan is to go on with that for as long as I am able.

While I’m at it I’d also like to apologize a little to anyone who may be actively following my translations for being so incredibly slow at the whole thing. Unfortunately this isn’t something I am able to fix, since necessarily this pet project must take lower priority to a lot of the other stuff I’m responsible to. These strips really should have been out two or so weeks ago, but stuff came up and I ended up swamped for quite a while and only managed to put everything together now.

Anyway, I’ll continue to do my best. If I can’t work fast I’ll at least try to ensure my translated strips are as high quality as my inexperienced self can make them :) In the meantime, enjoy Specials 3 and 4! Shoutout to JX for his help with the translation.

Look for translations of previous chapters in the category archives.

Hit the jump for the translated strip. Like all Japanese manga, this should be read right to left, top to bottom.

Read More

1312
Rate this post
Thanks!
An error occurred!

Getting the Maliit/Plasma Active Virtual Keyboard working for Gtk apps in PA3

I’ve had more frustration than I’m comfortable admitting to trying to get this to work – I actually gave up and compiled kvkbd at one point. Now that I have it down though it all looks infuriatingly obvious in hindsight. Anyway..

The problem: if you have the official Plasma Active 3 image installed and running on some device, and at some point or another installed/ran a gtk app on your system, you’ll quickly realize that the Maliit-based virtual keyboard does not trigger in your gtk app. That’s contrary to what was promised from the Maliit move! And in fact Maliit predates Plasma Active and should have perfect gtk support, so what gives? It turns out that Plasma Active only includes the Maliit input context plugin for Qt and not for gtk, and that’s basically the problem. (Presumably they decided to save it since the image does not include anything gtk)

The solution: You basically need to install that gtk input context plugin. What I did was I took the package from the recommended repos for openSUSE linked from the Maliit website (specifically this repo). The commands to run (as root!) are:

# zypper ar http://download.opensuse.org/repositories/M17N:/Maliit/openSUSE_Factory/ maliitosfact
# zypper refresh
# zypper in maliit-inputcontext-gtk2

And then update the gtk immodules before rebooting:

# gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules

Note: Zypper will complain about different maliit versions and prompt you to fix by pulling and replacing packages from the openSUSE repo – DON’T DO IT! Just tell it to break maliit-inputcontext-gtk2 by ignoring some dependencies so you install only one package!

You might also want to disable the openSUSE maliit repo after you’re done so you don’t inadvertently pull stuff from it in future:

zypper mr -d maliitosfact

I’m not 100% sure pulling and replacing those packages will actually cause bad things to happen, but I’ve learnt by being bitten – painfully – multiple times not to risk these things if at all possible :) Anyway, the plugin in fact does work perfectly with the Maliit stuff from Plasma Active despite the zypper warnings:

Plasma Active Maliit Keyboard working on an old Fennec build

Of course, this all only works assuming you’re on an i586/x86 device. It’ll probably be harder to find binary packages for the input plugin on arm for example, but this should hopefully at least point you in the right direction. Perhaps you could just build it from source or something.

I know it’s probably already near the end of PA3’s lifecycle now, but hopefully this will still help some frustrated soul out :)

1310
Rate this post
Thanks!
An error occurred!

Hana no Android Gakuen Special 2 English Translated

It’s been a really long time I know. Unsurprisingly, I got busy, and the knowledge that Android Gakuen will no longer be available as online strips was basically fatal to my motivation for a long time. For those who are not aware: after 13 initial strips plus 4 ‘Specials’ that were made available at the Weekly Ascii website, the rest of Android Gakuen is basically print-only, which means that I can no longer translate and make them available here unless someone could provide scans.

I still however do get a lot of hits from people seeking Android Gakuen translated strips, so I’ve decided that I should at least finish translating everything that is available. So I went to work again, and here’s Special number 2! I’ll try to get Specials 3 and 4 done within the next month, and with that finally bring some deserved closure to this whole endeavor :)

Look for translations of previous chapters in the category archives.

Hit the jump for the translated strip. Like all Japanese manga, this should be read right to left, top to bottom.

Read More

1308
Rate this post
Thanks!
An error occurred!

Allowing res.nimg.jp to store information locally on NicoNico


It’s a dumb little problem: opening a video on NicoNico has a flash setting dialog pop up asking

res.nimg.jp is requesting permission to store information on your computer.

Requested up to 1MB
Currently used: 83 KB

With “Allow” and “Deny” buttons – neither of which are clickable!. And so this dialog sits in the middle of the video widget refusing to be dismissed and cockblocks the crap out of all your video watching efforts.

Reinstalling Flash as suggested somewhere didn’t help. In the end, I discovered a dumb little workaround: load the video on nicoviewer instead. That is, if your video url was http://www.nicovideo.jp/watch/sm12345678 then the nicoviewer url would be http://www.nicoviewer.net/sm12345678. The same dialog should show up on the player there, but this time the buttons are clickable! So I clicked allow, Flash remembers the setting, and videos on NicoNico stopped showing the dialog from then on.

I later also read that an alternative method is to go here where you should be able to see your Flash player settings. Just scroll through the list of sites and look for res.nimg.jp and then adjust the slider up to ‘1mb’, and that should apparently fix it.

1292
Rate this post
Thanks!
An error occurred!

Playing Multiple Subtitles Simultaneously with Mplayer

Well, with any player that plays ass subs really, but the procedure requires Mplayer :)

(I know I haven’t written a real post in a good while and this doesn’t quite count. I’ll post soon! I hope.. at least, I’m positively definitely trying to really write a proper post and push it out as soon as I’m positively capable of doing. No really!)

So I found myself needing to have both english and chinese subtitles on at once today and struggled with it briefly. I eventually found the solution in the form of a script called merge2ass (Source). What it does is it takes two different subtitle files and smushes it into a single ass file that basically shows the first subtitle file at the top of the screen and the second subtitle file at the bottom, something like this:

Yuki is sad all this is harder than she wanted

Usage of the script is simple enough. Make it executable, then supply the video file, the first subtitle file, then the second. You can also just run the script without arguments and it’ll show a nice help message.

chmod +x merge2ass.sh
./merge2ass.sh yourmoviefile.format sub1.srt sub2.srt

This will produce a file called yourmovilefile-bilingual.ass that you could then load with mplayer (or whatever other player you want) to get simultaneous dual subtitles.

Oh right, for this to work with chinese subtitles, you need to change line 125 and/or 128 of the script and supply -subcp enca:zh:BIG5 as an mplayer option, as per this post. Just add it immediately after ‘mplayer’, like so:

mplayer -subcp enca:zh:BIG5 -dumpsrtsub -noautosub -really-quiet -frames 0 -sub "${sub[1]}" "$movie" 2>>"$mplayer_err" && echo "Done"

1287
Rate this post
Thanks!
An error occurred!

Hana no Android Gakuen 13 + Special 1 English Translated!

Edit: okay, there apparently is a series of ‘Special’ strips, and a series of ‘Summer Special’ strips. This is from the former. To the best of my knowledge, the ‘Summer Special’ strips are not available online beyond some teaser material.

First, an update regarding the status of this manga right now. So far as far as “regular episodes” (the stuff I’ve been translating) goes, only one extra chapter (13) has been released. In the interim, a series of Summer Specials were also released (yes, over the summer. I am aware that it is almost winter now, but it really should be common wisdom by now that I’m an incurable slowpoke. Plus, where I live, it’s still summer, and forever will be). I have decided to just go ahead and translate the specials, so here’s the first one, alongside the strip branded as chapter/episode 13. Note that chapter/episode 13 was published at the end after all of the summer specials. I’ll post the rest of the summer specials once I’m done translating them.

Across November through early December, “vol” 1 through 4 of Hana no Android Gakuen have also apparently been released. If I’m reading the site right, the comics will be available in print in the Japanese “Weekly Ascii” magazines dated 13 Nov, 19 Nov, 27 Nov, and 4 Dec, and are, to the best of my knowledge, not available online (not counting the sneak preview strips the source site publishes), so it doesn’t look like I’ll be able to work on those unless someone could provide scans.

Next, an update on my translating efforts. Some time ago I decided (probably partly from discovering the happily surprising fact that I’m on Baka-Updates) to try an up the quality of my work, so alongside this release I’ve made two changes to the way I work here. Firstly, I’ve outsourced some translating work to my friend JX, so I now have someone with better moonrune training on board as well as an extra pair of eyes on the final result pre-publish. Secondly, I’ve decided to put a little more effort into my cleaning and typesetting, where I actually do try and clean texts not enclosed in speech bubbles instead of just slapping a semi-transparent white box over them. Perhaps most visibly, I have also switched to much more appropriate fonts, and man, it’s amazing how much just a change of font can do. See the results below for yourself! Hopefully these changes improve the reading experience :)

Look for translations of previous chapters in the category archives.

Hit the jump for the new stuff. Like all Japanese manga, this should be read right to left, top to bottom.

Read More

1263
Rate this post
Thanks!
An error occurred!

Anime and the Nepomuk Metadata Extractor

Here’s a long-procrastinated update on my endeavors re: Nepomuk and Anime, first introduced here. I mentioned then that the way forward would be to create a plugin-based framework so one could fetch anime metadata from different online sources. Well, as it turned out, I found out that Joerg’s Nepomuk Metadata Extractor can already do that, so I scurried over and grabbed the sources and did my subsequent work on top of Joerg’s program. The anime use-case is now in a fairly workable state. Basically, what the program does is it lets you manually or automatically source for meta information (series title, episode number, synopsis etc) from online sources for anime video files you have on your disk, and write all that to file as Nepomuk metadata.

Read More

1247
Rate this post
Thanks!
An error occurred!

Your Nokia N9 Mail Client Stopped Working?

Just a quick pen-down to give this more Google visibility. Here’s what you can try if your N9’s default email client stopped working.

Symptoms:

  • No new mail, ever
  • Telling it to sync/refresh takes forever, and nothing gets done
  • Emails don’t get sent out, takes forever and nothing happens
  • Removing and re-adding the mail account doesn’t help

Long story short, your QMF database (presumably the database used to store mail data) may be corrupted. Fortunately, fixing is easy:

  • delete the database – Use your terminal app to run this:
    rm -rf /home/user/.qmf
  • then reboot your phone.

The client will simply refetch your mails and rebuild the database, and the world is sunny again.

Source

1242
Rate this post
Thanks!
An error occurred!

Associating Firefox Profiles with KDE Activities

As a heavy user of the Activities feature, I’ve always had two major itches. One was addressed when KDE 4.9 finally brought the ability to set activity window rules. The other was how only some applications had the necessary (XSMP) compliance to work properly with activities and its session restoring – in particular, a lack of compliant web browsers.

Read More

1239
Rate this post
Thanks!
An error occurred!

Page 2 of 8

Powered by WordPress & Theme by Anders Norén