Archive | Tips and Tricks 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 Change the Color of Gnome Panel Text, Handles, Buttons, and More

An issue you will run into when customizing your Ubuntu/Gnome system and playing with themes is not having an easy way to change the color of your text and other aspects of your panels. The gnome-theme-manager applet doesn’t have those options, yet. Not being able to change the color is a problem when using transparency or dark themes; the default color for text is black.

But there *is* an easy way to change the color of your panels’ text, handles, window list button colors (hover, active, and normal), background, etc.

Don’t believe me? Brent Roosshowed us how last year . UPDATE: You can find instructions here: http://ubuntuforums.org/showthread.php?t=334747

Smart Quotes versus Straight QuotesMy only addition to his post is that you must change all the double-quotes when you paste the information to the file in your home folder by typing them in again. Why? Because WordPress’s format for quotes is to use smart quotes instead of straight quotes (see picture) and your changes won’t work if you don’t manually change them all to straight quotes.

Also, play around with the different options in that file by un-commenting the lines (removing the #) and changing the hex color code. You will find that you can change the colors for many different aspects of your panels. Just remember that you must do a ‘killall gnome-panel’ or use a “Refresh GUI” button every time you change and save the file.

You may also want to change the color of your tooltips.

Take a look at my Gnome Panels below (click to enlarge). I was able to change the text color from the default black so I can read it against my dark theme. By playing around with the other color options in the .gtkrc-2.0 file, I was also able to change the window list button hover color (Amarok) and the active color (The Gimp). The normal buttons (Kopete and Swiftfox) are simply from the theme itself, but they are changeable, too.  You can also see that my tooltip color was changed (Amarok).

Gnome Panel Color Changes

Subscribe to Linux FUD’s feed and never miss great tips like these again.

Add a “Refresh/Reload GUI” Button to your Gnome Panel

Your first thought when reading the title of this post is probably, “WTF? Why would I need that?” Gnome Black LogoWell, if you’re like me and you love customizing your Gnome system, you’ll know that during your customizations, you have to reload this and reload that for your new changes to take effect. Sometimes its simply because a change you did caused some problems and something didn’t load correctly. Whatever it is, most of the time it requires you to use the killall command in the terminal.

This is common enough for the Gnome panels and for Nautilus since it draws and handles the desktop by default. I was tired of pulling up a terminal window and typing in the killall commands to “refresh” my GUI or Desktop or repeating them if I had already ran them previously. Not that it takes that long to do. I just wanted a quick “button” I can click that will do it automatically.

So I did it myself. Not very complicated, really. Actually, it’s not complicated at all. 🙂

  1. Right-click the panel or drawer you want the button to be situated
  2. Select “Add to Panel…” and the “Add to Panel” window will open
  3. Click on the “Custom Application Launcher” at the top of the window
  4. In the Launcher Properties, select “Application in Terminal” as a Type
  5. Name it “Refresh GUI
  6. For the command, type in: “killall gnome-panel nautilus” without the quotes
  7. For the comment, type in: “Reloads the panels and the desktop (Nautilus).” or whatever you want. 😉
  8. Click on the “No icon” button and choose an icon of your choice.
  9. Click close and you’re done

Now, whenever you need to reload/refresh your Desktop, you can simply click on your brand-spanking new shiny button!

Did you remember to subscribe to Linux FUD?

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 Tool Highlight: Desktop Data Manager

Desktop Data Manager Clipboard HistoryI found this great utility for Gnome that I just can’t keep as a secret! 🙂 It is called the Desktop Data Manager and includes “a clipboard history for many different types of content” like text and images that sits in your notification area (system tray), and an application to take screenshots of a single window, a region of the screen, or the whole desktop. Being able to select the region of the screen is VERY important to me and it’s a huge time-saver.

The clipboard application is like Klipper, but for Gnome. Wickedly sweet!

Wow! This is the best Linux gem I’ve found in a while!

In Windows, I used a little old program called ClipCache Plus for years, which is also a clipboard extender that allows you to save ALL of your clipboard history. I couldn’t live without it. (By the way, they just recently released their first new version since 2003!) Migrating to Linux made it difficult to let go of ClipCache and Klipper doesn’t play well in Gnome. Desktop Data Manager has solved it and is even better than Klipper! It doesn’t hold ALL of your history — it has a user-specified limit — but it’s better than no history at all!

Screenshot ApplicationAnother thing I REALLY wanted ported to Linux is SnagIt by Techsmith. SnagIt, of course, is a screenshot application that does it all! It’s an amazing piece of software that allows you to take any kind of screenshot, add effects to it, add arrows, pointers, balloons, and so much more. Too much to list, and that’s not an exaggeration. This little gem doesn’t do all of this, it just captures regions or windows or entire screens, but it just makes it easier to send to Gimp for editing.

Desktop Data Manager is available as a .deb (Debian Packager), a .rpm (RedHat), and .tar.gz. Ubuntu users need to download the Debian Package (.deb file).

Get it now
and spread the news!


Digg!

How to Change the Color of your Tooltips

With all the customization fun I’ve been having with my Ubuntu Desktop, one thing kept bugging me. There isn’t an easy way to change the color of the tooltips. I think this is important to have a consistent color scheme throughout your desktop so I went to find a solution.

I found the answer on the Ubuntu Forums yet again, posted by mcduck.

UPDATE: This may also work in other distributions, not just Ubuntu, since it is a GTK setting.

UPDATE: This seems to only work in Ubuntu 6.10 or lower. People have reported that it does not work in Feisty Fawn (7.04).

Now, when changing the color of the tooltips, it’s important to note that this will change it for ALL themes.

To change the color of the tooltips, do this:

  1. gedit ~/.gtkrc-2.0
  2. Copy and paste the following lines in that file:

    style “tooltip” { bg[NORMAL] = “#FFFFFF” }
    widget “gtk-tooltips” style “tooltip”

  3. Change the Hex code (#FFFFFF) to whatever color you want.
  4. Save the file.
  5. Log out and log back in (or do a CTRL+BACKSPACE). You can probably just do a Desktop Refresh:

    killall nautilus gnome-panel

    …and it may work. I haven’t tested it, though.
    …TESTED: It works. NOTE: You’ll have to change ALL the smart quotes ” to regular quotes after you paste. Just delete them and type in the quotes again. Then do another killall nautilus gnome-panel. (2007.02.12)

Test it by placing your mouse over the Date and Time applet.

Enjoy!

Ubuntu Tool Highlight: StartUp-Manager – Configure GRUB and Usplash

While perusing the Ubuntu forums for a way to fix my disappeared bootup and shutdown usplash, I found this great new tool for Ubuntu 6.10 (Edgy) called StartUp-Manager or SUM.

StartUp-Manager Boot Options TabStartUp-Manager Appearance TabStartUp-Manager Security Tab

UPDATE (2007.02.12): Updated screenshots of the newest version of SUM can be found here.

SUM is a python-glade GUI tool for configuring the GRUB bootloader options, changing its appearance (like colors and background), and adding password protection to edit your GRUB menu.

SUM also allows you to configure your usplash and install new ones. This was great for me because I lost both the boot-up usplash and the shutdown usplash when I was trying to configure it. This fixed it in a cinch!

–> To download and install StartUp-Manager, download the DEB package attached to SUM’s official spot on the Ubuntu Forums here. UPDATE (2007.02.12): Homepage can be found here.

BUT A WORD OF CAUTION! It’s only for Ubuntu 6.10. It will NOT work with other Linux distributions!

The author warns:

If you are unlucky, this tool could make your system unable to start.
USE IT AT YOUR OWN RISK!

It is only tested with Ubuntu 6.10 (Edgy).
It might work with other versions of Ubuntu, but it is not recommended.

It will most certainly NOT work with any other Linux distro.
It will also most certianly NOT work with Ubuntu if anything else than the Ubuntu installer created your GRUB config files (ie some other distro is installed after Ubuntu and has overwritten the MBR).

Since my system is Ubuntu 6.10 (Edgy), I didn’t encounter any problems. All I had to do was install the deb file and that was it. No long installation process. Once installed, it can be accessed under System > Administration > StartUp-Manager.