Between Linux and Anime

Kind of like Schrodinger's Cat

Category: Howto’s (Page 3 of 4)

Connecting to Hidden Wireless Networks using KDE’s Networkmanager

It is not without some surprise and.. disappointment.. that I discovered that KDE’s networkmanager frontend appears to be still having trouble with hidden wireless networks. It used to be so when we used KNetworkManager, and now that we’ve moved on to the shiny new plasmoid, the problem… stayed. Oh well, the common advice that hidden SSID’s are not useful and that one should be setting up WPA encryption for true security is likely sound, but for folks like me who happen live under already-configured hidden networks, we’ll need to use a workaround for now.

To allow the networkmanagement plasmoid to detect and connect to a hidden wireless network called, say, “hiddennetwork”, open a terminal and type the following command:

sudo iwlist wlan0 scanning essid hiddennetwork

Note that you need to replace wlan0 with your wireless interface. This is usually either wlan0 or eth1. You can use the iwconfig command to find out what your wireless interface is called. Of course, also replace “hiddennetwork” with your desired hidden network.

If all goes well, your hidden network should now appear in the networkmanagement plasmoid, and you should now be able to connect to it like any other network.

1036
Rate this post
Thanks!
An error occurred!

Fixing Funny Image Colors in Firefox on OpenSUSE 11.3

Actually I don’t know if this affects other Linux systems or even other operating systems, apparently it has something to do with the way newer Firefoxes handle colors. Anyway, what happens is that Firefox renders some images properly, but renders some others with incorrect colors. This behaviour can be fixed by changing some of Firefox’s config values. Instructions as follows:

  1. Get into the config interface by opening a tab in Firefox and keying in “about:config” into the address bar. Read the warning and continue.
  2. Look for gfx.color_management.mode and set its value to 0, and then look for gfx.color_management.rendering_intent and set its value to -1.
  3. Restart Firefox

Source.

1004
Rate this post
Thanks!
An error occurred!

Dealing with Broadcom Wireless and ATI Radeon Mobility HD Cards on OpenSUSE 11.3

And Linux has now officially taken over my new laptop :) I decided to try out installing the OpenSUSE-based KDE Four Live image (downloadable here), and it looks great so far! More importantly, I bought this laptop (HP G42 or something) well-knowing that it didn’t have Linux-friendly hardware. Well, it was relatively cheap and had great CPU and graphical specs (damn you Starcraft 2), plus the chaps manning the store were really nice.. Anyway, so I rolled my sleeves and set out to set myself up a Linux installation today expecting to spend some gruelling hours wrestling the inevitable issues – and was pleasantly surprised to have now apparently resolved everything quite cleanly and painlessly. Awesome :) And with that, I’m gonna pen me some trusty ol howto posts – the first ones in quite awhile I believe.

Read More

999
Rate this post
Thanks!
An error occurred!

Allowing PHP/httpd to use sendmail on Fedora

I had to Google hard for this – twice, because I was too busy to blog this when I solved it the first time. Anyway, people not accustomed to sysadmin-ing on Fedora will find themselves quickly acquainted with this rather unfriendly beast called SELinux, which firmly prevents you from doing a bunch of stuff – sometimes quietly.

Anyway, it turns out that although sendmail is installed and working on Fedora by default, SELinux will by default prevent httpd (and thus your PHP scripts) from using it to send email. To fix this, simply tell SELinux to don’t do that, like so:

$ restorecon /usr/sbin/sendmail.sendmail
$ setsebool -P httpd_can_sendmail 1

Or, if you prefer, look for the httpd_can_sendmail boolean in the SELinux configuration GUI and tick it off. Restart httpd after that:

/etc/init.d/httpd restart

Source

929
Rate this post
Thanks!
An error occurred!

Mounting LVM on an Ubuntu Live System

For those of you folks out there who, like me, carry around an Ubuntu-based live CD/USB as a friendly and handy system recovery companion, you might be surprised and shocked (as I was) to discover that LVM partitions that some Fedora systems are apparently installed on are unsupported by stock Ubuntu live systems. Ie – you cannot mount these partitions or do anything with them except delete/format them.

Fortunately it turns out that there is a quick remedy – install that support. Make sure that you have internet access, then simply do:

sudo apt-get install lvm2

You should now be able to mount and read the partition.

921
Rate this post
Thanks!
An error occurred!

Playing (Simplified) Chinese SRT Subtitles in Mplayer

Was a little disappointed that chinese subtitles don’t work out-the-box on mplayer. Well, ass ones seem to work fine, but srt ones don’t work at all and I had to Google it. Anyway, assuming you already have fonts that can display chinese characters, you can get mplayer to play chinese subs by giving it the parameter -subcp cp936.

mplayer -subcp cp936 your.moviefile

Edit: -subcp enca:zh:BIG5 also works, and seems to work better in some cases:

mplayer -subcp enca:zh:BIG5 your.moviefile

(thanks to Kees in the comments)

You can also use the -font option to manually specify a font that mplayer should use. Source.

868
Rate this post
Thanks!
An error occurred!

Setting the “Primary” Screen where your Panels go on Linux Multi-Monitor Setups

If you have a multi-monitor set-up and are wondering if it’s possible to control which screen is “primary” – where all your panels will end up in – yes, it is. That is, assuming your desktop environment asks X to decide which screen is “primary”. KDE Plasma does, and Gnome probably does too. As long as X is involved in the decision, it’s possible to use Xrandr to tell X which screen you want to be “primary”, by using the “–primary” option. For example, if I want my laptop LVDS screen to be my primary screen and get all my desktop panels, I’d run:

xrandr --output LVDS --primary

That was easy :) On a related note, some changes are forthcoming in KDE SC 4.5 in the way multi-monitor setups work. Take a look here for some details.

858
Rate this post
Thanks!
An error occurred!

Xserver refusing to start during boot on OpenSUSE?

If you’re on OpenSUSE and your X server refuses to start on boot, and stays blank on manual startx, spitting out errors that look like this:

symbol lookup error: /usr/lib64/libXi.so.6: undefined symbol: XESetWireToEventCookie

You’ve probably been a bad boy/girl and have been playing with non-standard Xorg drivers and repositories haven’t you :P Here’s what you can try on the terminal (since that’s all you’d have if X refuses to start): Symlink libXi.so.6 to libXi.so.6.0.0 instead of libXi.so.6.1.0 in /usr/lib, or /usr/lib64 on 64 bit systems.

# cd /usr/lib
# rm libXi.so.6
# ln -s libXi.so.6.0.0 libXi.so.6

That should hopefully let you startx, where you should probably proceed to remove the libXi package from Yast – as well as every other non-standard package you installed :) Source here.

Btw, yes this happened to me, and I was frantic. I’m reasonably comfortable on the console but as long as my DE wouldn’t start neither would my networkmanager, which means I had no internet – and which means my package manager commands were useless! Playing with Xorg drivers bit me hard that time. Srs bsns, it is. As someone wisely said in the source thread, “For the next time: adding experimental repos brings you in a world where you’re on your own, and where things like you’ve met now, easily happen.

851
Rate this post
Thanks!
An error occurred!

Playing “V_MS/VFW/FOURCC”, “FLV4 / 0x34564C46” mkv files on Linux

Welcome to yet another episode of “Refusing to Just Use Windows (TM)” !

Yes that’s right. Despite the general ease with which most mkv’s play on Linux systems, I discovered a couple of mkv’s just the other day that simply wouldn’t – not on VLC, mplayer, ffplay, kaffeine – nothing. Even with every last available codec pack (and their grannies) installed. Well, the audio plays well enough – but I get no video. Blank. Zip. On the other hand I was told that the files play on a properly set up Windows machine. So what else is new :)

Of course, the thing about mkv’s is that it’s a wrapper format – different mkv’s can hold video/audio/subtitles that require vastly different codecs, so being able to play one mkv doesn’t guarantee that you’ll be able play the next. This case is a classic example of that little principle. So next step would be to find out what is the internal video format being used. Some probing with ffmpeg and mplayer on the command line reveals that the video’s codec id is “V_MS/VFW/FOURCC“, and is actually an flv4, which should be decodable on Linux. However playing the file results in one form of complaint or another in the way of “V_MS/VFW/FOURCC” not being recognized as a codec. The result: No video – only the audio track plays.

To cut a long story short, after clamping my teeth down on it and doing my requisite googling (yes, Refusing to Just Use Windows), I put the clues together and managed to find a not-too-difficult way to the bottom of the issue. The idea is to manually specify/force the video decoder to use, since the players are incapable of automatically finding the right one. None of my players appear to allow me to do this though, so I used ffmpeg to decode and reencode it into a nicer format instead:

ffmpeg -vcodec vp6f -i inputFile.mkv -b 20000k output.avi

The -vcodec vp6f part is the important bit here of course. This should decode that pesky mkv and spit out a much friendlier avi file that should easily play on mplayer, vlc or the like.

If your mkv has subtitles, you’ll need to do some extra stuff, since ffmpeg to the best of my knowledge does not play nice with subs. The above step should get you an avi with video and audio. To also add subs, you first need to extract them from the mkv. One way to do this is using mkvextract, which you should be able to install in your system by installing the “mkvtoolnix” package. mkvextract lets you extract a track from your mkv. The subtitle track is usually track 3, so you’d do something like:

mkvextract tracks file.mkv 3:output.subs

You can check which track your subtitles are on by doing ffprobe file.mkv. Once you have the subs extracted, you can simply direct your player to the extracted subtitles file and it should display. If you name your subtitles file after your avi file, some players would even automatically load it. All I needed to do was:

mplayer output.avi -ass

Of course, if you feel like it, you can also burn the subtitles into the video file itself. You can use mencoder for that, or you can use avidemux following instructions here

Hope that helps someone ;)

822
Rate this post
Thanks!
An error occurred!

Boosting Audio with Mplayer

So last night I got pwned by zw as he demonstrated before mine disbelieving eyes this interesting feature he called audio boosting on his machine’s Windows Media Player classic. We were trying to watch this video with an unspeakably soft audio track, and after not being able to hear nuts when I played it on my Linuxbox + shoddy speakers, he smugly plugged the thing through his laptop’s Windows Media Player classic and turned on software audio amplification – and we did indeed get significantly more audible audio. Despite having (immense) issues with Media Player Classic’s UI/UX, I had to concede that that was an immensely handy feature. And so it was Windows 1:0 Linux that night.

But of course, while I do agree that Windows does certain things better than Linux, getting soundly beaten by the likes of Windows Media Player *Classic* is bound not to sit well with this user :P So having been enlightened to the existence of such a feature, I set off today to find out if it exists on Linux players. And it fortunately turns out that the answer is yes! On mplayer, all one needs to do is to add an extra argument. For example,

mplayer -af volume=20:0 mediafile

Would amplify the sound by 20dB. 20dB makes a HUGE difference by the way, so you might want to turn down your speakers/take off your headphones before you try it, in case you inadvertantly deafen yourself. So there you have it. Oh, apparently VLC has support for it too, but that’s beyond the scope of this post for now :)

Source

755
Rate this post
Thanks!
An error occurred!

Page 3 of 4

Powered by WordPress & Theme by Anders Norén