xuedi 的 blog
A BLUG Spammers BLOG

Archive for April, 2010

New Ubuntu and binary

Tuesday, April 27th, 2010

Good news,

The 10.10 release of Ubuntu will increase all kind of stats, network speed, hard disk size and so on. And no one need to do any kernel magic for that ;-)

What i am talking about is that 10.10 will have finally implemented the binary norm from 1998 and now there is a difference between 1000MB and 1024MB so only fields where it is really necessary like counting the memory it will be kept in binary counting. All human readable values like hard disk, network bandwidth and so on will be counted in 10 system. To make that clear 1MB will be in the future 1000kB, and in binary counting 1MiB will be 1024KiB so the ‘i’ is the new part the signalize binary counting. That should make calculating much more easy and help the USB-Stick sellers to finally have the right size for free :-P (previous 1G stick was 931MB) now a 1G stick will have exact 1000MB ^^

Cheers
xuedi

Remote control rhythmbox

Thursday, April 8th, 2010

Programmer are good ones if the are lazy in their style of work, and i using that concept for all my live. So one of my new laziness gadgets, imagine you lie in bed, but your laptop is playing music on your working desk, now a song came up you want to skip or you want to change the volume. Given the fact you have a ssh comparable device like i have my N900 with you, you can easily remote control rhythmbox.

The command line control is rhythmbox-client, unluckly its an GUI app that gets a bit confused if the right environment variables are not set, so that how i make it run easily for me.

First:

Make sure you can access the machine that runs rhythmbox easily, my laptop runs a SSH server, so first i created a certificate on my N900, this is not nessesary if you have there alreada a xxx.pub file:

cd /home/<yourUser>/.ssh
ssh-keygen -t rsa

Second:

You need to make your machine that runs the music play to know that this created certificate is accepted, therefor you need to register it, the first variable here is the key file its called something xxx.pub depending if you use rsa or another algorithm. You also need to copy that key over via SSH so you need to enter the name and ip or your machine that runs rhythbox:

ssh-copy-id -i /home/<yourUser>/ssh/id_rsa.pub <user>@<hostname_or_ip_address>

Third:

Make it more easy to access your remote music machine, if you use it only in a home wifi you can create a SSH config file and if you gave your machine that runs ryhthmbox a name lets say ‘myLaptop’ then this command will connect you via SSH: ‘ssh myLaptop’ but you can choose freely run ‘vim /home/<yourUser>/.ssh/config’ and enter this config option:

Host myLaptop
User yourUser       #or whatever you like
Port 22
Hostname <MusicPlayersIP>
IdentityFile /home/<yourUser>/.ssh/id_rsa
TCPKeepAlive yes
IdentitiesOnly yes

Forth:

The command to change your rythmbox need some variables set as well, that makes it quite long, so i suggest you create an alias for that, normally you do that in ~/.bashrc (for your user only) /etc/bash.bashec (for systemwide) but if your machine like mine N900 just using shell not bash you need to use ~/.profile . Add  now the alias command to our file of choice:

alias rc='ssh yourUser@myLaptop env DISPLAY=:0.0 rhythmbox-client --no-start'

Usage:

You can use that new command now for:

  • rc –help                    # get all options
  • rc –next                    # next song
  • rc –previous            # next song
  • rc –volume-up        # louder
  • rc –volume-down  # more quite
  • rc –pause                 # pause the music
  • rc –play                    # start playing music

Some tip, the volume up and down command just change the internal rhythmbox level, so before you go with some beers, sandwiches, to bed an plan to stay there all sunday long, set the rhythmbox level to middle and ajust your system sound level to normal room sound, now you have room for more lous and more quite, and no reason to get up at all … well, get some empty plastic bottle and you even can save the way to your washroom ;-)

N900, N810, N800 Users

You can also create a desktop icon for ever singe command and create your own remote control looking desktop, but don’t be inpatient, command via SSH take a second to work, so don’t press 10 time more loud, that will be still executed just a second later and you neighbors might not like it…

Cheers
xuedi

FaceBook

Wednesday, April 7th, 2010

Hello world,

more precise hello you people using FaceBook. I just deleted 95% of my FaceBook friends, that is not meant personal in any way, thats just a step further in my web 2.0 diet. Its pretty useless to collect 200+ friends who don’t use FB to communicate with me at all, i just use FB myself mostly for sharing pictures (free space).

I decide as well to keep my privacy on lower level, btw. if you are setting FB on ‘only me’ or ‘only friends’ plus deny any 3rd parties to see your private data (needs applications totally disabled) FB is pretty good locked. If you using the site be aware that i can write an FaceBook app, that does a stupid ‘intelligence’ test, i will not only see a lot of your private data but also the data off all your friends, to avoid that (friends mess up in giving all ‘their’ private details away, but also get lots of mine) you need to disable apps completely…

For all the communication junkies out there, i love old style media like mail, short messages, XMPP or even MSN.

For all the BLUG members, i still love you all, even if you not any longer in my friend list ;-)

Cheers
xuedi