Wifi Disconnects and it is Unable to Reconnect, “device not ready” on Debian and Ubuntu

On both Ubuntu and Debian I’ve faced a problem with the Wifi that would get disconnected and would not be able to reconnect. On some circumstances, even brand-new Debian Jessie, Network Manager 0.9.8 would show a “device not ready” message instead of a list of wireless networks.

On both Debian Jessie and Ubuntu 10.04 I’ve solved that by removing and reloading modules, though different modules were targeted.

Ubuntu 10.04 (and it will probably work for newer versions):

sudo rmmod iwlagn
sudo rmmod iwlcore
sudo modprobe iwlcore
sudo modprobe iwlagn

Debian Jessie

rmmod iwlmvm
rmmod iwlwifi
modprobe iwlmvm
modprobe iwlwifi lln_disable=1 swcrypto=1

Twitter Stream Mysterious 401:Unauthorized Status with Oauth and Clock Issue

I’ve been facing the following problem with Twitter Stream while using Python: The REST API was working fine, but the Stream API was returning me 401:Unauthorized.

Both, REST and Stream were working fine when using curl with the command provided by the Oauth tool, but while I was trying to make it work with Python, I was not being successful at all, only receiving the 401-thing. At that point nothing seemed to be strange, the response header was:

Content-Type: text/html
WWW-Authenticate: Basic realm="Firehose"
Cache-Control: must-revalidate,no-cache,no-store
Content-Length: 1505
Connection: close

After 2 months struggling with that problem, I discovered that Twitter API will return 401 if your clock is not synchronized. To solve this you need to execute ntpdate. On Ubuntu you can execute the following command:

sudo ntpdate ntp.ubuntu.com

and I guess that you will be able to connect with the Twitter Stream again. On the end, I discovered that this happened because I’ve moved to a different country, and I changed only my clock, without changing my Zone Time. I discovered this because the hour on my clock changed to the one from my home country when I used ntpdate. If this is your case, and you are using Ubuntu, change your Zone Time with the following comand:

sudo dpkg-reconfigure tzdata

Well, I learned a bunch of things in a row 🙂

Unknown or ambiguous terminal type; type just ‘set terminal’ for a list

This appeared when I tried to “set terminal pdf” on Gnuplot. Im using Ubuntu 10.04.  Making the long story short, I needed to install the Maverick (10.10) packets for Gnuplot.

The direct links for those packages, depending on the arch, are amd64, gnuplot-nox and gnuplot-x11. For i386, gnuplot-nox and gnuplot-x11. Download, install and the same output should be something like

gnuplot> set terminal pdf
Terminal type set to 'pdfcairo'

and that is it!

Adding a Samsung ML-1865w laser printer to Ubuntu

Samsung ML-1865w laser printer is a good alternative for those who print much more in black and white than in color. I was trying to add it to Ubuntu, but it was not found automatically by Ubuntu. So I need to add its driver manually, following the steps below:

# enter in a temporarty directory
cd /var/tmp

# downloads the unified linux driver
wget http://org.downloadcenter.samsung.com/downloadfile/ContentsFile.aspx?CDSite=UNI_HK_EN&CttFileID=3182440&CDCttType=DR&ModelType=N&ModelName=ML-1865W&VPath=DR/201106/20110602161236937/UnifiedLinuxDriver_0.98.tar.gz

# unconpressing driver 
tar -xzf UnifiedLinuxDriver_0.98.tar.gz

# remove compressed drive
rm UnifiedLinuxDriver_0.98.tar.gz

# enter 
cd cdroot

# run autorun -> It will open a window -> Next -> I accept -> Next -> Add user: vianna -> Next -> Mark "Disable LPT support" -> Wait installing pr
sudo ./autorun

# remove install directory
cd ..; rm -rf cdroot

See ya!

Pidgin From Source Farsight And GstInterfaces

While using Jaunty and having problems with Pidgin 2.5.5 and its MSN protocol error “Connection error from Notification server: Unable to connect”, and also with WLM error “nexus stream error”, I ended up installing 2.10.0 from source. During the installation, I had the following problems to install the sound and video dependencies:

checking for GSTINTERFACES… no
checking for FARSIGHT… no

Ok, for GSTINTERFACES I was not finding easely what package to install. Looking into “configure” file, it was requiring a “gstreamer-interfaces-0.10” package, but this was not found in Jaunty. So, I figured out that the right package is libgstreamer-plugins-base0.10-dev. Therefore,

sudo apt-get install libgstreamer-plugins-base0.10-dev

For FARSIGHT things were more complicated. I needed to install libnice 0.0.9, and farsight2 0.0.10 (which required lots of denpendencies) both from source.

The result was

checking for GSTINTERFACES… yes
checking for FARSIGHT… yes

and I could finally use Pidgin 2.10.0 with sound and video on Jaunty.

More resources of information regarding Pidgin installation from source can be found here, and here.

Sync Liferea and Google Reader

Recently Liferea`Blog realeased a new version that allows RSS synchronization with Google Reader.

Why this is useful?

This is nice if you work in more than one computer, to share your RSS and sync your read feeds.

Why use both? Liferea and Google Reader?

Some time ago I posted about Liferea, when I was moving from web to client applications (Gmail/Thunderbird, GoogleReader/Liferea, Twitter-Facebook-GoogleBuzz/Gwibber). One thing that motivated me to use client applications was the replacement of Ubuntu` notification area by mini-indicator, which comprises all this tools. Then, instead of having to access these sites several times (e-mail, RSS, social network) I’ve been using notification area.

Backing up feed list

Open Liferea and goes in ‘Subscriptions/Export feed list’.

Installing/Updating Liferea

Since current available Liferea version in apt-get repositories is 1.6.4, which does not have Google Reader synchronization feature, you can build current Liferea stable version (1.6.6) from source, as follows (I needed to install additional libraries for Ubuntu 11.04):

user@host:~$ wget http://sourceforge.net/projects/liferea/files/Liferea%20Stable/1.6.6/liferea-1.6.6b.tar.gz/download
user@host:~$ tar -xzf liferea-1.6.6b.tar.gz
user@host:~$ cd liferea-1.6.6b
user@host:~$ sudo apt-get install libxslt1-dev libwebkit-dev libglade2-dev

# For Ubuntu 10.04 I had to install the following dependencies (if this is not your case skip next line):
user@host:~$ sudo apt-get install intltool libsqlite3-dev libgconf2-dev

user@host:~$ ./configure
user@host:~$ make
user@host:~$ sudo make install

See ya!

Totem Without PulseAudio on Jaunty

Since I quit PulseAudio, I’d a problem with Totem, it was not having sound anymore. In order to solve this I uninstalled gstreamer for pulseaudio with the following command

 sudo apt-get remove gstreamer0.10-pulseaudio

Restart, and sound will be working in Totem.