Thursday, September 11, 2008

Essential skills: best keyboard shortcuts Gnome

1. Switch to the next/previous workspace

If you make use of the workspace very frequently, you can easily switch between different workspaces by pressing Ctrl + Alt + Left/Right Arrow. The Left key brings you to the previous workspace while the Right key brings you to the next adjacent. If you have enabled Compiz, you can even get it to show all the workspace by pressing Super + E on the keyboard.

2. Move the current window to another workspace

By pressing Shift+ Ctrl + Alt + Left/Right Arrow, you can easily move your current window to another workspace in the specified direction. This keyboard shortcut works very well with the one mentioned above. If you have the habit of opening many applications/windows when doing your work, but don’t like to see your desktop and menubar cluttered with all the application windows, you can use this shortcut key to move your applications to another workspace and get your desktop organized.

3. Show the desktop

Ctrl + Alt + D enables you to quickly minimize all windows and give focus to the desktop. When all windows are minimized, this shortcut can also maximize all the windows to their previous state.

4. Keyboard shortcut for the mouse right-click

In most applications, you can always right-click on the mouse to access the options menu. On the keyboard, you can simply press Shift + F10 to achieve this ‘right-click‘ effect

5. Restart session and recover from crashes

There are very few instances where Ubuntu will crash totally. But if it does, you can press Ctrl + Alt + Backspace to restart the session, and 90% of the time, it will recover from the crashes.

6. Lock the screen quickly

If you need to leave your workstation for a while, you can quickly lock up your screen by pressing Ctrl + Alt + L and prevent unauthorized access by others.

7. Switch between windows in the reverse direction

Alt + Tab is a common shortcut key that allow you to switch between open windows. But do you know that by including the ‘Shift‘ button, you can reverse the windows switching direction? This is useful when you press Alt + Tab too fast and passed the window that you want to switch to. Simply press down the ‘Shift‘ button to go back to the previous window in the switch cycle.

8. Move windows with arrow keys

Press Alt+F7 to activate the Move window function and use any arrows key (up, down, left, right) to move the window around the screen.

9. Show hidden files

Most of the time, you won’t need to view the hidden files in your home folder, but in the event that you need to, you can press Ctrl + H inside the Nautilus (the file manager for Ubuntu) to show all hidden files.

10. Show file properties without right-clicking the mouse

The conventional way to view a file/folder properties is to right-click the mouse and select ‘Properties‘. Now you can just press Alt + Enter to get the Properties window to appear.


source: http://www.makeuseof.com/tag/10-useful-ubuntu-keyboard-shortcuts-that-you-might-not-know-of/

Wednesday, September 10, 2008

Using history in the terminal

source: http://www.thegeekstuff.com/2008/08/15-examples-to-master-linux-command-line-history/
When you are using Linux command line frequently, using the history effectively can be a major productivity boost. In fact, once you have mastered the 15 examples that I’ve provided here, you’ll find using command line more enjoyable and fun.

1. Display timestamp using HISTTIMEFORMAT

Typically when you type history from command line, it displays the command# and the command. For auditing purpose, it may be beneficial to display the timepstamp along with the command as shown below.

# export HISTTIMEFORMAT=’%F %T ‘
# history | more
1 2008-08-05 19:02:39 service network restart
2 2008-08-05 19:02:39 exit
3 2008-08-05 19:02:39 id
4 2008-08-05 19:02:39 cat /etc/redhat-release

2. Search the history using Control+R

I strongly believe, this may be your most frequently used feature of history. When you’ve already executed a very long command, you can simply search history using a keyword and re-execute the same command without having to type it fully. Press Control+R and type the keyword. In the following example, I searched for red, which displayed the previous command “cat /etc/redhat-release” in the history that contained the word red.

# [Press Ctrl+R from the command prompt,
which will display the reverse-i-search prompt]

(reverse-i-search)`red‘: cat /etc/redhat-release
[Note: Press enter when you see your command,
which will execute the command from the history]

# cat /etc/redhat-release
Fedora release 9 (Sulphur)

Sometimes you want to edit a command from history before executing it. For e.g. you can search for httpd, which will display service httpd stop from the command history, select this command and change the stop to start and re-execute it again as shown below.

# [Press Ctrl+R from the command prompt,
which will display the reverse-i-search prompt]

(reverse-i-search)`httpd‘: service httpd stop
[Note: Press either left arrow or right arrow key when you see your
command, which will display the command for you to edit, before executing it]

# service httpd start

3. Repeat previous command quickly using 4 different methods

Sometime you may end up repeating the previous commands for various reasons. Following are the 4 different ways to repeat the last executed command.

  1. Use the up arrow to view the previous command and press enter to execute it.
  2. Type !! and press enter from the command line
  3. Type !-1 and press enter from the command line.
  4. Press Control+P will display the previous command, press enter to execute it

4. Execute a specific command from history

In the following example, If you want to repeat the command #4, you can do !4 as shown below.

# history | more
1 service network restart
2 exit
3 id
4 cat /etc/redhat-release

# !4
cat /etc/redhat-release
Fedora release 9 (Sulphur)

5. Execute previous command that starts with a specific word

Type ! followed by the starting few letters of the command that you would like to re-execute. In the following example, typing !ps and enter, executed the previous command starting with ps, which is ‘ps aux | grep yp’.

# !ps
ps aux | grep yp
root 16947 0.0 0.1 36516 1264 ? Sl 13:10 0:00 ypbind
root 17503 0.0 0.0 4124 740 pts/0 S+ 19:19 0:00 grep yp

Copy with select text and middle click

Did you know that you can easily copy and paste text in Linux using your mouse alone?

Just highlight the text you want to copy and then middle click in the application where you want to paste it.

Remember that this step bypasses the clip board completely.


Terminal:

You can copy and paste text in terminal using Ctrl + Shift + C and Ctrl + Shift + V

Unable to unmount usb drive due to unknown processes?

If you are unable to unmount the disk using the GUI in GNOME or KDE, just open up a terminal and run sudo fuser -k /media/usbdrive. Change /media/usbdrive to where your USB drive is mounted.
This command kills all processing accessing your usb drive and then a simple eject command from your GNOME or KDE explorer will do the trick

Tuesday, September 9, 2008

SimpleBackup Automated Ubuntu Backups

Installation

To install sbackup, you need to install the sbackup package from the Universe Repository. You can use Synaptic, or install from terminal:

sudo apt-get install sbackup

Backing Up Your Data

Once you have completed the installation you can access sbackup using System -> Administration —> Simple Backup Config, you can see this in the following screen

  • 1.png


The next screen is asking for your user password. Enter your user password and click ok.

  • 2.png


Once it opens the sbackup application you can see the following screen where you can configure your backup settings. The first tab is general options. In this example I am choosing Use custom backup settings.

  • 3.png


Sbackup can be operated in 3 different modes

If you are new Ubuntu user or are not sure what you should backup. This will perform a daily backup of your /home, system data held in /etc, /usr/local and /var. This will deliberately exclude any files over 100MB. By default this backup will be stored in /var/backup.

Custom Backup

This is the same as the recommended backup and in this you can change the settings include, exclude files, you can change the schedule time. With this option you will be able to specify where to save the backup file.

Manual Backup

If you want to backup some files from time to time this option is for you. You can click backup now button to manually perform a backup according to the settings on the other backup properties dialog box tabs. With this option you will be able to specify where to save the backup file.

For the rest of the guide, it will be assumed that you chose the custom backup or the manual backup option. If you chose the recommended backup, you will not be able to customize any settings.

More here:
https://help.ubuntu.com/community/BackupYourSystem/SimpleBackupSuite

Monday, September 8, 2008

Strata Human theme for better looking Firefox

Standard the buttons in Ubuntu Firefox look fuzzy;
for more clarity use this theme: Strata Human
https://addons.mozilla.org/en-US/firefox/addon/8105

Sunday, September 7, 2008

Howto: Convert Redhat and Fedora .rpm files to .deb files in Ubuntu


Just switch from redhat/fedora to Ubuntu and your used to rpm's? Or did you find an rpm that isnt available as a .deb file? I sure have so I thought I would share the easy process of converting rpm to deb, check it out.


To do this, install Alien using:

sudo apt-get install alien

And convert using:


sudo alien -k name-of-rpm-file.rpm

To install .deb packages, double click the file and click Install Package or simply:

sudo dpkg -i name-of-created-deb-file.deb

Alternatively you can simply install rpm files, This command converts rpm to deb then installs the deb file, after it will delete the temporary .deb created
sudo alien -i name-of-rpm-file.rpm


source: http://www.ubuntu-unleashed.com/2008/03/howto-convert-redhat-and-fedora-rpm.html

Blog Archive