Archive for the ‘Linux’ Category

Fixing Google Earth 6 “No such file or directory” Error

Can’t run Google Earth 6.0 (6.0.1.2032) on Ubuntu Maverick 10.10 ? Are you getting the following error message:

bash: ./googleearth-bin: No such file or directory

Try this command:

sudo ln -s /lib/ld-linux.so.2 /lib/ld-lsb.so.3

Source of the information

Fixing MPlayer subtitle fonts in Ubuntu

Here I am with a new tip that may seem silly but it got me struggling with MPlayer config file (~/.mplayer/config) for quite a long time. Not anymore! On a previous post I showed you my MPlayer config file. It turns out the font I wanted to use for subtitles wasn’t actually being used (MPlayer instead was defaulting to Sans). After talking to the always helpful guys over at #mplayer on irc.freenode.net with no luck I decided to do some more googling about the issue. I was lucky enough to be able to find this. So long story short, if you’re still struggling with your MPlayer (command line version) to get it to use a certain font for a subtitle and it’s not following your command replace this line in your ~/.mplayer/config:

font=/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-R.ttf

with the following line:

font=Ubuntu

I’m still getting my head around this so I won’t be able to further detail how to configure this a little more like using a Bold or Italic font. So far all I can tell is that if MPlayer is compiled with fontconfig support (which is the case as of Ubuntu Maverick 10.10) one has to use a fontconfig font name. In order to get a list of fonts known to fontconfig, use this command in a terminal:

fc-list

Results will probably be very complicated to read so just select the font you desire and filter the results with the following example:

fc-list |grep Ubuntu

You may now use the font you want for your subtitle in your MPlayer config file. One little thing before I end this post, for those who don’t know yet ~/ is a short way of spelling your home directory so, for example: if my username is rajeshkoothrappali and my home directory is in /home/rajeshkoothrappali then ~/ is equal to /home/rajeshkoothrappali

I hope you guys get the idea. Cya!

Converting Youtube Videos Into Music (mp3, wma, etc.)

Hello guys! Last week I went to my cousin’s graduation party and I heard a song I liked very much. Today I remembered to look it up and found it on Youtube. Here’s what I did to convert the Youtube video into an mp3 file:

First of all you’ll have to download the video and for that task there are a couple of tools that can be used (i.e.: youtube-dl, Video Download Helper, etc.) but in my case, as an Ubuntu user, all I had to do is go to /tmp/ and find the file I wanted:

Now I’ll have to make sure I’ve got everything I need for the conversion process: ffmpeg and codecs (Medibuntu repository will be necessary now). Ubuntu Tweak will help you get the Medibuntu repository set up, you may either use it or follow the instructions right from the Medibuntu page link above.

After Medibuntu is all set up, open up a terminal window and run this command:

sudo apt-get update && sudo apt-get install ffmpeg libavcodec-extra-52 w32codecs

When this command is done working you’ll be ready to get the Youtube video file converted. Still at the terminal window run the following command now:

ffmpeg -i input_video_file output_audio_file.mp3

That final .mp3 extension may be replaced with .wma, .ogg or whatever pleases you. Have fun! :D

GNOME Panel Transparency in Ubuntu Ambiance Theme

I’m presenting another quick tip I’ve just found out while browsing the web (thanks google) which is making my GNOME panel go transparent (as in 100% transparent, including the indicator applets). The source of the tip is to be found here. Ok so there we go:

Open Ambiance or Radiance gtkrc file with this command from a terminal window:

sudo nano /usr/share/themes/Ambiance/gtk-2.0/gtkrc

Scroll down until you find the following line:

bg_pixmap[NORMAL] = "panel_bg.png"

Comment it (put a # in front of the damn line), save the file and then you can either go to Appearance Properties and change to another theme then switch back to Ambiance (or Radiance) or logout then login back again.

Have fun y’all! :D

P.S.: If you want to apply the settings locally you can copy the directory Ambiance from /usr/share/themes/Ambiance/ into your home directory ~/. Here’s how to do it in case you are clueless:

cp /usr/share/themes/Ambiance/ ~/

You might as well use the file browser. Ok, that’s it for now. See you soon!

Tonight I played with mplayer settings

Hi y’all. Here’s my mplayer config file (~/.mplayer/config)

# mplayer config file [subtitle and video playback settings]

font=/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-R.ttf
sub-bg-alpha="0" #background color ala closed captions
sub-bg-color="0" #black to white
subfont-text-scale="3.6" #truetype font scaling
subfont-blur="1" #Slight blur
subpos="95" #By default subtitles are too low
subalign="2"
stop-xscreensaver=yes

and input.conf (~/.mplayer/input.conf)

MOUSE_BTN1 vo_fullscreen # make mplayer go fullscreen by clicking the middle button
MOUSE_BTN0 pause # pause / resume video playback by clicking the left button

Making Ubuntu faster

Hi y’all. There’s this hacker who recently created a 200 lines linux kernel patch that does wonders which made Linus Torvalds happy. Anyway, while browsing the internet last Sunday I came across this blog post (warning: it’s in Portuguese!) which promises to make your Linux Desktop faster without forcing the user to apply a patch onto the kernel and then recompile it. So I decided to get my hands dirty and follow all the steps and I am now happy with the results so I figured I should share it with you guys. It seems this tip was originally created by some fedora developer (I’m not sure though).

Ok, long story short, let’s do it!

Open up a terminal window and edit (use any editor you like, in my case I used nano which is my favorite command line one) the file /etc/rc.local with the following command:

sudo nano /etc/rc.local

Now insert the following lines before the ‘exit 0′ line

mkdir -p /dev/cgroup/cpu

mount -t cgroup cgroup /dev/cgroup/cpu -o cpu
mkdir -m 0777 /dev/cgroup/cpu/user
echo "1" > /dev/cgroup/cpu/user/notify_on_release
echo "/usr/local/sbin/cgroup_clean" > /dev/cgroup/cpu/release_agent
Now create the file /usr/local/sbin/cgroup_clean with this command: sudo nano /usr/local/sbin/cgroup_clean
cgroup_clean’s contents should be:

#!/bin/sh
if [ "$1" != "/user" -a "$1" != "/user/" ]; then
rmdir /dev/cgroup/cpu$1
fi
Make the file executable with this command: sudo chmod +x /usr/local/sbin/cgroup_clean
Now for the last step edit /etc/bash.bashrc and insert the following lines in the beginning of the file:
if [ "$PS1" ] ; then
mkdir -m 0700 /dev/cgroup/cpu/user/$$
echo $$ > /dev/cgroup/cpu/user/$$/tasks
fi
Reboot your PC/notebook/netbook/tablet/cellphone and enjoy! :D
P.S.: Para instruções em Português, favor consultar aqui.

Alterando a aparência do relógio do GNOME

For instructions in ENGLISH please read here. This is just a work of translation thus the contents of this post belong to OMG!Ubuntu.

Para aqueles interessados em alterar o relógio do nosso querido GNOME aqui vão as instruções:

1. Pressione ALT+F2

2. Na janela que aparecer digite gconf-editor

3. Aperte ENTER

4. Navegue até “Apps > Panel > Applets > Clock_Screen* > Prefs”

OBS: O nome poderá ser um pouco diferente do mencionado acima. Procure pelo applet com a pasta Prefs correta.

5. Duplo clique no valor ‘Format’ e altere-o para Custom (neste momento o applet do relógio exibirá algo como ‘????’)

6. Duplo clique no campo ‘Custom Format’ e então cole um dos códigos abaixo (clique na imagem para ver o código)

7. Após inserir o código, pressione ENTER e seja feliz :D

P.S.: Hoje notei que o pastebin estava fora do ar então tive que buscar na internet novamente a configuração do applet. Após ler alguns arquivos de configuração deixei meu relógio com o seguinte formato:

Back onto defaults…

Ok, this post is just to let you guys know I’m back onto using gnome-panel instead of AWN. A dock looks cool and stuff but I believe it’s not ready just yet.. Maybe in a couple of months or years… Perhaps with docky instead of AWN… I dunno. For now I’ll stick to a single gnome-panel and the main menu applet instead of the menu bar one…

Removing metacity’s minimize effect

Hello!

This is a quick post meant to get my readers up-to-date as to my status on Ubuntu. Maverick Meerkat (Ubuntu 10.10) is out in the wild now and I’m a happy owner of a brand new Dell notebook now (Inspiron 15R), so far everything works out of the box, just like it’s supposed to.

Here’s a quick tip I’m bringing to you from a fellow blogger which will teach you how to disable that silly minimize effect when GNOME is not running compiz. Here’s the deal:

Open up gconf-editor and head to “apps / metacity / general” and disable the key “reduced_resources”.

The action mentioned above will give you kind of a faster desktop by disabling the minimize effect as well as disabling the ability to see windows contents while they’re being resized/moved. However, while moving/resizing the windows one will see something like a grid instead of the window contents. It’s kinda hard to explain exactly how it looks like so, why don’t you just go and see for yourself and let me know what you think about it?

After reading the comments section on Harsh J’s blog I came across a better way of disabling the minimize effect without compromising usability by also disabling the ability to move/resize windows without seeing its contents (for those like me who prefer the old behaviour).

Open up gconf-editor, go to “desktop / gnome / interface” then find the key “enable_animations” and tick its check-box so it’ll be disabled.

Hope to see you guys soon!

*** A little note in Portuguese ***

Estou com preguiça de traduzir esse post pro pt_BR então caso alguem de vocês não entenda do que se trata, basta me pedir que eu o traduzo depois.

Usando o GNOME com uma dockbar

Salve salve pessoal,

somente uma dica rápida que eu acabei de aprender e gostaria de compartilhar com o mundo. Para usar o GNOME sem o gnome-panel e com uma dock (Avant Window Navigator, Docky, etc) em seu lugar faça o seguinte:

Instale o gconf-editor com o comando “sudo apt-get install gconf-editor” (sem as “aspas”) depois rode o gconf-editor e vá em Desktop / gnome / session / required_components. Edite o valor pertencente a entrada chamada “panel”, substituindo-o pelo comando que executa a dock de sua preferência (ex: avant-window-navigator, docky, etc.). Uma imagem vale mais do que mil palavras:

Na imagem acima eu demonstro o uso do GNOME com a dock Avant Window Navigator. Decidi utilizar o AWN pois ela é uma dock muito personalizável e também pelo fato dela parecer mais estável que as outras que eu ja testei. Vale ressaltar que com a remoção do gnome-panel o atalho ALT+F2 que serve para executar comandos não mais funcionará então instalei também o Gnome-Do que é um ótimo substituto à verramenta de execução que vem no gnome-panel. Após a aplicação das mudanças, faça logout e retorne ao desktop. Agora é só configurar a dock para o seu gosto e sair curtindo a novidade ;)

Follow

Get every new post delivered to your Inbox.