Fight for the Internet 1!

Saturday, December 1, 2012

Kubuntu Hidden Wireless Network

Problem
There seems to be general issue with KDE's Network Manager and hidden wireless networks. [You can see (and vote for!) the bug here: https://bugs.kde.org/show_bug.cgi?id=209464.] You are trying to connect to a hidden network, and you create a profile for the specific wireless network in the KDE Network Manager. But for some reason you still can't connect.

I have encountered this problem for a while (Kubuntu 9.10, 10.04, 10.10, 11.04, 11.10, 12.04, and 12.10], but I finally found a solution today. A quick look tells me this bug has been around existed at least for 2 years. Pity they haven't fixed it.

Solution
Quick solution is to run this from command line:
sudo iwconfig wlan0 essid name_of_the_hidden_essid
This works even better if you have used KDE Network Manager to create a wireless profile with this hidden network's name already. You can setup password and such. This command only invokes connection to it, which is the real bug in the manager. It will read the profile you have previously stored.

Other solutions are to use a different network Manager, such as the network manager from Gnome/Ubuntu.

An even easier solution would be to just start broadcasting the SSID.

Tuesday, November 6, 2012

Disable Firefox Save Images to Changing Directories

Overview
Here is how to disable a feature in Firefox that can be really annoying if it doesn't work properly. [For me it only worked correctly 1/6th of the time, resulting in more work overall.]

Problem
The feature: Save Location Assistance/Guessing - Some time ago Firefox added a feature where it would try to guess which you wanted to save the current image/file to on your harddrive. It jumps to a previous location where you saved something that it thinks is similar, in the hopes of saving you the time for navigation your folder structure to save it.

The algorithm Mozilla uses unfortunately doesn't work much of the time. (I have to admit I think whatever implementation they used it is fairly dumb, meaning very ineffective.)

Solution
Here is how to disable this well meaning but ultimately inefficient and annoying (and somewhat destructive) feature behavior.

1). Open the about:config page. To open the about:config page, type about:config in the location (address) bar and press the "Enter" key, just like you type the url of a website to open a website.
If you see a warning then you can confirm that you want to access the about:config page.

2) Create a new value, of type Boolean, via the right-clicking with mouse to bring up the right-click menu. The name for the new Boolean value should be  "browser.download.lastDir.savePerSite" (without the quotes).

3) Set the value to "false" (again without the quotes). You can do this by right clicking on the item you just created.

Some extra info on navigating the about:config page:
  • Use the Search (Filter) bar at the top of the about:config page to locate preferences more easily.
  • Preferences that have been modified show as bold (user set).
  • Preferences can be reset to the default via the right-click mouse menu if they are user set
  • Preferences can be changed via the right-click context menu: Modify (String or Integer) or Toggle (Boolean) or by double-clicking the line with the pref

Monday, September 17, 2012

LibreOffice 3.6 from PPA problems

Background of the Problem

This happened in my Kubuntu/Ubuntu 12.04 Precise. Up until a few weeks ago, my copy of LibreOffice version 3.6 from the PPA was working great. [It was faster, more stable, more bug fixes and even some new much needed features.]

But then suddenly it just stopped working. I still don't know why this happened exactly, though I have finally been able to track the cause to the probable package that triggered the whole meltdown.

When I tried running LibreOffice through the apps menu, nothing happened. So I ran the command 'libreoffice' from console, and got the error message:
/usr/lib/libreoffice/program/oosplash: not found
I wasn't sure what this problem was. I thought maybe some dependency had gone bad.

Unsuccessful Things I Tried

(1) I found I did not have a Java JRE installed, so I installed default-jre. But this didn't help.

(2) Try to reinstall LibreOffice, but APT tells me it cannot reinstall the libreoffice package back of broken packages. So manually remove extra libreoffice components.
apt-get remove --purge libreoffice-core libreoffice-writer libreoffice-calc libreoffice-impress libreoffice-draw libreoffice-math libreoffice-base
First try ininstalling LibreOffice, but cannot. APT eventually tells me:
The following packages have unmet dependencies:
  libreoffice : Depends: libreoffice-core (= 1:3.5.4-0ubuntu1.1) but it is not going to be installed
    Depends: libreoffice-writer but it is not going to be installed
    Depends: libreoffice-calc but it is not going to be installed
    Depends: libreoffice-impress but it is not going to be installed
    Depends: libreoffice-draw but it is not going to be installed
    Depends: libreoffice-math but it is not going to be installed
    Depends: libreoffice-base but it is not going to be installed
    Recommends: libreoffice-gnome but it is not going to be installed or
    libreoffice-kde but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
(3) I had been using this PPA: http://ppa.launchpad.net/libreoffice/ppa/ubuntu/

Tried using the program ppa-purge; even let it remove 100 separate packages at one point in order to "undo" the integration from this PPA that was probably causing problems on my system. But it did nothing to fix the problem!

(4) Tried manually editing the file /var/lib/dpkg/status, to check for a false positive on the program but nothing weird was installed or remaining! [Though I could not find anywhere it

Successful Fix (Part 1)

Here is what I did that finally fixed the dependency problem. While manually trying to install libreoffice-core, I noticed the error message said:
libreoffice-core : Depends: libexttextcat0 (>= 2.2-8) but it is not going to be installed
I checked out libexttextcat0 and it said:
libexttextcat0 : Depends: libexttextcat-data (= 3.2.0-1ubuntu1) but 3.3.1-2~precise1 is to be installed
Finally I used 'apt-cache policy' to look at libexttextcat-data and it said:
libexttextcat-data:
  Installed: 3.3.1-2~precise1
  Candidate: 3.3.1-2~precise1
  Version table:
 *** 3.3.1-2~precise1 0
        100 /var/lib/dpkg/status
     3.2.0-1ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
This library had installed a later version (3.3.1-2) from somewhere that was no longer in my apt-repositories and apt couldn't figure this out (as being a serious problem for fixing via downgrade).

So I removed both libexttextcat-data and libexttextcat0 and then tried to install LibreOffice. Suddenly everything was ready to work again! But then came part 1.5.

Successful Fix (Part 1.5) The System is Unclean

At this point, I tried installing version LibreOffice 3.6 again from the PPA. This actually worked and installed just fine and it ran just fine. However I was a little worried about leftover crud from the prior botched installs.

After successfully installing LibreOffice 3.6, I purge uninstalled it and all its associated programs. Then I ran a check on the system, and sure enough found a bunch of left-over crud that hadn't been removed.

Successful Fix (Part 2)

So now I was left with a lot of crud left over from the previous botched installation of LibreOffice 3.6 which would simply not be uninstalled because the system (APT/DPKG) thought it wasn't installed.

This was going to require manual clean up, but thankfully it's not a very difficult task in Linux. I had to manually run a search-and-delete every single copy of anything related to LibreOffice on my system. After every trace of libreoffice named files were gone from my system, I was ready to install libreoffice for the final time.

However now if I tried to installed LibreOffice 3.6 from the PPA, the package maintainer (APT) behaved strangely. It acted like it installed the programs but actually did NOT install them. Nothing happened. So I used the command:
ppa-purge ppa:libreoffice/ppa
And removed the LibreOffice 3.6 PPA version and repository, and downgraded the program to version 3.5, installing from the official Ubuntu repositories and everything worked.

Word to the Wise: If you are installing a package and it asked you about installing a Configuration file, and you need to choose to keep your old file or install the Package-Maintainer's version, ALWAYS install the package maintainer's version, unless you have a really good reason not to.

Tuesday, September 11, 2012

Pidgin 2.10.6 libc-2.15.so Segfault Workaround

Pidgin Segfault Workaround

Today when I turned on my computer, Pidgin would not start. I normally prefer writing a more complete blog post, and I wish I had more to tell viewers but all I know is a (complex?) workaround that worked for me.

Pidgin won’t start. So I run it through command line. Get the message “Segfault”. Run it with the --debug switch. Get more info, but nothing conclusive. Check logs, find kernel describing a library problem with libc.

[   57.444660] pidgin[2211]: segfault at 0 ip 00007fc78073966a sp 00007fffee194710 error 4 in libc-2.15.so[7fc7806af000+1b3000]

Okay, that's bad but my system updated libc a week ago. Why the problem now? Try for a while but can't discover exact cause of problem.

My solution? Compile Pidgin myself, to see if that will fix the problem. Short answer: Yes, that fixed the problem.

I enabled software-sources in my apt-repository list, ran apt-get build-dep pidgin, manually download the pidgin source and compiled that sucker. Works fine, and I could remove all the extra packages installed by the apt-get build-dep move, with the exception of libfarstream, which is how Pidgin does it's sound.


Pidgin sound without gstreamers

Modern versions the instant messenger client Pidgin use gstreamers for their sound management. Sometimes you need to operate without gstreamers present on your system. But you still want sound though.

Here's a quick solution I've used in years passed. Go to Preferences -> Sounds -> Select "Method" and choose "Command". This will enable the input area with the label "Sou/nd command (%s for filename)". Into this box put this command:

aplay %s

That passes the sound from Pidgin to ALSA, which is supported on all modern Linux distributions and is also supported with backwards compatibility by PulseAudio.

Friday, September 7, 2012

Enable Auto Load with Firefox AutoPager

Hello. If you are using Firefox's add-on "AutoPager" you may have been annoyed in the past that it is inconveniently difficult to enable "Always autopage" on every sight you visit. (Essentially, you want to only use a blacklist of blocked autopage sites, and assume everything else is good.)

In the past, I don't even know how I set this. It may have been a menu or button option which has since been removed, but now for the latest Autopager, it is simply IMPOSSIBLE to enable all pages to automatically autopage.

Here is how I finally got this to work:

In Firefox, open a new tab and go to the address: "about:config" with no quotes and no http or anything. Just those words.

In the search area, type the words: extensions.autopager.noprompt

Set the value to 'True' and close. That should be all you need.

Friday, August 17, 2012

BTNX for Ubuntu 12.04 Precise

I thought that the wonderful mouse button configuration programs, btnx and btnx-config, were both available in the Ubuntu 12.04 repositories. Well, apparently they aren't? [But they were for a time, and I don't know why they were removed.]

UPDATE: For those running 12.10, I have posted a slightly dirty but workable solution here. Hopefully someone will take my patches and make a PPA of btnx. I'm looking it myself but it feels like a lot of work.

btnx is the best mouse-button configuration program I have found, bar-non, in any operating system so far. (I've tried others but they are either too complicated OR don't do the simple things I wanted.)

To install btnx in Ubuntu 12.04 (assuming Ubuntu doesn't fix this glaring error themselves), just download the appropriate version for yourself:
Look under the "Downloadable files" section. Don't grab the file for Oneiric, because that's the wrong version for 12.04 precise.

For example, you would want to download this sort of file (if you were running 64-bit): btnx_0.4.11-3ubuntu2_amd64.deb (19.3 KiB)

Make sure to get both the main program and the gui. After you have downloaded them, you need to install them. You may be able to install them using a graphical program, and then resolving the dependencies later. My approach was a little different and slightly more advanced but I knew exactly what was going on.

I opened a command console window, changed directories to where I had downloaded the btnx *.deb files, and ran the following command:

sudo dpkg -i btnx*

It proceeded to partially install the programs, but had a dependency error. I then ran this command to fix the dependency problem:

sudo apt-get install -f

In my case, this installed the dependency package 'menu'. Then btnx was successfully unpacked and installed. Now, btnx tried to auto-start its service after this but had an error. However when I manually ran the program manually through the applications menu, it opened just fine. I fed it my previously saved config files and everything worked.