Azitech

Azimout's Linux weblog

Archive for the ‘Problems’ Category

Upgrade to CM11

leave a comment »

After freeing my Android a year ago, I decided to upgrade to a more up-to-date version of Android/CyanogenMod.

At first I upgraded from CM 10.1 to 10.2; however, many Google apps gave me a “cannot contact Google servers” error (mainly GMail, Google Calendar and Google Play; Maps worked fine).

I tried reinstalling the gapps .apk, I tried clearing the cache, I tried a factory reset and reinstalling CM. Nothing seemed to work. In the end, thanks to some forum thread I realized that maybe it does not work when you have 2-step authentication for your Google account (the authentication itself seemed to succeed on the phone, but then the sync services failed).

So, eventually I decided to try to upgrade to CM 11 nightly. The new problem was that the disk image would fail to install (some error about a get_metadata_recursive method). After some googling I realized that I needed a newer version of the ClockworkMod recovery, 6.0.2.3 just wouldn’t cut it. So I downloaded 6.0.4.6 and heimdall and tried flashing it, which also didn’t work (error message: no recovery partition found).

The solution was to install Rommanager and upgrade the CWM recovery from there. After that, I could install CM 11 and the corresponding Gapps, and now everything seems to work fine.

Advertisements

Written by azimout

02/03/2014 at 08:41

Posted in Problems

perl: warning: Setting locale failed

leave a comment »

If you get the following error message

perl: warning: Setting locale failed.

run the following two commands to fix it

sudo locale-gen <whatever locales you want on your machine>
sudo dpkg-reconfigure locales

Written by azimout

10/03/2013 at 14:40

Posted in Problems

Cannot shut down / reboot Ubuntu system

leave a comment »

Since a few weeks now, I couldn’t shut down or reboot my system the normal way (i.e. from the menu on the top right corner): it would act like I’d told it to log out and bring me to the log in screen (lightdm). The error message in /var/log/syslog was:

gnome-session: WARNING: Unable to stop system: Authorization is required

(which is something you normally get when another non-system user is logged in). As a workaround I would just switch to a virtual terminal (Ctrl-Alt-F1), log in and type sudo shutdown -p now.

Tonight I thought I’d spend some time to find out what the problem was, and I did. Turns out, it was an upstart service I had added recently (Etherpad), and this is the guilty upstart script. For now I commented out the “start on” and “stop on” lines and added the word “manual”, which still allows me to sudo service etherpad start/stop but doesn’t autostart the service and as a bonus, allows for smooth system shutdowns ūüôā

Written by azimout

09/02/2013 at 23:23

Posted in Problems

Dropbox Linux installer fails if behind a proxy

with one comment

The .deb Dropbox package does not contain the actual Dropbox daemon, and tries to download it after the installation. If you’re behind an HTTP proxy, you most likely will get the error message:

Trouble connecting to Dropbox servers. Maybe your internet connection is down, or you need to set your http_proxy environment variable

However, you can easily verify (with the export command) that the http_proxy variable is set correctly!

Some people recommend the workaround (suggested by the Dropbox website for Linux servers) of downloading the .tar.gz, extracting and running from there. However I decided to investigate a bit further!

The /usr/bin/dropbox is a Python script. I found that the error is printed from line 250, after trying to urllib.urlopen(“http://www.dropbox.com/download?plat=lnx.x86_64&#8221;). Trying just that in a Python shell will cause an exception in /usr/lib/python2.7/ssl.py:

IOError: [Errno socket error] [Errno 1] _ssl.c:504: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol

On the other hand, opening the URL above in a browser or even through wget will run smoothly!

Written by azimout

21/08/2012 at 09:58

Posted in Problems

UID_MIN in /etc/login.defs

leave a comment »

After upgrading an old Ubuntu laptop to 11.10, the full name of my user account in Unity’s “indicator session” applet was: [Invalid UTF-8]

This turns out to be Ubuntu bug #837246, and the reason was that I had set my UID to a number below 1000 in order to hide it from the login list of users. Thanks to the comments in this bug report I found out about the existence of the UID_MIN parameter in /etc/login.defs. Setting that to a number lower than my UID makes my username visible at the login screen, but it fixes the issue I mentioned above.

Written by azimout

09/02/2012 at 22:35

Posted in Problems

Matplotlib font manager error

leave a comment »

A Python script that used to work on my machine stopped working at some point. It’s the script presented in the post Designing a Butterworth low-pass filter with SciPy. The last few lines of the traceback were:

File "/usr/lib/pymodules/python2.7/matplotlib/font_manager.py", line 1306, in findfont
   if not os.path.exists(font):
 File "/usr/lib/python2.7/genericpath.py", line 18, in exists
   os.stat(path)
 TypeError: coercing to Unicode: need string or buffer, dict found

Through this thread I was able to resolve the issue by clearing matplotlib’s font cache: rm ~/.matplotlib/fontList.cache

Written by azimout

01/09/2011 at 13:03

Posted in Problems

touchpad locking on ubuntu 11.04

leave a comment »

After upgrading an Asus Eee1005 from Ubuntu 10.10 to 11.04, the touchpad would occasionally lock up shortly after logging in. After a while I realized the locking would occur only when I started typing something; it was fine as long as I kept using the mouse only. The culprit was that I was running syndaemon on session startup to disable the touchpad while typing; somehow it failed to re-enable the touchpad after I stopped typing. Removing syndaemon from startup fixed the issue.

Written by azimout

02/08/2011 at 09:02

Posted in Problems