In this post I'll show you how to rename you user account with example on Ubuntu Linux operating system. I did this the other day because I didn't like user name i gave to the Ubuntu installer, so i wanted to rename my account together with my home folder and all that goes with doing so...
First i have created temporary user account and joined it to the admin group. You can't mess with users account while being logged in to it (enabling root account on Ubuntu looked too messy). This is how to create user (remember the password you gave to adduser cause you'll need it to log in to your temp account):
sudo adduser temp
sudo adduser temp admin
Now we shall logout and log in as temp user but not using GUI way, instead we will use virtual terminal to do our magic. You should grab pen and paper (photographic memory should help also) to write down this procedure cause there is no GUI where we are headed.
Now restart your PC and when prompted for login press Ctrl+Alt+F1. On the virtual console tty1 log in with you temp user name and password you have provided to adduser command. Now enter these lines one by one replacing "oldname" and "newname" with what you have now and what you want to have after this is over.
sudo usermod -l newname -d /home/newname -m oldname
sudo groupmod -n newname oldname
sudo chown -R newname:newname /home/newname
sudo deluser temp
Some applications hardcode your home path in recent files and stuff like that (by the way that is very bad practice, people should use $HOME variable or something similar instead of hardcoding /home/username). Those hardcoded links wont work anymore because user name has changed. To track down those applications you could run something like following to find files in your home directory that contain old path string.
grep "home/oldname" -R .*
Now update all files with your new home path and be on your way (Gedit : Search -> Replace). On my system only Virtualbox files had to be changed. That is it. Cheers!
Very often I need to print output of man page or save it to PDF, and I need results fast so I can continue debugging my application or whatever I am doing that needed me to browse man pages. If you want to print shell command output you obviously need working printer or if you want to create PDFs you need cups-pdf package(on Debian based distros use apt-get install cups-pdf as root or with prefix "sudo" if you are Ubuntu derivative user). As an example I will print to PDF ls shell command output:
If you are printing to real printer you would use its name instead of "PDF". Lets do the same thing with my printer named "ML-1620":
man -t 1 ls | lpr -P ML-1610
To print to default printer you just omit -P switch altogether like this.
Some applications exhibit strange behavior on latest Ubuntu Maverick. They show no menus. Applications I have discovered are Filezilla, Audacity, Codeblocks and Adobe Acrobat Reader 9.x when user has more than two pdfs open. This usually happens when user tries to install Canonical Unity thing, and because it is very unstable when installed from Maverick repositories, troubles follow along with its installation. Fix you ask? Here it is...
You must remove appmenu-gtk package. I haven't discovered any loss of functionality doing so. Appmenu thing will probably be used in next Ubuntu version for global menu thing in Unity enviroment. For Ubuntu 10.10 i see no reason for leaving in on your system except if you don't like menu bar in your apps. Just put this in your terminal and be on your way:
sudo apt-get remove appmenu-gtk
If you have any problems with this quick fix you can leave anonymous comment by clicking on the "comments" link in the upper right corner of this article.
Some Logitech web-cams have serious problems all of the last kernel revisions (somewhere since 2.6.26 kernel revision). Sometimes when user starts its Linux OS things with web-cam go bad. Symptoms are "Waiting for sound system to respond" when clicking at the sound icon in system tray and ton of "cannot set freq 16000 to ep 0x86" in your /var/log/kern.log. What solves this problem when this occurs is removing snd-usb-audio kernel module from kernel and plugging it back. Cause of this bug is still unknown, and some say it is a bug in some Logitech webcam firmwares which gets triggered by something in Linux boot process. Lets work around it on Debian, Ubuntu and its derivatives...
Last week I've stumbled upon this article with the title "The Cost Of Running Compiz" that bashes Compiz Fusion for killing Linux gamers (is this oxymoron or what?) frame rates. Doctor is in the house. Read on...
It would be ideal that you can have Compiz with ton of eye candy and glitch free 3D games. We know that doesn't work. But instead wouldn't it be possible to have our eye candy Compiz disabled while gaming and re enabled when returned to desktop? Sure. Peace of cake. Here's the idea and the steps to do so...