Archive | How-To RSS for this section

How to Change your Computer Name in (K)Ubuntu

Change my hostname in Ubuntu?

Easy.

That is.

Simply replace the name in your /etc/hostname file as superuser (sudo) and save the file, as tech-recipes.com tells us.

Or:

gksu gedit /etc/hostname

As pie.

To see the change, restart your system.

EXTRA TIDBIT: Remember that gksu is the same as sudo, but it is the recommended command to use for graphical programs. In this case, gedit (Gnome’s Text Editor). Sudo is best suited for terminals, or command-line. You could have also typed in gksudo, but that is the same thing: it’s a symlink to gksu. And in KDE, you could have used kdesu (KDE SuperUser).

How to Reset Ubuntu/Gnome Settings to Defaults without Re-installing

As a new user, there comes a time (or there will come a time) when you are playing around with Ubuntu/Gnome, trying different themes, different engines, different window managers, etc, and all of a sudden you run into a problem that you can’t seem to find a way to fix it.

Computer FrustrationMaybe some of your customized settings are causing your gnome-panel to crash all the time or causing your windows and applications to look ugly, even having window buttons (close, minimize) disappear. You start Googling and spending a lot of time – sometimes days – trying to find how you can fix it.

You are frustrated (sometimes hitting your monitor/tower yelling some vulgarities at it as if it understands and you will kill it if it doesn’t fix it… there’s no Valentine’s love there, that’s for sure) and are ready to go back to Microsoft Windows.

But wait!

You keep thinking, “I wish I could just reset it back to its defaults, like a clean install, without losing all my applications and data.”

Well, you’re in luck. There is a way to reset your Desktop settings back to their defaults. If you keep in mind that everything in Linux is a file, all of its settings are files. All of Gnome’s customizations are located in their own specific folders. And these settings are user specific; they are in your Home folder. If you would create another user and log in with that user, you wouldn’t have any of the problems you are having in your own account. If you remove all these folders, you essentially remove all the settings. Therefore, we will remove the folders needed to reset Ubuntu/Gnome back to its defaults.

UPDATE (2008.01.30): Keep in mind that this will only reset your Gnome-specific settings. If you are having problems with your video card, display, x-server, etc., this WILL NOT fix your problems.

If you don’t have access to your graphical (GUI) desktop to delete these folders in Nautilus or you’re stuck at the login screen, drop to a terminal by hitting CTRL + ALT + F1, login to your account, and run this command:

rm -rf .gnome .gnome2 .gconf .gconfd .metacity

Get back to your GUI desktop by hitting CTRL + ALT + F7.

Login and VOILÀ! Just like the first time you ever logged into your Gnome desktop.

Linux Shell Scripting for Idiots

Oooh… he makes it look so easy! The thing is, it is easy. 😮

Blessen Cherian, CTO and Executive Team Member of bobcares.com writes:

“Shell scripting is nothing but a group of commands put together and executed one after another in a sequential way. Let’s start by mentioning the steps to write and execute a shell script.”

He then goes into step-by-step instructions on creating a script in a way that any idiot can understand! 🙂

Cherian says, “This is just the first part of my article on shell scripting. The Advanced Part … will be published soon.”

I’m an idiot, so this will definitely help me! 😀