msgbartop
Just a little about development! Think before you write!
msgbarbottom

09 Jun 08 GEdit plugin formatting Ruby and ERB code now!

I have published some time ago a GEdit plugin for formatting Ruby code.

Now I just updated the plugin and added support for formatting html.erb and .xml.erb files too.

The main idea  is to make this plugin a generic language code formatter for GEdit, contributions are welcome.

As told before, to install it, grab the source from GitHub and copy all files to ~/.gnome2/gedit/plugins.

To download the files using Git use the following command line:

git clone git://github.com/urubatan/gedit_formatter.git

If you want to contribute just send a pull request in GitHub or send me a patch by e-mail.

To use the plugin, just press CTRL+ALT+F after installing and enabling it.

If you do not have git installed, you can download a tarbal with the latest sources from this link.

If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags: , , ,

17 May 08 Tired of looking at the console to know if the tests passed or failed?

AutoTest (part of ZenTest suite) is a very useful tool when you are working with Ruby On Rails development, but I always had problems configuring cool notifications for it, until now!

A friend of mine, started a little project to develop a gem (his first idea was just a lib for his own use, but now it turned to be an open source gem), that makes really easy to setup AutoTest to notify you of test results in a very cool way!

If you have a Mac, it will use Growl.
If you have windows, it will use Snarl.
If you have a Linux Box, it will use zenity or libnotify for Gnome and kdialog for KDE (I think libnotify works for any desktop environment).

And it is even cooler that this, if you run a Mac or Linux box, it can talk to you when your tests fail!

The project is hosted at GitHub, and to use it, you just need to run this two commands:

gem install carlosbrando-autotest-notification --source=http://gems.github.com
an-install

if you want it to talk to you, replace the last command with:

an-install -s

the voice code for linux is not in the main repository yet, it is on my fork, so if you run a linux box, and want to play with voice notification, you need to have espeak installed, and install my instead of the primary one (at least until the code is pushed back).

gem install urubatan-autotest-notification --source=http://gems.github.com

If you have a Windows box and want to play with voice notification, be a smart guy, format your machine ans install linux, you will be a lot happier that you are today :D
If this is not an option for you, you can always fork the project, write the code for a windows speech engine, and send us a pull request :D

Bellow a quote from the project readme about the dependencies of each platform:

* If you’re using a Mac:
You need to have Growl and growlnotify installed on your machine.

Download the Growl [http://growl.info/index.php] and install it like any other application on your Mac

Then you must install the growlnotify.

In your shell, cd to the directory on the Growl disk image containing growlnotify, and type ./install.sh.
That script will install growlnotify to /usr/local/bin and the manpage to /usr/local/man.

* If you’re using Windows (with cygwin):
You need to have Snarl and sncmd installed on your machine.

Download Snarl [http://www.fullphat.net/] and install it like any other application on your machine.

Then download sncmd [http://www.k23productions.com/download.php?view.105] open the zip file and place
the executable from the zip in any directory in windows PATH (for example c:\windows).

* If you’re using Windows (without cygwin):
You need to have Snarl, diffutils and ruby-snarl installed on your machine.

Download Snarl [http://www.fullphat.net/] and install it like any other application on your machine.

Download DiffUtils for Windows [http://gnuwin32.sourceforge.net/packages/diffutils.htm] and follow the installation
instructions on the site.

Run in the command prompt:

$ gem install ruby-snarl

After all that. You must update the environment variable PATH with the path to the bin of diffutils.
It’s the price that was paid for using Windows (try cygwin).

* If you’re using Linux:
You need to have libnotify binaries installed.

For ubuntu this means: sudo apt-get install libnotify-bin

Other distributions may package it with other names, do a search for libnotify using your distribution package
manager.

If you use KDE and do not have libnotify-bin installed, it will try to use kdialog wich is part of KDE.
It also works if you have zenity installed.

If you want to be notified with voice of the test results, instal espeak too, it is not needed.
And when running an-install, pass a “-s” switch, when you do not want voices notifications anymore, just run it
again without the “-s” switch.

I know that you can live without this cool new toy, but think about your work mates trying to figure out, how do your computer can tell you that your tests passed or not :D

If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags: , , , , , ,

14 Feb 08 Sync your w300i with Evolution


Recently I changed my linux interface from KDE[bb] to Gnome[bb], and I got myself a problem …
I could not synchronize my w300i with evolution, the synchronization always stopped in the middle and hang …
The solution was very simple!
Instead of using the opensync syncml plugin, I just changed to the IrMC-bluetooth plugin!

So this is the tip for this post, use the IrMC plugin to synchronize your w300i.
The real problem was with the evolution[bb] plugin that hang every time when you try to sync the memos, and the IrMC plugin does not have memo synchronization :D

If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags: , ,

14 Oct 07 Recording screencasts with Linux (Ubuntu/Kubuntu)

Well, lots of people want to create screencasts with linux but have no idea on how to begin, so I decided to write a little step by step using Ubuntu/Kubuntu, I hope it helps some one.

You’ll see that there are not that many steps :D

  1. To install all the tools we’ll use just run the following command
  2. $sudo apt-get install gtk-recordmydesktop mplayer mencoder ffmpeg
  3. To start recording your screencast, just open the application gtk-recordmydesktop and follow the on screen insctructions
  4. If the recorded video is in a big resolution (in my case 1280×800) you will only be able to play it with mplayer, it seems that Theora have memory issues :D
  5. The recorded video is in Ogg Theora format, that can be played only in linux, there is one decoder for windows only, so lets turn it into something usefull.
  6. $mencoder [file name].ogg -o [file name].avi -ovc lavc -oac lavc
  7. Ready! Now it can be played in any platform :D
  8. You still want to turn it into a screencast or the web?
  9. $ffmpeg -i [arquivo].avi [arquivo].flv
  10. Ready! now we have a Flash Video with streaming support for publishing it on the web, you just need a player.

If you work with flash, you can create your own player, I do not think it will be much trouble, but this is not my case, so I’ll use this open source player that does the job very well! JW FLV Player

Every thing ready! Now you can make your web site full of videos :D

I think this post is the simpler and most useful step by step for creating screen casts with linux that I have seen around the net :D

If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags: , , , ,

03 Oct 07 KDE Bluetooth – Your Symbian can make your Linux more secure!

If you are using KDE in your linux box, you can use your Symbian Smart Phone to make your desktop a little more secure.
For security, now I mean, not allow anyone to touch your desktop without you knowing it.

I do not know if I’m the only one, but sometimes I forget to lock my desktop when I’m not around.

The version of KDE that ships with Kubuntu 7.10 cames with a handy tool called: KBlueLock
You can start it by running the command kbluelock, or starting the kdebluetooth icon (the one that will show the task icon like the screenshot bellow)
And when you click the icon, the following menu will appear, after that, just click in the KBlueLock iten.
The screen bellow will show, and when you select the first check box, your device will be shown in the list, just select your cell phone (ot any other bluetooth device that fits in your pocket), and the desktop will be locked automatically if you walk away from your PC.
If you select the second check box too, it will automatically unlock unlock your desktop for you, that way you have your desktop working only when it knows that you are around (of course you can allways use your password to unlock it).

The only problem with this approach is that you have to keep your bluetooth enabled :D

PS.: is there any software that does this on Windows?

If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags: , ,

01 Oct 07 It is getting easier to sync your cell phone with your linux box

Very long time without posting, but a good one now, it is getting easier
to sync your cell phone with your linux, I have just upgraded my Kubuntu[bb]
to gutsy (7.10) and just got a very good surprise, not it comes with the
new version of Kitchensync, this one makes it really easy to setup the
synchronization, and you do not need to touch a single configuration
file, you can do everything from the great KDE GUI.

When I open Kytchensync (K Menu, Utilities, KitchenSyncFilter), I can
see the list of all “Sync profiles” I have already created, to sync my
phone I need only to click on the Synchronize button at the tool bar, or
in the “Synchronize Now” at the bottom of the selected profile.


Lets take a look at the setup I use to sync my Nokia N80 with Kontact
(you can use it with any symbian device).

I just clicked in the Edit Group, but you can create a new group, and
just add a KDE PIM and a “SyncML over OBEX client”.


You have lots of possible endpoints, I have just a few installed on my
machine, but Kitchensync uses opensync as its backend, so it has support
for Evolution2, Google Calendar and many more client/server points. The
great thing is that you can sync more than two points at a time.

The KDE PIM member does not need any configuration, the only problem is
that you need to close Kontact before synchronizing, the OpenSync group
tells that when KDE 4 is out this problem will be fixed.


Now I need to configure the connection to my Nokia N80, configure the
MAC address of your symbian smart phone and select channel 13 (for the
N80 13 is the right channel, for other models this can change), you can
use Konqueror to discover the MAC address of your cell phone Bluetooth
port (I do not know if there is any key combination to show this number
in the display).


In the Data Bases tab, make sure your contacts database is named
“Contacts”, your calendar and tasks database is named “Calendar” and
your notes database is named “Notes”, if you have changed this on the
cell phone, change here according,


In the options tab, configure the same username and password that you
configured in your cell phone to the “PC Suite” synchronization profile,
I could not make it work without a username and a password, so you need
to choose one.

I had to choose the version 1.0 of SyncML for synchronization because in
the tests the synchronization freezed 3 times when I tested the version
1.1, and I cound’t even connect to the cell phone using the version 1.2.

Make sure the application identifier in this screen is “PC Suite” I have
tried some other names but for some strange reason this one is the only
that seems to work (yes, I created the other test profiles in the cell
phone too).


If you want to sync another point with your cell phone and Kontact, for
example google calendar, just add the member and configure it as in the
screenshot bellow (if you want to know my password, it is 10 stars :D )



Well, I think now you can get your cell phone to sync to your linux box
too.

I’ll make some tests with gnome and evolution and will post here the
step by step.

If any one of you test this procedure with any other cell phone please
let me know if it works and what changes to this setup ware needed, then
I’ll keep here an updated list (or if you want to give-me a cell phone
to test I’ll be very happy :D )

Thanks for taking time to read this.

If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags: , , ,

22 Jul 07 What do you think about automatically coping your pictures from your N80 when you get home?

What do you think about automatically coping your pictures from your cell phone when you get home?
If you are using Kubuntu or any other linux with KDE as your UI you can do it very easilly.
I’m very happy with the integration I’m getting from my Kubuntu with my N80 …
And if you use any other linux flavor, you can configure it too …

Here is a step by step for you to get your pictures copied from your Symbian based device to your linux box, if your device is no a N80, you may have to change some little settings, but if it has bluetooth you can do it too …

All you need is the kdebluetooth package installed, and a bluetooth dongle on your linux box (or builtin support for BT).

  1. First open “System Settings” from the K menu.
  2. Click on the Bluetooth settings.
  3. Then on Device Discovery, then on Add New Job.
  4. Select Photo Copy
  5. And type a name for it, I’ll use CopyPhotosN80.
  6. The name can not have spaces on it.
  7. Click OK
  8. Then select the Job, and click the Configure Button
  9. It will open the generated script with KEdit (so, if you do not have it installed, you will have to install it first)
  10. You have to ajust the following settings on the opened script.
    1. TARGETFOLDER – for me it is TARGETFOLDER=’/home/urubatan/Pictures’
    2. SOURCEFOLDER – I have configured the default for my N80 to save the pictures in the miniSD card, so, for me the setting for this is: SOURCEFOLDER=’:11/E:/Images’
      1. You can easily get this setting by browsing your device with Konkeror, and copying all the path after the device address.
    3. TARGETFILEPREFIX – this is optional, but I have set it to: TARGETFILEPREFIX=’Image’
  11. Save the script
  12. Make sure the job you just created is checked.
  13. Select it, and click Execute this job now. to test it.
  14. Now you can select the Job, Select the option Listed Devices Only, and Add Device
  15. Select your cell phone, just to make sure this will run only for your cell phone.
  16. That is all …

Now, every day when you get home, all your pictures will get automatically copied to your home computer.
If you have read the other script names, you know that this KDE interface have a lot more options …
I’ll talk more about this later, but you already know that with the same script, you can copy any kind of files from your cell phone to your computer, and with a little more work, you can do the opposite too …

I hope this tip to be helpful for any one that takes the time to read this, if you have any doubt just ask …
And if you do not know how to do some thing with your cell phone and your linux box together, please let me know, I’ll try to solve the problem for you :D

PS.: if you comment more, I’ll post this tips more frequently …

If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags: , , ,

23 Jun 07 How to sync music to your S60 device with linux

I’m a music addict,

My
href="http://boo-box.com/link/aff:amazonid/uid:urubatanswebl-20/tags:nokia+N80"
class="bbli">N80[bb] class="bbic" />

is always full of music, and syncing it to my computer is a must have
option …

With windows I used PC Suite for it, but now with linux I had to look
for an option …

The best
href="http://boo-box.com/link/aff:amazonid/uid:urubatanswebl-20/tags:music+player"
class="bbli">music player alt="[bb]" class="bbic" />

I have found is Amarok, the default player for KDE …

It plays almost all known music formats, have a good “intelligent play
lists” option, knows how to download
href="http://boo-box.com/link/aff:amazonid/uid:urubatanswebl-20/tags:Podcasts"
class="bbli">Podcasts[bb] class="bbic" />

, and the best of it, it can sync to devices …

here is a step by step to configure Amarok to sync my N80, it will work
with any S60 or symbian device I think …

First of all, connect your phone using the “data transfer” option with
the USB cable (it will be much faster than using BlueTooth …

Then open Amarok

href="http://bp2.blogger.com/_4bj7-wrYld4/Rn1-fj4pmAI/AAAAAAAAADE/7z6HpIseRWI/s1600-h/amarok1.png"> style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;"
src="http://bp2.blogger.com/_4bj7-wrYld4/Rn1-fj4pmAI/AAAAAAAAADE/7z6HpIseRWI/s320/amarok1.png"
alt="" id="BLOGGER_PHOTO_ID_5079355035417679874" border="0" />

Click in configuration, then Configure Amarok

href="http://bp3.blogger.com/_4bj7-wrYld4/Rn1-fz4pmBI/AAAAAAAAADM/ulBrOjYlnv0/s1600-h/amarok2.png"> style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;"
src="http://bp3.blogger.com/_4bj7-wrYld4/Rn1-fz4pmBI/AAAAAAAAADM/ulBrOjYlnv0/s320/amarok2.png"
alt="" id="BLOGGER_PHOTO_ID_5079355039712647186" border="0" />

Go to the mobile devices tab.

Select your device, and configure it as generic audio player

href="http://bp0.blogger.com/_4bj7-wrYld4/Rn1-gD4pmCI/AAAAAAAAADU/ufKaQ_jZ4aw/s1600-h/amarok3.png"> style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;"
src="http://bp0.blogger.com/_4bj7-wrYld4/Rn1-gD4pmCI/AAAAAAAAADU/ufKaQ_jZ4aw/s320/amarok3.png"
alt="" id="BLOGGER_PHOTO_ID_5079355044007614498" border="0" />

Click on the blue settings button, and in the openned window, configure
the “mount command” and umount command.

Select your preferred music formats for the device, and the conversion
format for music in other formats.

click Ok

href="http://bp1.blogger.com/_4bj7-wrYld4/Rn1-gT4pmDI/AAAAAAAAADc/1VP68niTzIw/s1600-h/amarok4.png"> style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;"
src="http://bp1.blogger.com/_4bj7-wrYld4/Rn1-gT4pmDI/AAAAAAAAADc/1VP68niTzIw/s320/amarok4.png"
alt="" id="BLOGGER_PHOTO_ID_5079355048302581810" border="0" />

now, you can go back to de devices tab and navigate in your phone, or
just go to the lists tab, right click any list, and select “Transfer to
device” or “Sync with device”

href="http://bp2.blogger.com/_4bj7-wrYld4/Rn1-gj4pmEI/AAAAAAAAADk/CIz12_hyY9g/s1600-h/amarok5.png"> style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;"
src="http://bp2.blogger.com/_4bj7-wrYld4/Rn1-gj4pmEI/AAAAAAAAADk/CIz12_hyY9g/s320/amarok5.png"
alt="" id="BLOGGER_PHOTO_ID_5079355052597549122" border="0" />

The difference between transfer and sync is that transfer only copy the
music to your phone, and sync, removes music that is not on that list.

I’m very happy with this solution :D

Amarok is a great music player, and now I can sync my cell phone with my
kubuntu laptop :D

Any one is using a different solution?

If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags: ,

18 Jun 07 Symbian and Linux – Some questions …


Just a few questions for you …
Are there any other geeks like me, that use their Symbian device with a linux box?
Do you want to read posts about how to sync contacts, calendar, musics, files between your Symbian phone and your linux box?
Do you prefer posts with or without these almost random images?
Where is Wally? (Just kidding)

Why would you answer these questions?
Because if you do, I can write or not more of this, and with more details :D


Thanks for your contribution.

If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags: , ,

15 Jun 07 I’m back, and with a cool thing to tell you (Your S60 phone is linux friendly) :D

I have not posted here for a long time, sorry for that …
Last week I had to format my notebook, and after a little problem with windows, I decided to change my environment to linux, and my choice for distribution was Kubuntu.
After that, I spend about 3 days looking for a way to sync my N80 with my brand new linux OS installed.
And the great news is that a have found a way, the bad news is that you will have to use the console for that (yeap, no UI) at least for the configuration, after it is working you can use the multisync0.90 gui for start the synchronization process …

So lets go with the little tutorial …
for the sync process you will need the opensync tools …
in kubuntu to install all the needed you need just to type:

$sudo apt-get install opensyncutils opensync-plugin-kdepim opensync-plugin-syncml multisync0.90 multisync-tools

That is all, you have all installed and ready to go …
now
lets do some configuration …

$msynctool –addgroup kdeN80
$msynctool –addmember kdeN80 kdepim-sync
$msynctool –addmember kdeN80 syncml-obex-client
$msynctool –configure kdeN80 2

and in the text editor that will open, replace all the text with this:

<config>
<bluetooth_address>XX:XX:XX:XX:XX:XX</bluetooth_address>
<bluetooth_channel>13</bluetooth_channel>
<identifier>PC Suite</identifier>
<version>1</version>
<wbxml>1</wbxml>
<username>the configured user name</username>
<password>the configured password</password>
<type>2</type>
<usestringtable>1</usestringtable>
<onlyreplace>0</onlyreplace>
<recvlimit>10000</recvlimit>
<contact_db>Contacts</contact_db>
<calendar_db>Calendar</calendar_db>
<note_db>Notes</note_db>
</config>

now you are really ready to go …
to start syncing just type:

$msynctool –sync kdeN80

for the next syncs you can use the multisync0.90 gui.
I hope you enjoy it, because I have not found any help on the web looking for this information …

the coolest thing about this way of syncing is that with almost no change, you can sync your cell phone with google calendar, you will just need to install the correct plugin for opensync:
$sudo apt-get install opensync-plugin-google-calendar

or you can sync directly your phone with your palm.

This synchronization tips can be used for any nokia symbian phone, the only thing that will probably change is the <bluetooth_channel>13</bluetooth_channel> setting.

Now you know that your N80, N70, or any other nokia S60 phone are Linux friendly.

I’ll write some more posts about N80 and linux integration in the next days …

If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags: , ,