Turning off/on display via cli/bash

This little script will help you to understand how to use xrandr to enable, disable and configure your second Display via bash:



BASECMD="xrandr --auto --output $SECOND"

MODE="--mode 1920x1080"
DIRECTION="--right-of $FIRST"
ROTATE="--rotate left"

function off() {

function on() {

function usage() {
  echo "usage: $(basename $0) on|off"

case "$1" in
  on)   on 
  off)  off 
  *)    usage

Enjoy! 🙂

A smart way to use /tmp

I always loved use tmp directory to manage my “temporary files”. First of all, which files can be considered as “temporary”, and what does temporary exactly means? Well.. In my opinion, we can address as temporary all those files used only during a single Session. Such as:

  • files downloaded from browser – typically “to take a look or a single read”, they will never be opened again.
  • “text_files / notes / drafts / patches / etc..” – bound to be sent by email (and never used again).
  • “apt-get source” – do you use it? 🙂
  • many more … (pictures, samples, songs, backgrounds, code_branches, videos…)

If you use the standard $HOME/Downloads (or the Desktop, or Home or whatever_you_use) directory to locate all those files, you already know which kind of mess will be there in few days, unless you do not spend part of your time to delete those files no longer used. Looking for a solution to this I figured out that set /tmp directory (not really, but think about that) as my Download directory can be a good choice… It will be cleaned to each boot, so I can take no interest about files I download during a Session – and store only those I consider “important”, by moving to my “Downloads” (or “Documents”) directory. It can work, no? No. In fact that’s not all. I also love mount /tmp in Ram in order to speed up a bit the system… And place my downloads in /tmp can be dangerous for the system –  sometimes downloaded files can be bigger than we expect (try to think to a 20MB pdf). So, one of the best way (in my opinion) to have a clean “downloads” directory is create a local ~/tmp directory and use it as the default download directory for my Desktop and in the following lines I will show you how set it up.

Let’s start with mount /tmp in Ram, edit your /etc/fstab appending the lines below:

# RAM Disks
tmpfs /tmp tmpfs defaults 0 0

Next step, create a ~/tmp directory (or wherever you prefer) and set it as Downloads directory:

mkdir ~/tmp
xdg-user-dirs-update --set DOWNLOAD ~/tmp

Now create a script able to clean the directory to each login. I choose a file named ~/.initrc (you can use it to launch other applications, like conky). Use your preferred editor and insert the following lines:

# Clean tmp dir:
find $HOME/tmp -mindepth 1 -delete &

Save the file and link it into yourStartup Applications” (search it through Unity), I use the following:

That’s all. My simple way to have a clean Home directory.

Forum ubuntu-it gets a new theme and a new engine

Hi all,

after many many weeks working on forum.ubuntu-it.org, we finally done!

The forum for ubuntu-it.org has been migrated from SMF 1.X (MySQL) to PhpBB3 (PSQL). The entire work has taken more than one month, considering the huge data (almost 5GB database) to migrate.

The new theme is inspired to the ubuntu-it website and ubuntu design guidelines, hope you like it.


Thanks to #canonical-sysadmin to help me in tuning psql, apache, php, etc… PphBB3 (default) is not so fast with big forums as I expected.

HYM – Help you to merge

The idea is provide new (incoming) developers with a grafic tool that should be helpful during the merge operation.

I called it HYM (but suggestions are welcome!) and got a first approach using balsamiq. I would like to proceed following these steps:

  1. Show mockup and get feedbacks (in particular I would know if there were actions to remove/add/change at gui that developers usally do during merge)
  2. Apply feedbacks and create project in LP (with the maintainers group, all architects are welcome)
  3. Start modelling application using UML (specify, construct and document the artifacts)
  4. Call for feedbacks again about structure and choose which technologies will be used to deploy/develop application.
  5. Start development.

I don’t know if a tool like this one could be helpful to improve the development of Ubuntu. Considering I would like to know your thoughts about, I’m going to show you the mockup (step 1). Click on the image below (direct link) and please leave a feedback/suggestion:

Note that image could change in the next days.


Ubuntu is us all together

In the last weeks (as already posted in Ubuntu-it gets new website article) we redesigned ubuntu-it website in order to fall template into line with the new brand of Ubuntu.

While we were working on homepage, we asked ourself how to realize the concept of community and how mix it to the invitation to join us, all in a single image. The result was a “ubuntu” writing, collected with heads of planet.u.c and planet.u-it.org. The following image is in high resolution format (6000×1500) so you could print it (if you want) and show it during a party/meeting/or_similiar to convey the idea that ubuntu is made by me, by you, by your friends and your family, by us all together.


Perugia – DUCC-IT: Ubuntu-it and Debian-it community conference

Just a few words to greet you from Perugia (Italy).

We are here discussing translation, testing, packing, bug trianging and collaboration between Ubuntu and Debian with Stefano Zacchiroli (zack – DPL), Andrea Gasparini (gaspa – MOTU), Andrea Colangelo (warp10 – MOTU), Milo Casagrande (milo), Paolo Sammicheli (xdatap1), Flavia Weisghizzi (deindre), Silvia Bindelli (dolasilla), Luca Bruno (kaeso – DD), Andrea Mennucci (amennucc1 – DD) and many more…

Let’s HACK!