Linux

Set Qt mouse pointer inside GNOME

You don’t have to install theme packages, engines or extra apps. All you need is already on your Debian system:

# update-alternatives --config x-cursor-theme There are 2 choices for the alternative x-cursor-theme (providing /usr/share/icons/default/index.theme).

Selection    Path                             Priority  Status
------------------------------------------------------------
* 0     /usr/share/icons/DMZ-White/cursor.theme   90    auto mode
  1     /usr/share/icons/DMZ-Black/cursor.theme   30    manual mode
  2     /usr/share/icons/DMZ-White/cursor.theme   90    manual mode

Press enter to keep the current choice[*], or type selection number: 1 update-alternatives: using /usr/share/icons/DMZ-Black/cursor.theme to provide /usr/share/icons/default/index.theme (x-cursor-theme) in manual mode.

If you’re not using Debian, it seems the way to go is to follow /usr/share/icons/default/index.theme with the following:

[Icon Theme]
Inherits=DMZ-Black

Either method sets the cursor theme systemwide through Xorg itself. To set it for a single user, add the following to ~/.Xdefaults:

Xcursor.theme: DMZ-Black
Xcursor.size: SIZE #optional

In my own case, I was using the the DMZ-Black theme on GTK applications, but Qt3/Qt4 applications (Amarok 1.4, Clementine, Skype, KeepassX) had the mouse pointer switch to DMZ-White when it entered their windows. Nothing that would cause trouble, but annoying if you want a consistent look across your environment.

As said before, this avoids unnecesary cruft on your system and works for all desktop environments you might have on your system.

Tips grabbed from here.

Set Qt mouse pointer inside GNOME Read More »

The no-bullshit Samba plus Nautilus network shares method.

Here is how to setup Samba and GNOME Nautilus to allow user directory sharing without having to allow root access. These commands are made with Debian in mind, so if you want to use them for your Linux distribution, you’ll have to adapt them.

  1. Install samba and nautilus-share.
  2. # aptitude install samba nautilus-share

  3. Rename your smb.conf to smb.conf.master
  4. # cd /etc/samba
    # mv smb.conf smb.conf.master

  5. Add the following to smb.conf.master somewhere under the [global] stanza using your favorite text editor.
  6. security = SHARE
    usershare allow guests = Yes
    usershare owner only = No

  7. Run the following command:
  8. # testparm -s smb.conf.master > smb.conf

    This tests the samba master configuration file, then outputs the results to the file samba itself will use for its configuration. If it finds errors, it will warn you about them.

    According to the Samba docs, a small smb.conf file improves performance. It also improves readability once you’re familiar with Samba options.

  9. Restart samba.
  10. # /etc/init.d/samba restart

  11. Add your user to the sambashare group. If more people use the system and they need to share files, make sure to add them as well.
  12. # useradd -G sambashare foo

  13. Log out of your user session, then log back in.
  14. On Nautilus, when you right-click directories you will now see a “Sharing options” item. Through this item you can:
    • Share the folder, assigning a share name.
    • Allow read/write access.
    • Enable Guest access, which allows people without a user account on the system to access the share.

This last option is the most useful as people can now get stuff through the network without having to deal with usernames or passwords. Does this make the Linux system behave like a Windows system? Yes, it does.

There is something to be said, however, about the convenience of creating shares without having to muck around the smb.conf.master file whenever you want to make a change.

The no-bullshit Samba plus Nautilus network shares method. Read More »

Cablemas DNS

So it seems cablemas decided to block DNS requests (port 53) going out of their network. I’m not sure if they’re doing this at the network level — which would be extremely stupid on their part — or by reconfiguring their modem. Either way this means:

  • Cannot use OpenDNS or Google Public DNS for domain resolution.
  • I’m forced to use Cablemas DNS servers. They are very, very slow. Most lookups are above 20s, with 30s-40s latency being common.

Since DNS queries take long to resolve, internet connectivity is slow as hell. Enter DNS caching (DNS proxy).

Most DNS servers can do caching on the side (BIND, djbdns, dnsmasq) without too much additional work. The problem is most of the time the cache disappears when the computer is rebooted. If your system is a server, you’re fine. But what if you’re on a laptop or a desktop? It’s no good having a cache if you have to rebuild it every day.

There isalso the fact the electric system in Mexico isn’t the best, so often computers go down hard when the electricity fails. UPS units are expensive to put them on a single desktop computer.

So that’s when I discovered pdnsd. It’s a light DNS proxy that can act as a caching system, working on localhost to speed up queries.

Being on Debian Sid, all I had to do to install it was

# aptitude install pdnsd

When asked which mode to use, I chose ‘manual’. When it was done I added my ISP’s DNS servers like so to /etc/pdnsd.conf

server {
        label=cablemas;
        ip=200.95.144.3;
        ip=10.147.0.43;
        ip=10.147.0.15;
        timeout=30;
        uptest=ping;
        ping_timeout= 300;
}

You’re free to use other DNS resolvers like OpenDNS or Google Public DNS obviously. The caching will work regardless of what upstream server does the actual resolving.

Then set it up so it runs on boot by editing /etc/default/pdnsd

This sets up the daemon to work; you still have to set up your network interfaces to make use of the cache. In my own case my system is getting an IP address from the cablemodem itself dynamically, so I had to edit /etc/dhcp3/dhclient.conf and enable the prepend domain-name-servers directive:

prepend domain-name-servers 127.0.0.1

If you’re setting manually via /etc/network/interfaces, you’ll have to manually edit /etc/resolv.conf so your local DNS is queried first.

Once everything is done, bring down the interface (eth0 in my case):

# ifdown eth0

Then bring it back up:

# ifup eth0

I’m pretty sure it’d be same for wlan interfaces. This should be more useful on laptops or systems that connect to networks of unknown quality.

This all goes to show Cablemas is one of the worst ISPs around and you should avoid it like the plague.

Sources:

Cablemas DNS Read More »

Debian

Lenny is good. Rock solid, just like the name ‘Stable’ promises.

But it wasn’t enough. So I updated to Squeeze.

That wasn’t enough. Went up to Sid. These guides helped.

So now I’m running the latest and would-be-greatest. Going to run a server with it.

Yes, I’m insane.

Debian Read More »

Songbird

Used version 1.2.0, which is the one currently being offered as stable. The application itself takes some extra work to get it going since it’s a XUL application. There are pre-built Ubuntu packages which you don’t get from the developers themselves, but rather from third parties who offer them. This means you have to trust these packagers when performing the installation.

The program doesn’t integrate into the desktop environment at all either. Sure, you can install “feathers” (skins) on it, but if you like a unified look across all your applications you’re out of luck. It can’t be that hard to use system bindings, surely.

Any playlists imported into it need to be coded in ANSI (ISO-8859-15). If you try to import anything in UTF-8 you will get lots and lots of ghost songs in the database. In my case I ended up with 4K ghost songs in a library of 13.4K songs. All these songs would have to be rated again. Screw that.

Now, here’s the kicker. It likes to eat RAM like a legislator takes money out of the public treasury, often going into the hundreds of megabytes of RAM usage.

Gotta keep looking for a decent music player. There’s gotta be something comparable to Winamp at the very least.

Songbird Read More »

Exaile

After my update to Karmic Koala I found myself in need of a new music player, specially after using the godsforsaken mess that is Amarok 2. In my search for a new music player for Linux I happened to find Exaile. It describes itself thusly:

Exaile is a music manager and player for GTK+ written in Python. It incorporates automatic fetching of album art, lyrics fetching, artist/album information via Wikipedia, Last.fm scrobbling, support for many portable media players including iPods, internet radio such as shoutcast, and tabbed playlists.

It takes a lot of inspiration from Amarok 1.4 in its layout and design choices and since it’s written in GTK you don’t have to install any KDE dependencies.

Even though it’s up to version 3.0.2 at the time of this writing, it should be considered alpha software. Beta at the most:

  • Playlist import/export doesn’t really work. You can import only from M3U playlists and export to XSPF playlists. The other choices don’t work.
  • Overuse of playlist tabs.
  • Most plugins don’t work the way they’re supposed to.

On the plus side, the developers offer a repository for it, so you don’t have to jump through hoops like you do when you want to use SongBird.

After attempting to use it for a couple of days, I’ve decided it’s not for me. Hopefully I’ll get SongBird working without too many problems.

Exaile Read More »

Sonido en Linux, o la falta de

Tons esta este articulo en el sitio del New York Times acerca del enfoque de Ubuntu en lo Mainstream. Es un buen articulo. Pero nunca va a pasar.

Preguntas por que? Por el sonido. Ya sabes, la cosa que tu cerebro procesa como entrada auditiva.

No voy a decir mucho al respecto, ya que otros lo han dicho mejor de lo que yo lo podría decir:

Yo solamente he tratado de hacer funcionar una diadema con Skype en mi computadora. Tuve que molerle a las cosas durante una hora antes de que Skype funcionara como se supone debe hacerlo. Esto con una diadema barata de 50 pesos sin control alguno; nada de esas chidas diademas USB para mi por que ya se que no funcionan con el sistema operativo de mi elección.

Todos esos APIs, servidores de sonido, sistemas y demonios…. son ganado Augeo cagándose en el establo; necesitan ser llevados al rastro y el establo ser limpiado. Quiza el Sr. Shuttleworth lo pueda hacer.

Sonido en Linux? Esta completamente roto; cada vez que veas artículos anunciando “Este es el año de Linux en el escritorio” por favor procede a abusar del autor hasta que te canses.

Digo esto como un usuario de Linux — tanto en casa como en el trabajo — y como alguien que empuja software libre encima de todo mundo. Supongo tendré que dejar de empujar la gente hacia Apple ahora.

Sonido en Linux, o la falta de Read More »

Linux Sound, or lack thereof

So there’s this article on the NYTimes about Ubuntu’s focus on reaching the Mainstream. It’s a pretty good read. But it won’t happen.

Why, you ask? Because of sound. You know, the thing that your brain processes as auditory input.

I won’t say much about it, since others have already said it far better than I could:

I’ve only tried to get a headset to work on my computer with Skype. Had to fiddle with settings for an hour before Skype worked the way it was supposed to. Mind you, this is a cheap-ass run-of-the-mill headphones-and-microphone headset without any controls; none of those nifty USB headsets for me because I know they do not work with my choice of operating system.

All of those APIs, sound servers, systems and daemons… they’re Augean cattle mucking up the stable, and they need to be slaughtered and the stable cleaned out. Perhaps Mr. Shuttleworth is up to the job.

Sound on Linux? It is completely broken; whenever you see articles announcing “This is the year of Linux on the desktop”, please proceed to abuse the author to no end.

I say this all as a Linux user — both at home and at work — and as someone who pushes open source software on everyone. Guess I’ll have to stop doing that and push people towards Apple instead.

Linux Sound, or lack thereof Read More »

VirtualBox 2.0.6

Actualicen. Hace que Las Cosas Funcionen.

Ahorita tengo mi Nokia E62 conectado a una instancia de WinXP si tener que hacer trabajo adicional aparte del que ya había hecho. Así que todo bien.

Mi iPod de tercera generación también funciona! Los añorados días de Winamp + ml_ipod han regresado. Ya nada de sufrir con Amarok o Rhythmbox! Una razón menos para probar Songbird!

Esto, señores, es Progreso.

No quiero sonar tan condescendiente… pero la mayoría de los programas en Linux todavía les falta un tramo por avanzar, es todo. Me siento mas cómodo utilizando Winamp + ml_ipod, así que si existe una oportunidad de usarlos, la tomaré.

VirtualBox 2.0.6 Read More »

VirtualBox 2.0.6

Do upgrade. It makes things Just Work.

Right now I’ve got my Nokia E62 connected to a WinXP instance without having to do any additional work than what I did before. So it’s all good now.

Hey! My third gen iPod works too! The halcyon days of Winamp + ml_ipod have come back. No more suffering around with Amarok or Rhythmbox! Even less reasons to try Songbird!

This, my friends, is Progress.

I don’t want to sound too condescending… but most music software on Linux still have some ways to go, is all. I’m most at home with Winamp + ml_iPod, so if there’s any chance I can use that, I will.

VirtualBox 2.0.6 Read More »

Direcciones IP estaticas en Ubuntu 8.10

Parece que no soy el único que ha tenido broncas con NetworkManager 0.7 en Ubuntu Intrepid Ibex.

Yo acabe por quitar NetworkManager por dos razones:

  • Necesitaba que mis maquinas virtuales tuvieran acceso a la red local (con Host Networking) en VirtualBox.
  • Los servidores DNS de mi ISP valen pa’ pura madre. Les gusta apuntarse el trafico entre si en un circulo vicioso a cada rato, dejando a todos sin una conexión al internet funcional.

Para configurar Host Networking me encontré un bonito tutorial en el wiki de Documentación de la Comunidad Ubuntu. Los conflictos comenzaron después, ya que note que mi conexión al internet se torno inestable y solamente reiniciando el sistema podía recuperar la conexión.

De ahí esta la situación con los nameservers de mi ISP(Telnor). Fallan por lo menos una vez a la semana y son lentos como la chingada, así que quería configurar mis alternos preferidos de OpenDNS. Lo malo fue que a NetworkManager no le parecía la idea y rehusaba aceptar una configuracion manual. Al tratar de declarar los nameservers manualmente, sobre-escribe el archivo /etc/resolv.conf cada vez que el sistema inicia.

Así que después de lidiar con estas patrañas por un par de días desinstale NetworkManager y puse mi solución en launchpad.

Tengo una configuración de red rara en la cual el módem DSL actúa como el servidor DHCP principal para computadoras conectadas con Ethernet y WiFi. Dado que alkhemy no tiene tarjeta WiFi, estoy usando mi router WRT54G(DD-WRT) como un puente inalambrico; conecto alkhemy al router via Ethernet, el router se conecta al módem DSL via WiFi, por lo cual no hay necesidad de que el sistema “mantenga viva una conexión a toda costa” (tomado del man page de NetworkManager). También tenia la duda de si las maquinas virtuales podrían conectarse a la red sin problemas y si el router podría lidiar con ellas sin darse un tiro; Me puedo saber satisfecho ya que no he tenido problemas después de tener esta configuración por una semana.

Ojala y se arreglen los problemas con NetworkManager mas pronto que tarde. No estoy seguro si otras distribuciones de Linux estan siendo afectadas por esto, pero si lo estan puede que el problema empeore. Ya esta llegando la hora en que Ubuntu tenga una edicion concentrandose en arreglar bichos en lugar de agregarle cosas nuevas. Pero yo que se.

Direcciones IP estaticas en Ubuntu 8.10 Read More »

Ubuntu 8.10 Static IP addresses

It looks like I’m not the only one to have run into difficulties with NetworkManager 0.7 in Ubuntu Intrepid Ibex.

Myself I was forced to get rid of NetworkManager for two reasons:

  • I needed my virtual machine instances to have Real Networking (better known as Host Networking) in VirtualBox.
  • My ISP’s DNS servers suck. They like to point traffic to each other in an endless loop from time to time, leaving everyone without an internet connection.

To setup Host Networking I found a nice tutorial in the Community Ubuntu Documentation wiki. However, after that I noticed some strange stuff happening with my Internet connection, as all access would be lost and only a reboot would get the machine to go back online.

Then there’s the question of my ISP (Telnor) nameservers. They fail at least once a week and are slow as hell, so I wanted to configure my preferred alternates from OpenDNS. Problem was NetworkManager was having none of that, as it will rewrite /etc/resolv.conf on every single boot.

So after dealing with this nonsense for a couple of days I got rid of NetworkManager and posted my solution to launchpad.

I have a weird network setup, in which the DSL modem acts as the main DHCP server for both wired and wireless hosts. However, since alkhemy has no wireless card, I’m using my WRT54G(DD-WRT) router to act as a wireless bridge; I connect alkhemy to it via Ethernet, the router connects to the DSL modem via WiFi, so there’s no need for my computer to actively work on “keeping a connection alive at all costs” (from the NetworkManager man page) There was the question whether the virtual machines would be able to network and whether client router would be able to deal with them without barfing; I’m happy to say I haven’t encountered any issues after running everything for a week.

Hopefully someone will get around to fix these problems with NetworkManager sooner rather than later. I’m not sure if other Linux distributions are being affected by this, but if they are it’s going to get messy. It’s getting to be time Ubuntu had a release concentrating on bug-fixes rather than adding on features. But what do I know.

Ubuntu 8.10 Static IP addresses Read More »