Saturday, June 21, 2008

Get faster menus in ubuntu

Launch a new document in Mousepad and past this line into it:

gtk-menu-popup-delay = 0

Save the file in your home directory (the one that bears your name) under this name:

.gtkrc-2.0
The dot in front of the file name indicates that this is a hidden file. The next time you log in, the menus should be more responsive.


N.B:-Tested on dapper


see:- http://www.chinwong.com/index.php/site/article/ubuntu_speed_up_tips/

Friday, June 20, 2008

ubuntu quick reference






























apt-cache search

case insensitive search of the package database for the keyword given. the package names and descriptions are returned where that keyword is found


apt-cache stats

print statistics on all packages installed


apt-cache depends

print dependencies for a package,whether it is installed or not

Ex: apt-cache depends wine





apt-cache pkgnames

lists all packages installed on the system


apt-cache show

display the information about the software from the named package

Ex: apt-cache show wine



apt-get -d insttall

download the package only, placing it in /var/cache/apt/archives


apt-get autoclean

can be run any time to delete partially downloaded packages or packages no longer installed


apt-get clean

removes all the cached packages from /var/cache/apt/archives to free up disk space


apt-get --purge remove

remove the named package and all its configuration files remove --purge keyword to keep config files


apt-config -v

print version information of installed APT utilities


apt-key list

Lists gpg keys that APT knows about



















1. Prefix commands with sudo to run.
Ubuntu is a trademark of Canonical Ltd. Licensed under CC-BY-SA 3.0. Free to redistribute;
see creativecommons.org for details.

Changing the default editor in ubuntu

Ubuntu comes with a number of defaults that may or may not be to your liking. For example, the default editor is set to Nano, which isn't optimal if you're used to Vim.

The easy way to change this is to use the update-alternatives program, which maintains the symbolic links under /etc/alternatives that determine the default programs for FTP, system editor, rsh, Telnet, window manager, and so forth. Look under the /etc/alternatives directory to see what programs are managed.

To change the default editor, run sudo update-alternatives --config editor. You'll see a dialog like this:

There are 3 alternatives which provide `editor'.

Selection Alternative
-----------------------------------------------
1 /usr/bin/vim
2 /bin/ed
*+ 3 /bin/nano

Press enter to keep the default[*], or type selection number:

Just type 1 to switch to Vim. Note that on my system, I don't have Emacs or many other editors installed; if I did, the utility

hardware support for ubuntu

see:-
https://wiki.ubuntu.com/HardwareSupport
http://www.linux.org/hardware
http://www.gphoto.org

Tuesday, June 17, 2008

Add the Trash Can Icon to Your Ubuntu Desktop



Ubuntu has an option for adding a Trash Can icon to the desktop, which might be a comfort for those of you migrating from Windows.

Just type gconf-editor into the Alt+F2 run dialog to open the Gnome Configuration Editor.

Now browse down to the following key:

apps \ nautilus \ desktop

On the right hand side, you'll see an entry called trash_icon_visible. Just check the box. You can also change the trash_icon_name if you'd like.


see:-http://www.howtogeek.com/howto/ubuntu/

Reinstall Ubuntu Grub Bootloader After Windows Wipes it Out

If you run a dual-boot system with Linux and Windows, this has happened to you. You had to do your monthly reinstall of Windows, and now you don't see the linux bootloader anymore, so you can't boot into Ubuntu or whatever flavor of linux you prefer.

Here's the quick and easy way to re-enable Grub.

1) Boot off the LiveCD

2) Open a Terminal and type in the following commands, noting that the first command will put you into the grub "prompt", and the next 3 commands will be executed there. Also note that hd0,0 implies the first hard drive and the first partition on that drive, which is where you probably installed grub to during installation. If not, then adjust accordingly.

sudo grub

> root (hd0,0)

> setup (hd0)

> exit

Reboot (removing the livecd), and your boot menu should be back.



Only read below if Windows is now missing from the boot menu

If you installed Ubuntu before you installed Windows, then Ubuntu will not have anything in the grub configuration for Windows. This is where you'll have to do a bit of manual editing to the grub boot menu file.

If you open the file /boot/grub/menu.lst with the following command:

sudo gedit /boot/grub/menu.lst

You'll see a sample section for Windows, which you'll want to uncomment and add to the boot menu list in whatever position you want it in. (uncomment by removing the #'s)

# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1

Note that you should also verify that hd0,0 is the correct location for Windows. If you had installed Windows on the 4th partition on the drive, then you should change it to (hd0,3)

see:-http://www.howtogeek.com/howto/ubuntu/

Linux QuickTip: Downloading and Un-tarring in One Step

Most of the time, when I download something it's a file archive of some kind - usually a tarball or a zip file. This could be some source code for an app that isn't included in Gentoo's Portage tree, some documentation for an internal corporate app, or even something as mundane as a new WordPress installation.

The traditional way of downloading and untarring something in the terminal would be something like this:

wget http://wordpress.org/latest.tar.gz

tar xvzf latest.tar.gz

rm latest.tar.gz

Or perhaps the more compact form:

wget http://wordpress.org/latest.tar.gz && tar xvzf latest.tar.gz && rm latest.tar.gz

Either way is a bit clumsy. This is a very simple operation, a powerful shell like bash should allow such a task to be performed in a more "slick" manner.

Well, thanks to a useful little command "curl", we can actually accomplish the mess above in just one piped statement:

curl http://wordpress.org/latest.tar.gz | tar xvz

No temporary files to get rid of, no messing around with ampersands. In short, a highly compact, efficient command. In fact, from a theoretical standpoint, the curl method can be faster than the concatenated wget/tar/rm mess since stdout piping will use RAM as a buffer if possible, whereas wget and tar (with the -f switch) must read/write directly from a disk.

Incidentally, tar with the -v option (the way we're using it in all the above examples) prints each file name to stdout as each is untarred. This can get in the way of curl's nice, ncurses output showing download status. We can silence tar by invoking it without -v thusly:

curl http://wordpress.org/latest.tar.gz | tar xz

see:-http://www.howtogeek.com/howto/ubuntu/