Using 3G USB mobile network sticks with USB 3.0 ports (Ubuntu/Linux)

I struggled for a while with my new laptop with Ubuntu 14.04: I could not understand why none of my 3G USB keys worked on it.

UPDATED (see bottom)

In /var/log/syslog I could see it being recognized, and a line mentioning usb_modeswitch… except no mode switching was happening: the ProductId was did not change, and so obviously no network.

I have the latest usb-modeswitch-data installed, and my card’s VendorId and ProductID are in it (It’s a Huawei Vodafone K4605, 12d1:14c1), apparently… but nope, no mode switching: I get a usb-storage device, and that’s all.

Long story short, this is the workaround I found, until some permanent fix is issued by Ubuntu: after inserting the card wait for a few seconds and then run a command like this one:

sudo usb_modeswitch -v 12d1 -p 14c1 -M '55534243123456780000000000000011062000000100000000000000000000'

(all on one line, substitute the VendorID and ProductID with your key’s)

This is pretty much what udev should be doing on itself, but for some reason it’s not.

…and bam! After a few more seconds you will be able to configure and use the Mobile Broadband connection in NetworkManager.

It took me some time to figure this out, so I hope it will help someone else, too.


 

Update: I got my hands on a more recent 3G key (a Vodafone Huawei K4201) and lo and behold, it works out of the box… it’s a weird device though; it presents itself to the system as a wired connection (ethernet), has a DHCP server and assigns a 192.168.9.0/24 address, which could be a problem (not in my case, but… horrible choice of network, Vodafone!).

Using Adwaita Dark for your linux desktop: fixing the desktop icon color.

I was getting a bit tired of the old grey gradients of the default Gnome3 theme in Fedora 16 (Adwaita) so I poked around and found that there is a hacked Adwaita Dark theme that uses the color scheme you see in a couple of multimedia apps in regular Adwaita for all the desktop (basically, turns everything dark).

You can download it from this website.

It looks pretty spiffy, but it has a small drawback: if you’re using Nautilus icons on the desktop (which is not the default in Gnome3) the icon names have a very dark text. This was probably overlooked because the original author wasn’t using them.

Here is the easy fix: go to your Adwaita Dark theme’s gtk-3.0 folder (probably ~/.themes/Adwaita Dark/ ) and edit gnome-applications.css with your favorite text editor and change the .nautilus-desktop.nautilus-canvas-item selector like this:

.nautilus-desktop.nautilus-canvas-item {
 /* Was Originally:
 * color: @theme_bg_color;
 */ 
/* Fixed version: */
color: @theme_text_color;
/* End of the fix */
text-shadow:1 1 black;
}

Yes, it’s really that easy: one line of CSS!

The theme should update in realtime. If it doesn’t try changing it and back, or logging out. Enjoy!

Changing the Gnome Keyring unlock password

The Gnome keyring has had for some time the nice feature to unlock itself upon login. Unfortunately as soon as you change your password (which you could be forced to, due to company policy, for example) it stops, since the keyring password is now out of sync.

For some time it was simply impossible to change the unlock password (yeah, annoying).

Then the change password dialog was implemented in Seahorse ( yum install seahorse seahorse-plugins )… but this feature is not only very poorly documented (if at all), all the online pointers and fourm posts talk about an old version of Seahorse apparently.

In Fedora 10 the functionality is there, but it is a bit hidden: install seahorse, click Applications -> Accessories -> Passwords and Encription Keys

then click on Edit, Preferences, and there you are, the “login” line with the big “Change Unlock Password” button. Now you simply have to insert the old password, and update it with your current one.

Change Gnome Keyring Unlock Password
Change Gnome Keyring Unlock Password

Enjoy!