Excel Quick Tip: Counting occurrences of a character in a cell

I found an interesting problem recently. We have a shared google docs at work for folks to sign up for hobby clubs. The idea was people to sign up against clubs by adding their names in a cell.

In the next week or so, the docs was filled with names and I wondered if there was a cool way to count the people who had signed up, using a simple formulae.

So here is the solution, which works both in excel and google docs.

Since each name is separated by a single comma (,)  the total number of people signed up is the count of Commas in a cell + 1.

In the above example, I want to count the , in column B. In the next cell, type this formula

C2  =LEN(B2)-LEN(SUBSTITUTE(B2,",","")) + 1

Let me explain how this works. As the name suggests, Substitute replaces a certain text/character ( in our case ,)within a string, with something else. Trick is to replace it with empty string (notice nothing between the last double quotes), and count length of strings before and after. So if there are 5 commas, Substitute returns a string 5 characters shorter, and that's what we want. Pretty easy right!

Hope you learnt something new today. Happy number crunching!

Excel Quick Tip: Finding Year and Quarter from dates

I deal with huge data around dates all the time.  Be it daily revenue, volume or activities. Though daily data is interesting,  we often need to aggregate data into weeks, months or quarters, to see trends, forecast projections and track them against targets.

Here is a quick tip on getting you the year, month, quarter and weeks from a given date. Read on.

The formula is quite simple.
Year= Year(A2) 
Month= Month(A2) 
WeekOfYear= WEEKNUM(A2)

Formula for Quarter and Sem Annual labels are bit tricky.
Quarter = "Q"&INT((MONTH(A2)-1)/3+1)
Month ="H"&INT((MONTH(A5)-1)/6+1) 

Simple. Isn't it. Here is another tip. When you press Control + ~ (tilde), all the formulas on your sheets will be visible. Press the same combination to turn this off.  Happy Excel Crunching!

How To: Test driving Windows 8 on Virtual Box

Are you curious, what the next iteration of Windows has in store for you.
Windows 8 developer preview is now available for download. Head over to MSDN and give it a try. Virtual Box is a great free cross-platform Virtualization application which is easy to set up and lets you run different OS instances in parallel.

Below instructions are for Virtual Box on Windows 7, but should also work for Linux/MacOSX
1. Download and Install Virtual Box for your specific platform (Win/Linux/OSX)
2. Download the Windows 8 developer preview from MSDN. You can chose 32-bit/64-bit w/o Developer tools
3. Open Virtual Box, and  click on New. You will be greeted with a VM set up screen. Give it a name and select Windows 7 (32/64bit) as OS


4. In the later screens, allocate 10-20GB (or lower) for the VM and chose dynamic expansion. This takes shorter time to set up and Virtual Box will dynamically increase the VM space as when needed to a maximum of the earlier chosen capacity.

5. Once the VM set up is done. From the Virtual Box home screen, select the VM and click Run. The first time, you would be greeted with a First Run Wizard. Select the Windows 8 Developer Preview file you just downloaded (*.iso file).

6. The VM would now boot with the iso, and Windows Installation process would begin. To switch controls back to your desktop OS, press Right Control in Windows.

7. Follow the instructions on-screen. Chose Custom (Advanced) as the type of installation.

8. That’s it. Wait patiently for 25-35 mins for the setup to complete. Once done, the VM will restart and you voila, you are right inside the new Metro UI. Do note, it’s a developer preview and could have loads of bugs and issues Smile Enjoy!

Windows 8

9. Some helpful tips
1. Use windows key to switch to the start metro menu
2. Change windows 8 screen resolution (default on VM is 800x600)
3. Live tiles don’t work on a local Administrative account. Create a test user account to get the Metro Apps/Tiles working
4. Right Control-C to pass control back from the VM window

Removing IT Policy from your old office blackberry

Note: The following instructions is for information purpose only. You could be violating your corporate security policies by applying it on your active blackberry

So you have an old decommissioned blackberry, and you would like to use it as a spare phone. Follow the below instructions to set your blackberry "free"

1. Ensure Blackberry Desktop Manager is installed. You can download it from the bb website or from here.

2. Select the Blackberry internet service option while installing the Desktop manager

3. Take a backup (if needed) and Wipe your blackberry device from Options > Security Options> SecurityWipe on the device. Or entering a wrong password 6 times.

4. Now Connect your device, Start the desktop manager and select Application Loader. In the background, some configuration and registry entries will be created.

5. Now close the desktop manager and eject your device. Download this policy.bin file and save it in your blackberry desktop manager installation folder. This is a bare minimum policy file with minimal restrictions.
 In our example, we have installed it in D:\downloads\software\blackberry\install

6. Go to Run, and type "Regedit" to Open Registry editor. In the tree on the left side, Navigate to HKEY_Current_Users\Software\Research In Motion\BlackBerry\PolicyManager

7. Right-Click the Policy Manager Folder and select New/String Value. Name the value "Path". Now, Double-Click the Path Subkey and set Value Data to the location of the policy file.

eg. D:\downloads\software\blackberry\install\policy.bin

8. Now open the desktop manager and connect the device. The new policy settings will be applied automatically. Go back to your device and check if the IT policies have been cleared.

Congrats! Your blackberry has been officially restored. You can now install 3rd party apps, access data/voice which your company's policies might have blocked, and start using it as a normal smartphone.

Credit: Crackberry Forums

Sending a mass email to your facebook friend list, the excel-lent way!

Notes: Export contacts from facebook

Facebook is a great tool to connect with people. However, there are times when it get's really frustrating.

The other day, I wanted to drop a mass mail to all my friends in Singapore. So I went to the messaging system, tried to enter "Singapore", hoping facebook would be smart enough to populate the To-List with all my contacts with current city as Singapore.

Alas, it didn't happen. Perhaps I was expecting a lot. So the next thing I did was create a friend list, manually choosing all the people I knew who still lived in Singapore, into it. The exercise took ~5-10 mins with around 200+ friends.

I went back to facebook messaging tool, composed a message, and added "Friends in Singapore" in the to list. Facebook identified it as a friend list, but prompted that I couldn't send a message to more than 20 friends.

I don't know why fb would think putting a limit of 20 on a message is smart. Anyways, I was losing patience. I remembered facebook announcing a data export tool, to export all your information -contacts, pictures etc. You can find it under account settings

However, since it exports everything in one go, it takes a while. And I wonder how big the zip file would be, since it contains all my fb activity since I first opened my account.

I had heard of a chrome extension that helps you do the same, but it has the same issues. I can't selectively export out a list. When you have 500+ friends on facebook, it's a pain to sort through the list again to identify folks you want to send your message to.

So this is what I finally did. Yahoo, (once a great email system) has a nifty contact import tool, which can pull contacts from facebook directly. It is fast, since it restricts itself to email ids only.

Once imported, you can't use yahoo to send emails to 200+ people. It will also give you a "too many contacts selected" error. Export your contacts out into CSV. Now the Excel Magic begins.

I went to my "Friends in Singapore" list I had created, dragged my mouse, selected all the names in the page, and copied them into my notepad. Went to excel and copied them again. Opened the contacts from the CSV into the next tab. Did a vlookup of the list against the entire contacts and extracted the names and their email ids. Took another 5 mins.

Wrote a small formula that added quotes, brackets and semicolons to each, to make it email friendly.

 Copied the entire column and pasted it directly into my gmail To list, and sent the message. Now after 15 mins of effort, which also included numerous failed attempts, I now have all my contacts in a small excel sheet, which can be used again for other purposes. I could have written a small script, but not this time.

People underestimate Microsoft Excel but it can do some really smart things, really quickly, if you only know how to use it :)

Do let me know if there are better ways to selectively export contacts in a list from facebook. Happy Surfing!

KDE4: Resolving Dolphin crashes & the Krusaders to our rescue

Here is a common issue in KDE4. Everything seems to work fine, and suddenly poof, Dolphin fails to load. It crashes with signal 6 ((SIGABRT).

Here is a quick tip. The fastest way to resolve Dolphin crashes in KDE4 is to do a clean re-install of the Dolphin package from your package manager. Unfortunately, this doesn't always work, as even after reinstalling or upgrading the Dolphin package, the error remains unresolved.The reason is that the configuration files are not cleared when you re-install, so we need to remove them manually.
This is what you need to do.

1.Remove/Uninstall Dolphin from your package manager.
2.Locate all the Dolphin configuration files on your system, and rename or delete them.

$ locate dolphin

$ rm -rf /home/anoj/.kde4/share/apps/dolphin

$ mv /var/lib/mandriva/kde4-profiles/common/share/config/dolphinrc /var/lib/mandriva/kde4-profiles/common/share/config/dolphinrc!

3.Now install the Dolphin package again.
4.Restart your machine (this one is optional but recommended)

Great, Dolphin is back.

Now, if you still can't fix it, then let's see what alternatives we have..
I personally use this really great KDE file manager called Krusader

Do drop me a note, if you have any other recommendations for other alternative file managers.

KDE4: Resolving the "call to lnusertemp failed" issue after adding new user

A strange thing happened the other day. I was adding a guest user to my pc using Mandriva's KDE4 control panel. I created the guest user and tried logging in back to my primary account.

KDE threw an error message "call to lnusertemp failed {temporary directories full?} and crashed back to the login screen.

I immediately went to my terminal 1 (ctrl + Alt + F1), logged in as root and typed in

$ df -h
/dev/sda1 33G 5.3G 26G 18% /
/dev/sda2 19G 17G 2.9G 85% /media/hd

And I could see I had over 26 GB of free space left. I decided to check the permission of my home directory, just in case..

$ ls -sl /home
4 drwx--x--x 39 guest guest 4096 2008-10-03 00:35 anoj/
4 drwxr-xr-x 23 guest guest 4096 2008-10-03 00:16 guest -> anoj

Strangely, Kde seemed to have assigned ownership of my home to the guest user. I assigned the ownership back to my primary "anoj" user.

$ cd /home
$ chown -R anoj anoj

Deleted the symbolic link for the "guest" home directory and created a new directory "guest"

$ rm guest
$ mkdir guest
$ chown guest guest

And I tried logging in as "anoj" and Voila!, I was back in my familiar KDE environment.

Quick Tip: Downloading videos off MegaVideo

MegaVideo probably has the best collection of videos amongst youtube, veoh and dailymotion. Though some are not legal and violate copy protection laws, so I leave it to the end-user's discretion on how they wish to use it.

Here is a quick tip of downloading videos from Megavideo. Go to ClipGrabber, paste the url and voila, the downloadable lik is ready.

Happy surfing!

Living a life without a Hard Disk

Life without a hard disk is tough.. but fun in many ways..

I have a knack of crashing hard disks, and I really can't help it. Every 10 months, my hard disk crashes, and then my vendor replaces it, thanks to the warranty. It has almost become a routine now.
Recently, my hard disk device controller failed, and I couldn't access my hd anymore. I had seen this coming (yeah 10 months up), and had backed up all important data. But, then I was too busy and couldn't afford the latency time for the hd replacement. So I chose to live a few days without a hard disk.

Here is what you could do, to keep working on your computer:

1. Get your hd replaced. Lucky, if it's under warranty. Bad if it ain't. Plus, the time to get it replaced.

2. Live on a Live CD. It's cool, runs everything but a tad bit slow. It's not persistent, so all settings lost, each time you run.

3. Live on a portable Linux on your USB mem stick. Super cool. Runs on all shapes and sizes. Small. portable. cheap.

4. Live on an OS installed on your external USB hard disk. Awesome. Not as fast as your IDE or SATA Hd, but hey, an entire complete OS..amazing. But a little expensive if you don't already own one.

Now, I chose an USB memory stick for 2 reasons, it's small and it's decently fast. If you visit pendriveLinux.com, you would find some really cool ways to install any Linux distro onto your trusty thumbdrive. Even though I am a regular ubuntu user, I tried their own PendriveLinux2008 which is derived from MCNLive (A Mandriva flavour)

The beauty of this entire distro is persistent loop, that saves all changes back to the usb drive. Simply put, it's a writable live cd. Strangely, I really love the distro. Beryl/Compiz comes preinstalled along with all the usual tools. You could install more apps if space permits. Plug the disk on any PC and you can use the OS and all your favorite applications. I am not writing a post showing you how to do this, as the pendrivelinux site has nice comprehensive instructions.

FYI, I used Ubuntu 7.10 live cd to access the internet, download the OS and install it onto my usb flash drive. An important tip, sometimes you may need Lilo/grub incase your MBR (boot records) of your flash drive are messed up. It's very easy. Boot in with the live cd of any distro. Install the OS onto your flash drive (as mentioned on pendrivelinux). Run these in the terminal.

$ sudo apt-get install lilo
$ lilo -M /dev/sdx

where sdx is your flash drive.. run fdisk -l to discover it.

If you need any instructions, do email me to write one for you. It's really that simple ;)
Here is Pendrive Linux in it's full glory!

Ubuntu: Twittering from the command line

I found this neat post in Hackszine recently. It shows a cool way of posting to twitter from your command line.

1.Let us convert it into a shell script. Open your favorite editor and create a file called twitter and enter these in it. (replace username and password with yours)

curl -u username:password -d status="$1" http://twitter.com/statuses/update.xml

2. Save the file and change the permission
$ sudo chmod u+x twitter

3. Now, let us try our cool twitter script
$ ./twitter "shell twitter script is up and running"

If you don't have curl, you'll need to get it via apt. It's simple..

$ sudo apt-get install curl

Once the twitter script finishes sending the post, it sends back an acknowledgment in form of an xml response with your account details.

Hope you had fun experimenting with twitter, I definitely did ;)

New Invisible feature in gChat

Gtalk is my favorite IM client. I simply love its clean, light and unclutted interface. One complaint I really have from the folks at google is their constant refusal to release a linux version of their client. They want us to use variants like Pidgin( previously, Gaim) and Kopete, but none of these clients support voice and file transfer that the gtalk desktop client for windows offers.

Gmail's gChat is a killer tool for people who either don't have the gTalk desktop client or hate to use Pidgin or Kopete on linux.
Recently, I found the invisible mode in the status and it works wonderfully well. It still doesn't feature in the desktop client so not many of your friends wouldn't know you are secretly snooping on them staying invisibe ;)

Here is the screenshot...

KDE4 : Removing the annoying Konsole beeps

In KDE3 console, the beeps could be disabled from Settings > Bell.
Strangely, I couldn't find any such option in the new KDE4 Konsole.
It has tonnes of new features, but the bell option is hidden somewhere. Let us see how to disable it.

You could start with the following commands
xset b off

setterm -blength 0

If nothing works, best is to switch off the bell from the your profile's inputrc file.
echo 'set bell-style none' >> ~/.inputrc

Great!! Another annoyance solved. Enjoy using KDE 4.

PS: To all the fanatics who are criticizing KDE 4, be patient and give them more time. I bet it's gonna be awesome when KDE 4.1 comes out.

[Src: Debian-Admin ]

Ubuntu: Encoding video files

So you have an iPod/Phone or some other poratable media player and you want to encode your huge avi/dvd/mpeg flicks into the formats these devices support.
There are tonnes of easy to use encoders for Windows. For Linux, let us look at some great alternatives...

MEncoder and ffmpeg are the two common encoders. Both of them use the libavcodec and support a decent list of output containers.

To encode DVDs, try AcidRip which is a gtk frontend to MEncoder.

Check out their websites for more instruction on how to go about using them.
For instructions on encoding to video iPod, go here

Here are some examples using MEncoder

apt-get install MEncoder

Mencoder - input to 15fps 320x240 avi/mp3 (phones)
mencoder <input> -ofps 15 -vf expand=:::::4/3,scale=320:240 -ovc xvid -xvidencopts bitrate=150:profile=sp2 -oac mp3lame -lameopts cbr:br=96 -o <output.avi>

avi to flv
mencoder <input.avi> -o <output.flv> -of lavf -oac mp3lame -lameopts abr:br=56 -srate 22050 -ovc lavc -lavcopts vcodec=flv:vbitrate=500:mbd=2:mv0:trell:v4mv:cbp:last_pred=3

[img src: Zoran]

Linux for Absolute Beginers : Resizing NTFS partiton

It is a way lot easier to install linux if you have a fresh system. Then you can easily create all the partitions and file systems that you need and install you various OSs on them.
Problem is, generally vendors ship their PCs with a single ntfs partition containing WinXP. Now, when you try to install linux using the free space on this partition, you will need some extra steps before you can really start off.
Irony is that WinXP doesn't ship with any free partition resizing tool. Other variants like Partition magic are too expensive. New users are generally turned off by this initial hurdle.

Here let me show you an easy way to resize your existing NTFS partition and create new partitions to install Ubuntu or any other linux distro on them.

Disclaimer: I don't take responsibilty of any sorts for whatsoever damage that might be caused by following these instructions. Backup all your important docs from the ntfs partition and defrag it before proceeding.
Tools we need: 1 Ubuntu/Linux distro live CD, internet, 1 diet coke

1. Boot your system via the Live CD
2. Locate Terminal (Accessories menu or alt + F2 > xterm)
3. Install ntfsprogs
$ sudo apt-get install ntfsprogs

4. Install gParted
$ sudo apt-get install gparted

5. Run fdisk to locate your ntfs partition (/dev/sda2 in my case)
$ fdisk -l

6. Make sure the ntfs partition is umounted (replace sda2 with your drive)
$ umount /dev/sda2

7. Run gParted
$ gparted

8. Select the ntfs partition and click on "resize"

9. In the resize dialog, move the slider to the left to reduce the existing size

10. Now with your recovered space, create new partitions. Select the free space and click on "new"

11. Typically, you would need 2 partitions. 1 ext2/ext3 primary partition for the "/" and 1 swap. Swap partition should be atmost 2 * your Ram.
Once you have created these 2 partitions, you are ready to roll. Start your linux installation as usual and select these partitions to install your linux and set as swap respectively. You can create additional partition for "/home" etc.
Do rember to check the "/" label partition as primary.

12. Click "apply" to commit your changes. Sit back, drink your coke and wait for the resizing to complete.

If you want to try a non-gui approach, use ntfsresize that comes with the ntfsprogs package. Read this for more details - Resize NTFS partition using ntfstools on Ubuntu Linux Live CD

Ubuntu Annoyances: Filesystem check after every 30 boot ups

Ubuntu forces drives to be checked once for every 30 times (default) the filesystem is mounted. This means that on an average, once every 30 bootups, the filesystem integrity is checked. Sometimes it takes minutes to complete this scan and the end-user is left waiting for the process to complete.

It is even more annoying when you are supposed to give a presentation and it takes your laptop ages to boot. Let's see how to get rid of this minor annoyance.

There are a couple of ways to do this

1. Enable/Disable file system integrity check for the next bootup,
Enable check
$sudo touch /forcefsck

Disable check
$sudo touch /fastboot

2. The above files are deleted after every boot up. For a more persistent solution, let us change the frequency of the checks. (ext2 and ext3 only)

Change the max-boot count to 600 boots (replace sda1. Hint: fdisk -l)
$sudo tune2fs -c 600 /dev/sda1

Change current count variable to 0
$sude tune2fs -C 0 /dev/hda1

Nice! You can relax now for 600 more boot ups. I would suggest keeping it at around 100 as it is always good to check the system integrity once in a while. For a more permanent solution, check AutoFsck

Ubuntu Gutsy: Synchronizing Google Calendar with your Nokia phones using opensync on bluetooth

This is a follow up on my older post - Synchronising your calendars with google Calendar, where I described an easy way to sync your phone calendar with your remote google calendar. Quite a lot of folks wanted an alternate way. An ability to sync over bluetooth or usb, when your phone has no access to internet.

Note: This was tested in Gnome using the gnome bluetooth libraries.
For simplicity, let me break down the process into some discrete steps.

StepA: Installing bluetooth libraries

1. Get the gnome-bluetooth library using apt
sudo apt-get install gnome-bluetooth

2. Restart bluetooth
sudo /etc/init.d/bluetooth restart

StepB: Pairing your phone with your laptop

1. Pairing is really really important. Don't proceed to next step without completing this.

2. In your linux pc, check if you can discover your phone
sudo hcitool scan

A six octet number like (00:12:D2:2E:22:1E), which is the MAC address of your phone will be displayed. Note it down somewhere.

3.Change hcid.conf option
sudo gedit /etc/hcid.conf

and replace security user; to security auto;
4. You can also specify a PIN no. if you want

5. Restart bluetooth services

6. Now,In your phone, go to your bluetooth settings > Paired devices. Add a new paired devices (your PC) and set it as authorized. It might prompt you for a PIN if you had specified it earlier.

7. Now verify if the pairing works. (Type this in terminal as normal user)
nautilus obex://

You should now be able to browse your phone.

StepC: Getting the opensync libraries

1.Add following repositories to /etc/apt/sources.list:
sudo /etc/apt/sources.list

and add these lines to the file
deb http://opensync.gforge.punktart.de/repo/opensync-0.21/ feisty main
deb-src http://opensync.gforge.punktart.de/repo/opensync-0.21/ feisty main

2. Add the keys to the repo by typing these in the command line
gpg --keyserver hkp://subkeys.pgp.net/ --recv-keys CB210090B029CB84
gpg --export CB210090B029CB84 | sudo apt-key add -

3. Get the packages using apt
sudo apt-get install opensyncutils opensync-plugin-evolution opensync-plugin-syncml opensync-plugin-google* multisync-tools multisync0.90

StepD: Creating new sync profile on your phone

1. Go to Menu > Connectivity > Sync (depending on your phone)

2. Select Options > New Sync profile. This will create a new sync profile similar to the PC Suite profile.

3. Edit this new sync profile similar to this :

Sync profile name: PC

Applications > Just select Calendar

Connection settings >
Server version: 1.1
Data bearer: bluetooth
Host Address: PC
Username : None
Password: None
Allow Sync requests: Yes
Accept Sync requests: Yes

4. Remember the profile name.

StepE: Finding your Nokia SyncML Server channel number

1. Use the sdptool to discover services and their channel numbers.
sdptool browse | grep more

2.This is what I get.

Service Name: Nokia SyncML Server
Service RecHandle: 0x1000a
Service Class ID List:
UUID 128: 00005601-0000-1000-8000-0002ee000001
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 13
"OBEX" (0x0008)
Language Base Attr List:
code_ISO639: 0x454e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"" (0x00005601-0000-1000-8000-0002ee000001)
Version: 0x0100

3. Note the channel number, (13 in this case)

StepF: Configuring multisync

1. Launch multisync

2. Create a new group, say NokiaGCal (click on add)

3. Click on edit and add google-calendar and syncml-obex-client as members to this group. They should be visible if all packages have been installed correctly in previous step.

4. Edit the settings for the google-calenar by replacing USER with your google username and Password with your google account password. (note. there are 2 USER tokens and 1 password token that need to be replaced)

5. Edit the syncml-obex-client settings as follows

<?xml version="1.0"?>
<!-- (Only for bluetooth) The bluetooth address if the bluetooth mode is selected -->

<!-- (Only for bluetooth) The bluetooth channel to use. `sdptool browse $MAC` to search for the correct channel -->

<!-- (Only for USB) The usb interface number of the SYNCML-SYNC target. use syncml-obex-client -u (you will need access to the USB raw device) to find it. -->

<!-- The string that the plugin will use to identify itself. Some devices need a special string here. -->

<!-- The syncml version to use: 0 for 1.0, 1 for 1.1 and 2 for 1.2 -->

<!-- if the plugin should use wbxml -->

<!-- The username to use. Leave empty to not require a username -->

<!-- the password for the username -->

<!-- sets the connection type to use. 5 means obex over usb, 2 means obex over bluetooth -->

<!-- If wbxml is enabled, defines wether the wbxml should use string tables -->

<!-- Never send ADD command, but send REPLACE (not needed normally) -->

<!-- Workaround around for mobile phones which only use local timestamps and _no_ UTC timestamps! -->

<!-- Sets the maximum allowed size in bytes of incoming messages (some device need this option set). Example: 10000 -->


<!-- The name of the contacts db. Must be the same as the phones sends -->

<!-- The name of the calendar db. Must be the same as the phones sends -->

<!-- The name of the note db. Must be the same as the phones sends -->

6. Replace the bluetooth and channel tags with your bluetooth MAC address and channel as discovered in previous steps.

StepG: Finally time to sync

1. Click on refresh against your group to start the sync.

2. If all goes well all your contacts are now syncronized with your google calendar.

Passing Remarks

Phew...Long article. Long process. But this is the basics of syncing a lot of stuff with your phone and other devices. Now you should be able to do an on the fly sync with google calendar using your laptops bluetooth for your phone. You can also sync evolution, sunbird/thunderbird etc contacts and calendar using the relevant plugins
Some other articles to help you..


Linux sudo tip : Creating a new super user with admin rights in Linux

Before all you linux fanatics start shooting at me for misusing sudo in this article, let me make a confession here. More than once I have felt the need for multiple accounts with root like privileges and it is really painful to understand and modify sudo for this simple purpose. It is not a unique issue, especially new users who have just migrated from the world of Windows. We are so used to administrative and debugger privileges.

Here I'll show you a quick way to create a new superuser who has almost all rights as the root and you don't really need to understand how sudo works.

1. Let us start. Let us create a new user called root2 first
useradd root2
passwd root2

2. Next stept. If you guessed that it has something to do with modifying sudoers file, you are right.
Modify /etc/sudoers using the visudo which is a sudoers file editor and syntax checker.

sudo visudo

2.Go down to the line # User privilege specification‘ You should see root ALL=(ALL) ALL

and add this line after that
root2 ALL=(ALL) ALL

3. Next, you need to add around 50 lines of code. Nah, just kidding. You are done.
Restart and test your power. Now you can sudo and run anything without the need for the root password or any explicit permission.

4. Please do note, with great powers comes great responsibilities. There is a reason why Linux has the concept of root. If you have more time, I would suggest reading the following article to get more finer control on restricting access of specific commands to users and groups.

For more details on sudo: Do look at this article

Disappearing Panel in KDE 4

KDE 4.0 is still buggy. Plasma crashes a lot and quite surprisingly the applications panel disappears. No worries, let me show you how to bring the panel back.

1. First, kill/close the plasma process. One easy way is to cntrl + escape, search for plasma and kill it.

2. Your desktop disappears. Press Alt + F2, to bring in the kicker and launch the terminal.

3. Delete the plasma configuration file and relaunch plasma
rm ~/.kde4/share/config/plasma*

2. Voila!! Panel is back.
Sad part is you need to reconfigure your desktop, icons and widgets.

PS: Do read the Emergency release notes FAQ and the KDE 4 visual guide