How to remove user name from MeMenu in Unity (Ubuntu Natty)

The newly released Ubuntu 11.04 (Natty Narwhal) features Unity shell interface which displays the current user name the top right of the panel (MeMenu) that adds a personalized feeling to desktop users.

However some users might not be comfortable to have their username appears on the computer screen, especially when they are working on a publicly accessible computer or when they do not want their username to appear on screenshots or screen-casts of their desktop.

So to remove the username, one only need to open a console, and run the following command:
gconftool -s /system/indicator/me/display –type int 0

Before

Before

After

Before

Alternatively, you can also choose to display your own fullname on MeMenu. You can do that by running the following command:
gconftool -s /system/indicator/me/display –type int 2

You return to the default setting of displaying your current username, by running:
gconftool -s /system/indicator/me/display –type int 1

.
.
.
[via Chicomonte]

Generate QR Code in Ubuntu Linux

You can easily generate QR Code under Ubuntu using the command line ‘qrencode’ package. In Ubuntu 11.04 Natty Narwhal, you can install qrencode using this command:

apt-get install qrencode

To generate QR Code image, you only need to run this command:
qrencode -l L -v 1 -o qrcode-test.png "Hello, World!"

QR Code is a form of 2 dimensional barcode which can store arbitary text data including URL, email or plain text. For more information, please refer to the QR Code Wikipedia Entry

Example Code: How to Send SMS from PHP (via Clickatell)

Hi there, due to popular demand (requests sent to my personal email – mypapit -at- gmail.com).

I decided to share my old post regarding my simple SendSMS php class which can help php developers to send SMS from their web application

[php]
require(‘SendSMS.php’);

$sendsms = new SendSMS(“username”,”password”,”HTTP POST API key”);

/* if the login return 0, means that login failed, you cant send sms after this */
if ( ($sendsms->login()) == 0 ) {
die( “failed”);
}

/*other wise, you can send sms using the simple send() call*/
$sendsms->send(“0132073011″,”can you receive this message? Hello there….”);

[/php]

Requirements
To use SendSMS class, you need:

That’s it.. contact me if you’ve more questions

Download SendSMS PHP class (version 0.5)
.
.
.

Restricting normal user account access on Ubuntu Server

Here’s a tip to restrict normal user account access so that common users may not be able to explore other directories beyond his/her own /home directory.

  • First you need to chmod all /home dir to 0700
  • Then, you need to set the default umask to 077, to do that, you ned to edit /etc/profile, and replace “umask 022” with “umask 077“.
  • Optionally, you can also update PAM configuration in /etc/pamd.d/common-session so that the line reads “pam_umask.so umask=077 usergroups

The tips has been adapted from – superuser.com