Tuesday, January 11, 2011

Tips and Tricks Linux Ubuntu

Tips and Tricks

* Customize the Panel

Ubuntu includes a top panel and a bottom panel by default. If you prefer to keep only one panel at the bottom just like the Windows Taskbar, then these are the steps to follow:
1. Ubuntu DesktopDelete the bottom panel: right-click over it and click "Remove this panel".
2. Move the top panel to bottom: right-click over it, select "Properties" and change Orientation from "Top" to "Bottom".
3. Add running program buttons: right-click the panel, select "Add to Panel", scroll down and select "Window List", click "Add".
4. Replace the Menu Bar ("Applications-Places-System") with the "Main Menu" to save space in the panel:
o Right-click the "Menu Bar" and select "Remove From Panel".
o Right-click the panel, select "Add to Panel" and choose "Main Menu", click "Add".
o Right-click the items (Firefox, etc) and untick "Lock to Panel".
o Right-click the added "Main Menu", select "Move" to relocate it to the far left.

These are basic changes. The panels are much more flexible than the Windows Taskbar in that many items in the panels can be easily added, removed or configured.

* Pin Programs to the Panel

Frequently used programs can be easily pinned to the panel.
1. Browse to the program from "Applications" or "Main Menu".
2. Drag and drop the program to an empty space in the panel, or right-click the program and select "Add this launcher to panel".
3. Right click the program icon, select "Move" and drop it to a new place in the panel.
4. Right click the program icon and select "Lock to Panel".

* Set a Default View in File Browser

Windows Explorer allows for users to set a default view to all folders. In almost the same way, Ubuntu's Nautilus File Browser allows for these settings:
1. Set File BrowserGo to "Places" and open a folder.
2. At the top of the File Browser, click "Edit" and "Preference".
3. Under Default View, change "Icon View" to "List View", to see more details in columns.
4. Tick "Show hidden and backup files" if that's your choice.

Other various settings, such as single or double click to open items, icon captions, list columns, preview files and media handling can be done in the same window as well.

* Enable Media Playback

Ubuntu only includes completely free software by default and does not configure proprietary media formats such as mp3 and mp4 'out of the box'. The required codecs however can be easily installed for the default player to playback these files following a few simple steps below.
1. Double click an mp3 file in a folder.
2. Click "Search" button when the the default player shows up with a "Search for suitable plugin?" window.
3. Click the "Install" and "Confirm" buttons to download and install the restricted software.
4. Restart the player after the package files are installed.

You might need to do the same for other restricted media formats such as mp4 too.

* Install Extra Fonts

Do you prefer Windows TrueType fonts to the default fonts installed by Ubuntu? The Windows fonts can be installed and activated easily in a few steps below:
1. Ubuntu Extra FontsGo to Applications (or Main Menu) > Accessories > Terminal.
2. Enter sudo apt-get install ttf-mscorefonts-installer (or copy the highlighted code and press Ctrl-Shift-V to paste it in the Terminal).
3. Enter password used upon installation of Ubuntu.
4. Go to System > Preference > Appearance > Fonts.
5. Click each of them and pick a font and size.

The screenshot here uses the following settings:

Application font: Verdana 9
Document font: Verdana 11
Desktop font: Verdana 11
Window title font: Verdana 9
Fixed width font: Monospace 10

After completing the above steps, if you like the Tahoma font which is not included in the mscorefonts package, you might want to copy the two files tahoma.ttf and tahomabd.ttf from /Windows/Fonts to the Desktop. Next, move them to the restricted folder by entering sudo mv Desktop/*.ttf /usr/share/fonts/truetype/msttcorefonts/ in the Terminal. This font will then be available in step 4 above.

* Open Up a Program Window in Center

When running an application without maximized, Ubuntu always puts it in the left-top corner of the desktop by default, but you are allowed to set a program window to open up in the center of the desktop area.
1. CompizConfig Settings ManagerGo To System > Preference > CompizConfig Settings Manager
2. Select "Windows Management" from the left panel.
3. Click "Place Windows".
4. Change Placement Mode from "Smart" to "Centered", click "Back" and "Close".

Ideally, the window manager in Ubuntu should restore the last known position of an application window, but it does not do that unless an application remembers its own window position. (See reported bugs)

* Hide Drive Icons on the Desktop

Ubuntu adds an icon to the desktop for every removable drive that you attach to your system. The icons can be hidden by these steps:
1. Press Alt-F2 to bring up "Run Application" window.
2. Type gconf-editor into the box, click "Run" to bring up Configuration Editor.
3. Browse to apps \ nautilus \ desktop.
4. Untick "volumes_visible" and close the window.

The drive icons would then disappear from the desktop. Remember that you can always access the drives from "Places".

* Auto Mount Drives at System Startup

Ubuntu is capable of reading and writing files stored on Windows formatted partitions, but partitions must be 'mounted' before they can be accessed each time you start up the system. With these steps, you can auto mount the drives without the need to manually mount them for access.
1. Storage Device ManagerInstall Storage Device Manager if it has not been added.
o Go to Applications (or Main Menu) > Ubuntu Software Center.
o Enter pysdm in the Search Box.
o Select Storage Device Manager, click the right-arrow and "Install" button.
2. Go to System > Administration > Storage Device Manager, enter password.
3. Extend the list of sda and select the sda you want to auto mount, click 'OK' to configure. (Not sure of which sda? go to "Places", select a drive, click "Details" and check the device.)
4. Click the "Assistant" button.
5. Uncheck "Mount file system in read only mode" and keep "The file system is mounted at boot time" checked.
6. Click the "Mount", "Apply" then "Close" button, and restart the system.

If you wish to remove the auto-mount of a certain drive, you can similarly use Storage Device Manager to do the setting.

* Enable "Rotate Cube" Effect

Ubuntu enables "Desktop Wall" by default. By holding Ctrl-Alt keys and pressing the left-arrow or right-arrow key each time, it slides through desktop workspaces horizontally for you to choose one to work on. Alternatively, you can change this to a "rotate cube" effect.
1. Rotate CubeGo To System > Preference > CompizConfig Settings Manager
2. Select "Desktop" from the left panel.
3. Tick "Rotate Cube".
4. Select "Eable Desktop Cube" as this plugin is required by "Rotate Cube".
5. Select "Disable Desktop Wall".

Immediately you can rotate your desktop workspaces in this way — holding down Ctrl-Alt keys, EITHER press the left-arrow or right-arrow key OR left-click the mouse and drag it to left or right.

* Enable Windows 7 Aero Snap Function

In Windows 7, you can click and drag a window to the left or right edge of the desktop and it will fill half of the screen, or snap a window to the top edge of the desktop and it will be maximized.

In Ubuntu 9.10, you can click a window, press hotkeys or move the mouse cursor to the left, right or top edge of the desktop to achieve the same result.

Snap a window with hotkeys:
1. GribGo To System > Preference > CompizConfig Settings Manager.
2. Select "Window Management" from the left panel, click "Grid" and tick "Enable Grid".
3. Change each of the Bindings (hotkeys) to your liking, such as changing "Put Right" from KP6 to KP6, i.e. Win+"Keypad No.6".
4. Click "Back" and "Close".

Snap a window with a mouse:
1. In addition to CompizConfig Settings Manager, install WmCtrl if not added.
o Go to Applications (or Main Menu) > Accessories > Terminal.
o Enter sudo apt-get install wmctrl
o Enter password when prompted.
2. Go To System > Preference > CompizConfig Settings Manager.
3. Select "General" from the left panel and click "Commands".
4. Enter this command wmctrl -r :ACTIVE: -e 0,x,y,width,height in Command line 0, 1 and 2, change the values x,y (of the window position) and width, height (of the window area) to suit your screen.
If your screen resolution is 1440 x 900 pixels, the values used in the commands below can be a good try.
o Command line 0 wmctrl -r :ACTIVE: -e 0,0,0,714,850
o Command line 1 wmctrl -r :ACTIVE: -e 0,720,0,714,850
o Command line 2 wmctrl -r :ACTIVE: -e 0,0,0,1440,850
5. In the same window, click "Edge Bindings" tab.
6. Change Run Command 0, 1 and 2 from "None" to "Left", "Right" and "Top" respectively.

You might also want to set Command line 3 to wmctrl -r :ACTIVE: -e 0,360,160,720,500 to center a window and run Command 3 when the mouse cursor moves to the bottom edge of the desktop.

* Add a PDF Printer

Ubuntu has an option to "Print to File" in a PDF output format, but some programs such as Foxit Reader do not detect this option except for a printer driver. The cups-pdf package can be installed to create a virtual PDF printer like this:
1. PDF PrinterGo to Applications (or Main Menu) > Accessories > Terminal.
2. Enter sudo apt-get install cups-pdf (or copy the highlighted code and press Ctrl-Shift-V to paste it in the Terminal).
3. Enter password used upon installation of Ubuntu.
4. Go to System > Administration > Printing
5. A virtual printer named PDF appears. (Otherwise, click "New", select "Generic CUP-PDF Printer" and click "Forward".)

When printing via this PDF printer, a PDF file will be saved in this folder /home/username/PDF.

* Change Default Boot Options

After full installation, Ubuntu is set to be the default operating system to boot up if no key is pressed within a few seconds on a multi-boot system. You might want to set your preferred operating system to boot up by default. This can be done easily with StartUp-Manager.
1. Go to Applications (or Main Menu) > Accessories > Terminal.
2. Enter sudo apt-get install startupmanager (or copy the highlighted code and press Ctrl-Shift-V to paste it in the Terminal).
3. Enter password used upon installation of Ubuntu.
4. Go to System > Administration > StartUp-Manager
5. Enter the same password to perform pre-configuration tasks, which include searching bootloaders to operating systems.
6. Select the default operating system from the pull-down menu, click "Close" to perform post-configuration tasks.

With StartUp-Manager, you can also do others such as manage Usplash themes, adjust bootloader menu resolution or set timeout in seconds. Avoid changing timeout to 0 seconds if you need to select a system to boot up from a multi-boot menu.

* Auto Shutdown the System

A simple command can be entered in the Terminal to schedule a time for the system to shut down.
1. Go to Applications (or Main Menu) > Accessories > Terminal.
2. Enter sudo shutdown -h +m (replace m with the number of minutes, e.g. +60).
OR: enter sudo shutdown -h hh:mm (replace hh:mm with the time on the 24hr clock, e.g. 23:15).
3. Enter password and minimize the Terminal window.

The system will then shut down within the minutes or at the time specified. To cancel a scheduled time, enter sudo shutdown -c in the Terminal.

GShutdown is a GUI program for scheduling a time to shutdown the system but the current version 0.2 is noted not working well in Ubuntu 9.10.

* Install More Useful Software

Ubuntu 9.10 introduces Ubuntu Software Center where you can search and get free software. If an application you need is not included in the Center, you can go to System > Administration > Synaptic Package Manager, type in an application name to search and install a software package from the repositories.

Alternatively, you can browse this site Appnr, a web-based package browser with more than two thousand software packages listed by popularity and rating. Mouse over the number of users next to the software you need, click the Install button for direct installation into your Ubuntu system.

See also our Best Free Software for Linux.

Note: CompizConfig Settings Manager (ccsm) can be installed here if not added:

1. Click "Applications" (or "Main Menu"), select "Ubuntu Computer Center".
2. Type ccsm into the Search box.
3. Select "Advanced Desktop Effects Settings (ccsm)" and click the right-arrow.
4. Click "Install" and enter the password used upon installation of Ubuntu. (If the "Install" button is not available, go to System >Administration >Update Manager and click "Check" to update repositories.)

No comments:

Post a Comment