Multi touch works on my new Lubuntu!

Last week I bought a new laptop (Acer V3-571G i7-3630QM/16GB/750/DVD-RW GT640M) and accidentally a friend sent me an email about Lubuntu. So I decided to give it a try ๐Ÿ™‚

There are a few things I liked about Lubuntu:

  1. It’s lightweight. It doesn’t have all that gnome stuff that I’m not really using
  2. It has synaptic so I can properly see all the packages (comparing to that Software Center of Ubuntu that doesn’t show me the technical packages I want to install).
  3. It works out of the box. Didn’t have to install any additional drivers for anything (camera, microphone, wifi, graphics card). That’s the same with Ubuntu of course.
  4. Multi touch works! Most probably it works on Ubuntu as well & on other distributions but that’s the first time I have a multi touch mousepad. Therefore I can now scroll up & down with two fingers!! Even right click by tapping with my two fingers! This is super! I feel like I bought a Mac or something ๐Ÿ˜€
  5. It uses PC Man File Manager which is super fast!

What I didn’t like about Lubuntu:

  1. It looks a bit “old”. Well .. I can’t say much cause I’m using DWM (that’s the first package I installed!) but when I logged in the first time on that Openbox window manager it looked a bit “old”. But it’s ok. If you want to run it on a weaker machine it’s definitely a good option (although I would recommend DWM if you are a coder like me).
  2. Doesn’t come with Open Office (or Libre Office). It has of course Abiword & Gnumeric installed but I’m not sure how feature-full these programs are. Time will show. For now a couple of CSV files I opened worked fine. I wont install Libre Office for now until I really need it.

That’s it about Lubuntu. I’m not super excited about it but I’ll keep it on my PC. The main reason is because I’m using DWM as window manager and Lubuntu offers me PCMan file manager which is super quick & properly configured (icons show correctly etc).

On my previous Ubuntu installation I gave a try toย Thunar (another lightweight file manager) but icons weren’t showing properly. Now with Lubuntu & PCMan everything works like a charm!

Ok .. back to work ..

xargs vs parallel

Have you ever used xargs on linux? Did you ever get frustrated that it doesn’t work very well with the find command?

What do I mean?

Let’s assume we have a list of .csv (1.csv .. 5.csv) files in a directory and we run the following command:

find ./ -name "*.csv" | xargs echo

Then we would expect that for each filename it would run the echo command. But it doesn’t! Instead it returns us:

./1.csv ./2.csv ./3.csv ./4.csv ./5.csv

Apparently it calls echo only once passing it all the filenames.

There is a way to fix this problem by telling the find command to add a 0 (NULL character at the end of each filename & then tell xargs to accept those zeros as delimiter) but it’s not very elegant and it’s easy to forget:

find ./ -name "*.csv" -print0 | xargs -0 echo

Well today I discovered on stackoverflow a comment about the parallel command:

find ./ -name "*.csv" | parallel echo

The parallel command does exactly the same thing as xargs (but instead it properly handles results of the find command) and in addition to that it executes each argument in parallel! Depending on how many processors you have on your machine, the faster it will execute!

This is particularly handy when you are doing lots of uploads (that’s what I was doing today).

Note:ย You might need to install the parallel command on your machine (on ubuntu you can do it with sudo apt-get install parallel)

Finally my first blog entry!

It has been sometime already that I wanted to start blogging about my adventures in the coderland! There were many occasions that I wanted to share what I discovered (nice linux commands, nice code, nice libraries or frameworks etc) but I was always postponing it. Why?

Well .. I wanted to create my own blog! I mean .. code it! As a proud developer I couldn’t just use WordPress (like I did now). But as the time passed by I realised that I’ll never code that awesome blog I was dreaming about so I should better start writing something before it’s too late! Too late for what? Well .. you know .. you forget all those nice things you wanted to share with others. And it’s a pitty ๐Ÿ™‚

Ok! Welcome to my blog! I welcome myself too! ๐Ÿ˜€

Hope you’ll enjoy my future entries!

And I hope I wont get back to that stupid idea of creating my own blog & stop writing here.

See you!