Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions

  




 

 

Chapter 9. Tips & Tricks

9.1. How do I restart GNOME without rebooting the computer?
9.2. How do I automatically turn on Num Lock when GNOME starts?
9.3. How do I run programs automatically when GNOME starts?
9.4. How do I switch to Console mode?
9.5. How do I disable the Ctrl-Alt-Backspace shortcut keys from restarting X?
9.6. How do I use spatial mode in Nautilus?
9.7. How do I show hidden files and folders in Nautilus?
9.8. How can I browse files and folders as root user in Nautilus ?
9.9. How can I view remote SSH, FTP, and SFTP servers using Nautilus?
9.10. How can I show the Computer, Home, and Trash desktop icons in GNOME?
9.11. How do I change the default file type "Open with" program?
9.12. How can I change my preferred email client to Mozilla Thunderbird?
9.13. How do I open files as root user via right click?
9.14. How do I disable beep sound in Terminal mode?
9.15. How do I load Web site faster in Mozilla Firefox?
9.16. How do I disable beep sound for link find function in Mozilla Firefox?
9.17. How do I restore the original icons for Mozilla Firefox?
9.18. How do I restore the original icons for Mozilla Thunderbird?
9.19. How do I install/uninstall .deb file?
9.20. How do I convert .rpm file to .deb file?
9.21. How do I rename all files in a directory at once?
9.22. How do I set system-wide environment variables?
9.23. How do I save man outputs into file?
9.24. How do I generate MD5 checksum file?
9.25. How do I check MD5 checksum of files?
9.26. How do I mount/unmount Image (ISO) files without burning?
9.27. How do I change the timeout seconds for GRUB menu on boot-up?
9.28. How do I change default Operating System boot-up for GRUB menu?
9.29. How do I temporary skip boot-up services?
9.30. How do I permanently disable/enable boot-up services?
9.31. How do I clean /tmp/ folder contents on shutdown?
9.1.

How do I restart GNOME without rebooting the computer?

  1. Save and close all open applications.

  2. Use the Ctrl-Alt-Backspace shortcut keys to restart GNOME.

  3. If Ctrl-Alt-Backspace is disabled, type

    sudo /etc/init.d/gdm restart

    (See How do I disable the Ctrl-Alt-Backspace shortcut keys from restarting X? to disable Ctrl-Alt-Backspace.)

9.2.

How do I automatically turn on Num Lock when GNOME starts?

  1. Make sure the universe repository is enabled. (See How do I add Universe and Multiverse?)

  2. Install the numlockx package with Synaptic (See How do I use Synaptic to install packages?)

    x11 (universe) > numlockx

  3. Make a backup copy of your existing /etc/X11/gdm/Init/Default file.

    sudo cp /etc/X11/gdm/Init/Default /etc/X11/gdm/Init/Default_backup

  4. Open /etc/X11/gdm/Init/Default for editing.

    sudo gedit /etc/X11/gdm/Init/Default

  5. Find this line (It should be the last line in the file).

    exit 0

  6. Add the following lines above the "exit 0" line.

    if [ -x /usr/bin/numlockx ]; then
    /usr/bin/numlockx on
    fi
    						
  7. Save the edited file. (See sample/Default_numlockx for an example.)

The change will take effect the next time you log in to GNOME. If you want to test it right away, turn off Num Lock and restart GNOME (See How do I restart GNOME without rebooting the computer?)

9.3.

How do I run programs automatically when GNOME starts?

  1. Choose System->Preferences->Sessions.

  2. Click on the Startup Programs tab.

  3. Use the Add, Edit, and Delete buttons to manage programs to run at startup.

9.4.

How do I switch to Console mode?

  1. Use the Ctrl-Alt-F1 shortcut keys to switch to the first console.

  2. To switch back to Desktop mode, use the Ctrl-Alt-F7 shorcut keys.

[Note]

There are six consoles available. Each one is accessible with the shortcut keys Ctrl-Alt-F1 to Ctrl-Alt-F6.

9.5.

How do I disable the Ctrl-Alt-Backspace shortcut keys from restarting X?

  1. Make a backup copy of your existing /etc/X11/xorg.conf file.

    sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup

  2. Open /etc/X11/xorg.conf for editing.

    sudo gedit /etc/X11/xorg.conf

  3. Add the following lines to the end of the file:

    Section	"ServerFlags"
    Option	"DontZap"	"yes"
    EndSection

  4. Save the edited file. (See sample/xorg.conf_disablectrlaltbackspacegnome for an example.)

  5. The change will take effect the next time you log in to GNOME. If you want the change to take effect immediately, restart GNOME manually. (See How do I restart GNOME without rebooting the computer?)

9.6.

How do I use spatial mode in Nautilus?

  1. In Nautilus, choose Edit->Preferences.

  2. Click on the Behaviour tab.

  3. Unselect the Always open in browser windows check box.

  4. Close and reopen Nautilus.

9.7.

How do I show hidden files and folders in Nautilus?

  1. In Nautilus, use the Ctrl-H shortcut keys to toggle hidden files and folders on and off.

  2. To permanently show all hidden files and folders, choose Edit->Preferences.

  3. Click on the Views tab.

  4. Select the Show hidden and backup files check box.

9.8.

How can I browse files and folders as root user in Nautilus ?

  1. Start a new desktop configuration file in the /usr/share/applications directory.

    sudo gedit /usr/share/applications/Nautilus-root.desktop

    A blank file called Nautilus-root.desktop opens in gedit.

  2. Add the following lines to the new file:

    [Desktop Entry]
    Name=File Browser (Root)
    Comment=Browse the filesystem with the file manager
    Exec=gksudo "nautilus --browser %U"
    Icon=file-manager
    Terminal=false
    Type=Application
    Categories=Application;System;
  3. Save the file and close gedit. (See sample/Nautilus-root.desktop_browsefilesfoldersasrootnautilus for an example.)

  4. To start Nautilus as the root user, choose Applications->System Tools->File Browser (Root)

9.9.

How can I view remote SSH, FTP, and SFTP servers using Nautilus?

  1. Make sure the Nautilus Location Bar is open. Toggle the bar on and off with View->Location Bar

  2. In the Location Bar, enter the following:

    For SSH, use:

    ssh://[email protected]

    For FTP, use:

    ftp://[email protected]

    For SFTP, use:

    sftp://[email protected]

    Replace username with your username and replace everything after the @ symbol with the server's address. You will be prompted for a password if needed. If there is no username (anonymous) omit the username and the @ symbol.

    Alternatively, to specify your password manually, change one of the above like so:

    ftp://username:[email protected]

9.10.

How can I show the Computer, Home, and Trash desktop icons in GNOME?

  1. Make sure the universe and multiverse repositories are enabled. (See How do I add Universe and Multiverse?)

  2. Install the gtweakui package with Synaptic (See How do I use Synaptic to install packages?)

    Gnome (universe) > gtweakui

  3. After gTweakUI is installed, choose System->Preferences->gTweakUI - Nautilus.

  4. Select the Show computer icon, Show home icon, and Show trash icon check boxes. The changes take effect immediately.

9.11.

How do I change the default file type "Open with" program?

  1. In Nautilus, right click on the file and choose Properties from the menu that appears. The Properties dialog opens.

  2. Click on the Open With tab. A list of applications appears.

  3. Select the default application you want for the file type. If the application is not on the list, use the Add button to add the application to the list.

9.12.

How can I change my preferred email client to Mozilla Thunderbird?

  1. To install Thunderbird, see How do I install the Thunderbird email client?

  2. Choose System->Preferences->Preferred Applications.

  3. Click on the Mail Reader tab, and select the Custom option.

  4. In the Command text box, type mozilla-thunderbird %s, then close the dialog.

9.13.

How do I open files as root user via right click?

  1. gedit $HOME/.gnome2/nautilus-scripts/Open\ as\ root

  2. Insert the following lines into the new file

    for uri in $NAUTILUS_SCRIPT_SELECTED_URIS; do
    gnome-sudo "gnome-open $uri" &
    done
  3. Save the edited file (sample/Open-as-root_openfilesasrootviarightclick)

  4. chmod +x $HOME/.gnome2/nautilus-scripts/Open\ as\ root

  5. Right click on the file and Scripts->Open as root

9.14.

How do I disable beep sound in Terminal mode?

  1. Start a Terminal session, select: Applications->System Tools->Terminal from the desktop menu system.

  2. Edit->Current Profile... .Select the General tab. Uncheck the Terminal bell checkbox.

9.15.

How do I load Web site faster in Mozilla Firefox?

  1. Applications->Internet->Firefox Web Browser

  2. In the Navigation toolbar URL field enter about:config .

  3. Use the Filter field to change the following parameters:

    • network.dns.disableIPv6 - Set the Value parameter to true.

    • network.http.pipelining - Set the Value parameter to true.

    • network.http.pipelining.maxrequests - Set the Value parameter to 8.

    • network.http.proxy.pipelining - Set the Value parameter to true.

  4. Restart Mozilla Firefox

9.16.

How do I disable beep sound for link find function in Mozilla Firefox?

  1. Applications->Internet->Firefox Web Browser

  2. Mozilla Firefox

    Address Bar -> about:config
    Filter: -> accessibility.typeaheadfind.enablesound ->
    false

  3. Restart Mozilla Firefox

9.17.

How do I restore the original icons for Mozilla Firefox?

  1. wget -c http://frankandjacq.com/ubuntuguide/mozilla-firefox.png
    wget -c http://frankandjacq.com/ubuntuguide/document.png
    chmod 644 mozilla-firefox.png
    chmod 644 document.png
    sudo dpkg-divert --rename /usr/share/pixmaps/mozilla-firefox.png
    sudo dpkg-divert --rename /usr/share/pixmaps/mozilla-firefox.xpm
    sudo dpkg-divert --rename /usr/lib/mozilla-firefox/icons/default.xpm
    sudo dpkg-divert --rename /usr/lib/mozilla-firefox/icons/document.png
    sudo dpkg-divert --rename /usr/lib/mozilla-firefox/chrome/icons/default/default.xpm
    sudo cp mozilla-firefox.png /usr/share/pixmaps/mozilla-firefox.png
    sudo cp mozilla-firefox.png /usr/share/pixmaps/mozilla-firefox.xpm
    sudo cp mozilla-firefox.png /usr/lib/mozilla-firefox/icons/default.xpm
    sudo cp document.png /usr/lib/mozilla-firefox/icons/document.png
    sudo cp mozilla-firefox.png /usr/lib/mozilla-firefox/chrome/icons/default/default.xpm

  2. Read How do I restart GNOME without rebooting the computer?

9.18.

How do I restore the original icons for Mozilla Thunderbird?

  1. wget -c http://frankandjacq.com/ubuntuguide/mozilla-thunderbird.xpm
    chmod 644 mozilla-thunderbird.xpm
    sudo dpkg-divert --rename /usr/share/pixmaps/mozilla-thunderbird.xpm
    sudo dpkg-divert --rename /usr/share/pixmaps/mozilla-thunderbird-menu.xpm
    sudo dpkg-divert --rename /usr/share/pixmaps/mozilla-thunderbird-pm-menu.xpm
    sudo dpkg-divert --rename /usr/lib/mozilla-thunderbird/chrome/icons/default/mozilla-thunderbird.xpm
    sudo dpkg-divert --rename /usr/lib/mozilla-thunderbird/chrome/icons/default/messengerWindow16.xpm
    sudo dpkg-divert --rename /usr/lib/mozilla-thunderbird/chrome/icons/default/messengerWindow.xpm
    sudo dpkg-divert --rename /usr/lib/mozilla-thunderbird/chrome/icons/default/default.xpm
    sudo cp mozilla-thunderbird.xpm /usr/share/pixmaps/mozilla-thunderbird.xpm
    sudo cp mozilla-thunderbird.xpm /usr/share/pixmaps/mozilla-thunderbird-menu.xpm
    sudo cp mozilla-thunderbird.xpm /usr/share/pixmaps/mozilla-thunderbird-pm-menu.xpm
    sudo cp mozilla-thunderbird.xpm /usr/lib/mozilla-thunderbird/chrome/icons/default/mozilla-thunderbird.xpm
    sudo cp mozilla-thunderbird.xpm /usr/lib/mozilla-thunderbird/chrome/icons/default/messengerWindow16.xpm
    sudo cp mozilla-thunderbird.xpm /usr/lib/mozilla-thunderbird/chrome/icons/default/messengerWindow.xpm
    sudo cp mozilla-thunderbird.xpm /usr/lib/mozilla-thunderbird/chrome/icons/default/default.xpm

  2. Read How do I restart GNOME without rebooting the computer?

9.19.

How do I install/uninstall .deb file?

  1. To install .deb file

    sudo dpkg -i package_file.deb
  2. To uninstall .deb file

    sudo dpkg -r package_name
9.20.

How do I convert .rpm file to .deb file?

  1. sudo alien package_file.rpm

9.21.

How do I rename all files in a directory at once?

  1. wget -c http://frankandjacq.com/ubuntuguide/mvb_1.6.tgz
    sudo tar zxvf mvb_1.6.tgz -C /usr/ 
    sudo chown -R root:root /usr/mvb_1.6/ 
    sudo ln -fs /usr/mvb_1.6/mvb /usr/bin/mvb mvb -h

9.22.

How do I set system-wide environment variables?

  1. sudo cp /etc/bash.bashrc /etc/bash.bashrc_backup
    sudo gedit /etc/bash.bashrc

  2. Append the System-wide Environment Variables at the end of file

  3. Save the edited file

9.23.

How do I save “man” outputs into file?

  1. man command | col -b > file.txt

9.24.

How do I generate MD5 checksum file?

  1. md5sum file.iso > file.iso.md5

9.25.

How do I check MD5 checksum of files?

  1. Assuming that file.iso and file.iso.md5 are in the same folder.

  2. md5sum -c file.iso.md5

9.26.

How do I mount/unmount Image (ISO) files without burning?

  1. To mount Image (ISO) file

    sudo mkdir /media/iso
    sudo modprobe loop 
    sudo mount file.iso /media/iso/ -t iso9660 -o loop
  2. To unmount Image (ISO) file

    sudo umount /media/iso/
9.27.

How do I change the timeout seconds for GRUB menu on boot-up?

  1. sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
    sudo gedit /boot/grub/menu.lst

  2. Find this line

    ...
    timeout 3
    ...
  3. Replace with the following line

    timeout X_seconds
  4. Save the edited file (sample/menu.list_increasedecreasetimeoutgrub)

9.28.

How do I change default Operating System boot-up for GRUB menu?

  1. sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
    sudo gedit /boot/grub/menu.lst

  2. Find this line

    ...
    default 0
    ...
  3. Replace with the following line

    default X_sequence
  4. Save the edited file (sample/menu.list_changedefaultosgrub)

9.29.

How do I temporary skip boot-up services?

  1. Press Ctrl-C

9.30.

How do I permanently disable/enable boot-up services?

  1. Run Services Settings: System->Administration->Services.

  2. Ubuntu will ask for your password, enter it.

  3. Tick/untick the services you want running, then click OK when done.

9.31.

How do I clean /tmp/ folder contents on shutdown?

  1. sudo cp /etc/init.d/sysklogd /etc/init.d/sysklogd_backup
    sudo gedit /etc/init.d/sysklogd

  2. Find this section

    ...
    stop)
    log_begin_msg "Stopping system log daemon..."
    start-stop-daemon --stop --quiet --oknodo --exec $binpath --pidfile $pidfile
    log_end_msg $?
    ...
  3. Add the following line below it

    rm -fr /tmp/* /tmp/.??*
  4. Save the edited file (sample/sysklogd_cleantmpfoldershutdown)

 
 
  Published under the terms of the Creative Commons License Design by Interspire