Jumaat, 29 April 2011

Ubuntu Unity Keyboard Shortcuts


Unity Shortcuts

  • Super (Win key) – This open the activities menu (Launcher)
  • Super+A – Brings up the applications menu and allows you to perform search
  • Super+F1 – Focuses on the Launcher, use arrow keys to navigate and press enter to select
  • Super+W – Expo mode, zoom out on all windows in all workspace and lets you to move them
  • Shift+Alt+ Up - Expo mode for all windows in the current workspace only
  • Super+D – Minimize all windows; hitting it again restores them
  • CTRL+Alt+Left/Right/Up/Down – Change to a new workspace
  • Super+S – Expo mode, zooms out on all the workspaces and let’s you manage windows
  • Super+F - Opens Files & Folders menu

Window Shortcuts

These shortcuts can be used in any environment as well in Unity.

  • Alt+Tab – Switches between currently open windows
  • Alt+F7 – Moves the current window (can be moved with mouse or keyboard)
  • Alt+F8 – Resizes current window (again,can be moved with mouse or keyboard)
  • Alt+F9 – Minimises current window
  • Alt+F10 - Maximises current window
  • Alt+Space – Brings up window menu with various options as minimize, maximize, move…etc
  • Alt+F5 – Returns window to ‘normal’ or previous size
  • Alt+F4 – Closes window

Terminal Shortcuts

You can use these shortcuts when you are using the terminal (Ctrl+Alt+T).

  • Ctrl + A – Move cursor to beginning of line
  • Ctrl + E – Move cursor to end of line
  • Ctrl + C – kills the current process
  • Ctrl + Z – sends the current process to the background
  • Ctrl + D – logs you out
  • Ctrl + R – finds the last command matching the entered letters
  • Enter a letter, followed by Tab + Tab – lists the available commands beginning with those letters
  • Ctrl + U – deletes the current line
  • Ctrl + K – deletes the command from the cursor right
  • Ctrl + W – deletes the word before the cursor
  • Ctrl + L – clears the terminal output
  • Shift + Ctrl + C – copy the highlighted command to the clipboard
  • Shift + Ctrl + V (or Shift + Insert) – pastes the contents of the clipboard
  • Alt + F – moves forward one word
  • Alt + B – moves backward one word
  • Arrow Up/Down – browse command history
  • Shift + PageUp / PageDown – Scroll terminal output

Compiz Shortcuts

Some of these shortcuts requires Compiz Desktop effects enabled.

  • Alt + Tab – switch between open windows
  • Win + Tab – switch between open windows with Shift Switcher or Ring Switcher effect
  • Win + E – Expo, show all workspace
  • Ctrl + Alt + Down – Film Effect
  • Ctrl + Alt + Left mouse button – Rotate Desktop Cube
  • Alt + Shift + Up – Scale Windows
  • Ctrl + Alt + D – Show Desktop (Only in GNOME)
  • Win + Left mouse button – take screenshot on selected area
  • Win + Mousewheel – Zoom In/Out
  • Alt + Mousewheel - Transparent Window
  • Alt + F8 – Resize Window
  • Alt + F7 – Move Window
  • Win + P – Add Helper
  • F9 - show widget layer
  • Shift + F9 – show water effects
  • Win + Shift + Left mouse button – Fire Effects
  • Win + Shift + C – Clear Fire Effects
  • Win + Left mouse button – Annotate: Draw
  • Win + 1 – Start annotation
  • Win + 3 – End annotation
  • Win + S – selects windows for grouping
  • Win + T – Group Windows together
  • Win + U – Ungroup Windows
  • Win + Left/Right – Flip Windows

Nautilus Shortcuts

You might want to remember some these combinations like the one to create new folder or rename a file.

  • Shift + Ctrl + N – Create New Folder
  • Super + T - Opens the Trash can (recycle bin)
  • Alt + Home – Opens Home
  • Ctrl + T – Delete selected file(s) to trash
  • Alt + ENTER – Show File/Folder Properties
  • Ctrl + 1 – Toggle View As Icons
  • Ctrl + 2 – Toggle View As List
  • Shift + Right – Open Directory (Only in List View)
  • Shift + Left – Close Directory (Only in List View)
  • Ctrl + S – Select Pattern
  • F2 – Rename File
  • Ctrl + A – Select all files and folders
  • Ctrl + W – Close Window
  • Ctrl + Shift + W – Close All Nautilus Windows
  • Ctrl + R – Reload Nautilus Window
  • Alt + Up – Open parent directory
  • Alt + Left – Back
  • Alt + Right – Forward
  • Alt + Home – go to Home folder
  • Ctrl + L – go to location bar
  • F9 – Show sidepane
  • Ctrl + H – Show Hidden Files
  • Ctrl + + – Zoom In
  • Ctrl + - – Zoom Out
  • Ctrl + 0 – Normal Size

Common Application Shortcuts

These shortcuts do not apply in all applications, but usually perform the functions listed below.

  • Ctrl + C – Copy the selected text/object
  • Ctrl + X - Cut the selected text/object
  • Ctrl + V – Paste/insert the selected text/object
  • Ctrl + A – Select all text
  • Ctrl + B – Make the selected text bold
  • Ctrl + I – Make the selected text italic
  • Ctrl + U - Underline the selected text
  • Ctrl + N - Open a new document or window
  • Ctrl + S - Save the current document
  • Ctrl + O - Open another document
  • Ctrl + P - Print the current document
  • Ctrl + Z - Undo the last change you made
  • Ctrl + Shift + Z - Redo a change that you just undid
  • Ctrl + Q – Quit the current application

Useful Shortcuts

  • Alt + F2 Run an application by typing its name in the box which appears
  • Prt Sc (Print Screen) Take a screenshot of the whole screen
  • Alt + Prt Sc Take a screenshot of the current window
  • Alt+Ctrl+Del – Restart the system
  • Alt+Ctrl+L - Lock the screen

Mouse Tricks

  • Tiling – Dragging a Window to the left/right border will auto tile it to that side of the screen
  • Maximization – Dragging a window to the top panel will maximize it
  • Unmaximize – Dragging the top panel down on a maximized window will unmaximize it

Khamis, 21 April 2011

Linux - Video Resolution Tools and Command

Useful command line tools

1. xresprobe [driver=vesa,ati,nv,nvidia,i810]
2. ddcprobe

In ubuntu is not install by default. To install apt-get install xresprobe

To check/modify resolution


1. xrandr


more info

http://ubuntuforums.org/showthread.php?t=83973

Isnin, 18 April 2011

Batch resize photo

In Linux, if you have installed ImageMagick suite, you can use a nifty command to resize images, photos or pictures. The name of the command line tool is mogrify. Here is how it is done.

Suppose you want to resize all your images to a size of 800×600.

You open a terminal and navigate to the directory containing your images, photos or pictures.

Create a directory in the location named “resized-pictures” as follows :

$ mkdir resized-pictures

Now run the mogrify command from the same location.

$ mogrify -path ./resized-pictures/ -resize 800x600 *.jpg

The above command will resize all the jpeg pictures in the current directory to a 800×600 size and save the output to the resized-pictures/ directory leaving the original pictures intact.

Note: You can also run the mogrify command without the -path option; in which case, all the images will be resized and overwritten in the current directory itself.

#!/bin/bash

for i in *.jpg
do

echo "I am resizing the $i image....."

# writes to a new file, the old one survives
#convert -resize 800x600 $i

# writes to the same file, the old one will vanish
mogrify -resize 800x600 $i

echo "Image $i has been resized."

done
REf:
1.http://www.devdaily.com/blog/post/linux-unix/use-imagemagick-mogrify-command-resize-images
2. http://linuxandfriends.com/2009/08/10/mogrify-how-to-resize-images-from-the-command-line/