Posts

Showing posts from 2013

Fedora 19: Swap left and right pulseaudio channels

Why would anyone want to swap left and right pulseaudio channels? After some web searching I found that I am hardly alone. The classic problem is that your computer is on one side or the other, the audio-in cable goes to one speaker or the other, and the audio cable is too short. But this is linux, after all, so most things if not all things are possible, right? The first fix I came across was simple enough except sadly it didn't work. This called for editing /etc/pulse/deamon.conf and uncommenting the lines ; default-sample-channels = 2 ; default-channel-map = front-left,front-right to appear as default-sample-channels = 2 default-channel-map = front-right,front-left and then restarting pulseaudio with pulseaudio -k Seemed very clean and elegant except that it didn't work. :( The next answer from  here  and this worked great. The steps (reproduced here) are: cat /proc/asound/cards and use the name string for the device you wish to use (the one in squa

Fedora 18 --> 19 fedup upgrade woes - readonly filesystm and fstab file the culprit

As indicated now in the title of Redhat Bugzilla 969648 the problem is the "data=writeback" parameter in /etc/fstab. Fedup and Fedora 19 have a problem with this particular setting.  I have two fedora machines - a desktop and a laptop. During the last upgrade cycle, Fedora 17-->18, the desktop upgraded without any problem whatsoever. On the laptop, I had managed to shoot myself in the foot due to basically having some parts of my kernel boot commandline that were present in grub.cfg but not in /etc/default/grub. (These were the parts that blacklisted nouveau so that the nvidia binary driver could run). At the end of the fedup procedure I had run     grub2-mkconfig -o /boot/grub2/grub.cfg as instructed and this wiped out the parts of my command line that were needed to run the nvidia driver and due to that I had all sorts of problems figuring out the problem. Of course once the problem was diagnosed the fix was relatively easy. This time around, in going from 18--&

Dealing with "smart" quotes and other HTML annoyances when parsing HTML text using Python and BeautifulSoup

I've recently been writing some homegrown scripts to parse web pages and do something useful with the information using Python 2.7 and the BeautifulSoup library.  This involves printing the output to a terminal (e.g. Gnome Terminal) where the output is hopefully human readable but in some cases was not. The most common issue I ran into were various forms of "smart quotes" and similar html annoyances. If this is not properly handled you'll get output like John X s Blog (where X is the following 7 character group without the intervening spaces - hard to display it verbatim in the blogger environment!)  & # 8 2 1 7 ;  or even John X s Blog   (where X is some awkward block symbol that can't be adequately described or rendered here. This actually results from the MS quote being "decoded" as Latin-1 - so it's sort of a cascade of errors.) The first of these is known as an "HTML entity" and here is a list of them . 

Determining GPS coordinates from NEW Google Maps

Google recently rolled out a new version of their Google Maps web service. From what I can tell you can't retrieve a set of GPS coordinates from the new interface. I expect they will remedy that situation at some point.  But for now the workaround is to temporarily switch back to "Classic" Google maps and get the GPS coordinates from there. Here's what I did: Shift back to Classic maps (Gear in top right corner, choose Classic Maps, can say "Dismiss" to not make the switch permanent if desired). Right click on desired location and select "What's Here?" A green arrow will appear. Left Click on Green Arrow and  the  GPS   coordinates will appear in multiple locations.

Fedora 18 - yum constantly timing out - culprit seems to be fastestmirror plugin

Did a yum update with Fedora 18 and got nothing but timeouts and 404 not found errors.  yum clean metdata      and yum clean all      and (a reboot) were all of no help. However yum --disableplugin=fastestmirror update completely fixed the problem. Trying other mirror. http://mirror.nexcess.net/rpmfusion/nonfree/fedora/updates/18/x86_64/repodata/8b5178f2b98050e518752afe8fbe527c4d7a53bde138a7f3ce276766ec71869e-comps.xml.gz: [Errno 12] Timeout on http://mirror.nexcess.net/rpmfusion/nonfree/fedora/updates/18/x86_64/repodata/8b5178f2b98050e518752afe8fbe527c4d7a53bde138a7f3ce276766ec71869e-comps.xml.gz: (28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds') Trying other mirror. http://mirror.liberty.edu/pub/rpmfusion/nonfree/fedora/updates/18/x86_64/repodata/8b5178f2b98050e518752afe8fbe527c4d7a53bde138a7f3ce276766ec71869e-comps.xml.gz: [Errno 12] Timeout on http://mirror.liberty.edu/pub/rpmfusion/nonfree/fedora/updates/18/x86_64/re

Exchange Email Server Interoperability Woes

Mine is a use case that is got to be exceedingly rare - maybe 0.001% of users or something like that. Still it's interesting to me, well, because it's my use case and perhaps it may have some general interest for users with less convoluted use case. The setup - an corporate email Exchange server using IMAP. A linux Thunderbird email client that is used as the email client of first resort. I also run Lightning on Thunderbird to get basic calendering functionality. Occasionally use the Outlook Web client - whatever they are calling that these days. Microsoft Outlook 2010 running inside of a virtual machine that can be accessed from linux. I use Outlook not as my primary email client but as a sort of secondary client because I can create Server based rules or filters to route certain emails to certain folders. Thunderbird filters are client based only. The Rules engine on Outlook seems more powerful to me over and above just the fact that the rules can be server based

Virtualbox, Guest Additions and Screen Resolution

This is sort of a well known trick but I'll post it anyway.  The problem is you install Virtualbox (My Host: Fedora 18 x86_64, My Guest: Windows 7) and the guest screen resolution is somewhat limited. Maybe it's 1024x768 or something like that and you can't get the full screen capabilities of your host device. The solution - install Guest Additions on your guest OS (Menu | Devices | Install Guest Additions ..) and then auto resize guest display (Menu | View | Auto Resize Guest Display). Now everytime you resize the window in the host the video driver in the guest will "see" a different monitor it can display on and adjust its options accordingly. You can see this in action by right-clicking on the guest OS and selecting "Screen Resolution" and then watching the choices change as you resize the Vbox window on the host. http://www.virtualbox.org/manual/ch01.html#intro-resize-window

Firefox: pluginreg.dat - What Dat?

The mise en scène: Oracle discovers a security issue with Java 1.7.0_07.  Oracle patches same and releases Java 1.7.0_10.  Firefox blacklists 1.7.0_07.  Java apps that used to work now don't.   OK so far so good. So we upgrade to latest Java on computer A (Fedora 17 x86_64) and now things "just work". And "about:plugins" lists the new plugin as 1.7.0_10 as does  https://www.mozilla.org/en-US/plugincheck/ .  So far so good. Now update computer B (again Fedora 17 x86_64) and while the upgrade seems to take, java apps are not working, "about:plugins" lists the plugin as 1.7.0_07 as does  https://www.mozilla.org/en-US/plugincheck/ .  Even more strange - on computer B - go to about:config and set plugin.expose_full_path to TRUE and (I wish I had a screenshot of this but trust me it happened) the plugin is listed as 1.7.0_07 at the same time as the path is listed as /usr/java/jdk1.7.0_10/jre/lib/amd64/libnpjp2.so . Clearly something