Thursday, October 18, 2012

Tips and Tricks for Linux Mint after Installation [Mint 13 Maya - Cinnamon Edition]


Taken from: http://www.techsupportalert.com/content/tips-and-tricks-mint-after-installation-mint-13-cinnamon-edition.htm



Tips and Tricks for Linux Mint after Installation [Mint 13 Maya - Cinnamon Edition]

Introduction
Linux MintLinux Mint is one of the top free operating systems widely used in the world and currently receives the highest hits atDistroWatch.
Even though it's an Ubuntu-based system, Linux Mint features only one panel at the bottom which looks closer to the taskbar in the Windows system, and a well-organized start menu complete with a useful Search box. It also pre-installs some proprietary software such as necessary media codecs by default so that you play mp3, mp4 or most other media files with a player right away out of the box.
Cinnamon EditionThe Cinnamon Edition of Linux Mint 13 Maya uses Cinnamon, instead of GNOME shell, as a user interface for the GNOME-3 desktop environment. And unlike Ubuntu Unity sporting a vertical launcher on the left side of the screen, Cinnamon maintains a traditional layout with a bottom panel and a Mint menu. If you're using this Edition, you might find these tips and tricks useful for working with the system on a PC.
Note: The steps described in this article work best with Linux Mint 13 Maya [Cinnamon Edition]. If you're using the MATE Edition, please check out this article.
Tips and Tricks for Linux Mint - Quick Select Index
After clicking a link, use your browser's Back icon to return here.
Panel
Window
Desktop
File Manager
Keyboard Shortcuts
Sound
Add Fonts, Screenlets and More Software
Drive and Partition
Startup and Shutdown

   Pin Programs to the Panel
Frequently used programs can be easily pinned to the panel.
  1. Browse to a program from Menu.
  2. Right click a program, then select "Add to panel" (Alternatively you can drag a program and drop it to the panel launcher).
  3. Re-order the program icons on the panel launcher as you like by drag-and-drop.
Note: In the same you can also add a program shortcut to the Desktop or the Favorites located at the left column inside Menu. The Favorites support drag-and-drop and re-ordering. See also "Enable Superbar".

   Enable or Disable Applets on the Panel
An applet is a small tool or application which you can access directly from the panel for performing a task. Some applets have been enabled by default but you can disable the applets you don't need to use or enable the ones you like pretty easily:
  1. Click the Settings (the "^" sign) from the panel, or right-click any applet in the notification area.
  2. Select "Add/remove applets"
  3. Tick the applets to enable or untick the ones you want to hide from the panel, then close the Cinnamon Settings window.
Note: You can also add more applets for selection by clicking "Get new applets".

   Enable Superbar
In Windows 7, frequently used programs can be pinned to the taskbar (hence called Superbar) for launching the programs and their icons are highlighted when the programs are running. Likewise, an applet called "Window List with App Grouping" can be added to the panel to achieve almost the same effect.
  1. SuperbarInstall the applet "Window List with App Grouping" by entering the command lines below in the Terminal.
    1. sudo add-apt-repository ppa:bimsebasse/cinnamonextras
    2. sudo apt-get update
    3. sudo apt-get install cinnamon-applet-windowiconlist
  2. Follow the tip above to enable the applet "Window List with App Grouping".
  3. Click the Settings (the "^" sign) from the panel and switch on the Panel Edit mode.
  4. Drag the applet to the spot you like on the panel, then switch off the Panel Edit mode.
Note: A thumbnail preview of a running program is also available in this powerful applet. Since it serves as a new launcher and running programs are indicated, you can disable these two applets "Panel Launcher" and "Cinnamon Window List". To add a program shortcut to this new launcher, just drag a program from Menu and drop it to the launcher, and you can pin or unpin programs from the panel as well with a simple right-click.

   Set Preferences for the Mint Menu
Like the Windows' Start button, Linux Mint has a Menu button where you can start doing things like running a program, looking for files, log out or quit the system and so on.
The Menu allows you to set your personal preferences with the steps below, for example:
  1. Start MenuRight click "Menu", select "Panel settings".
  2. Replace Menu text to any other word if needed.
  3. Change the Button icon from /usr/share/cinnamon/theme/menu.png to /usr/lib/linuxmint/mintWelcome/templates/logo.svg, as shown in the screenshot. (Caution: avoid changing to a huge size image which might affect the panel.)
Note: In this Settings window, you can also set Menu hover delay, auto-hide panel and more.

   Add a Program Shortcut from the Mint Menu
Quite often a shortcut is automatically added to the Menu when you install an application. But you might also download a program which requires you to manually add a shortcut for it to run from the Menu. This can be done without breaking a sweat.
  1. Right-click the Mint Menu and select "Edit menu".
  2. Click a software category for example Sound & Video under Applications.
  3. At the right panel, click "+New Item".
  4. Type in a name for the application, for example, ClipGrab.
  5. To the right of "Command", browse to the application where you've downloaded, for example,/home/username/Downloads/clipgrab-3.2.0.9
  6. Click OK and Close buttons.
Note: If an executable file is not accessible, try to add permission to execute the file in the Terminal, for this example assuming the file is extracted to the "Downloads" folder:
cd ~/Downloads
chmod +x clipgrab-3.2.0.9

   Set a Fully Transparent Panel
When you select a theme from Menu > Cinnamon Settings > themes, the theme may come with a non-transparent or semi-transparent panel. But you can adjust the level of transparency for the panel if you like. For example, I've selected a theme called ICS, and I can make it more transparent with the steps below. (Caution: changing the code incorrectly might result in a non-responsive desktop environment.)
  1. Press Alt-2, type gksu gedit and press Enter.
  2. Browse to the folder /usr/share/themes/ICS/cinnamon and open this file cinnamon.css
  3. Search for a section beginning with #panel
  4. Adjust the alpha value in the panel's background color from 0.82 to lower such as 0.35, so that it reads as background-color: rgba(0,0,0,0.35); (The alpha value ranges from 0 [full transparency] to 1 [full opacity].)
  5. Click Save and close the file.
  6. Switch to another theme and back to the ICS theme.

   Roll Up and Down a Window
When you double-click the title bar of a window, the default setting is to maximize a window. Since there's already a maximize button you can use for this, I always like to change the default setting to rolling up (or 'shading') a window when I double-click on its title bar.
  1. Go to Menu > Cinnamon Settings
  2. Click "Windows"
  3. For "Action on title bar double-click", select "Toggle Shade" from the drop-down list.
Now you can roll up a window when you double-click its title bar, and roll it down by double-clicking the title bar again. Simple as that.

   Customize a Theme
Linux Mint (Cinnamon Edition) provides you with several settings for Themes. You can easily select a theme and get a new look for the panel, windows, icons and more in the system.
  1. Customize a ThemeGo to Menu and click the "Cinnamon Settings" icon.
  2. Click the Themes icon.
  3. Under the "Cinnamon themes" tab, select a theme such as ICS.
  4. Under the "Other settings" tab, select a window theme from the drop-down menu to change the window frame and controls (requiring log out and back in to see the results)
You can also make changes by selecting a cursor theme, an icon theme and other themes under the "Other settings" tab.

   Manage Workspaces
Expo ModeLinux Mint creates two workspaces by default, but you can add more and manage your workspaces pretty easily in several ways:
  • Go to a workspace: get your mouse cursor to the top-left corner of the screen (aka "hot corner" or "Expo") to show all workspaces, then click a workspace to jump to.
  • Open an application in a workspace: mouse over a workspace to see all applications in the workspace (aka "Scale"), then select an application.
  • Move an application from a workspace to another: drag an application and drop it to another workspace.
  • Add a workspace: press the "+" sign on the right when in Expo mode.
  • Remove a workspace: mouse over a workspace and click the "x" button when in Expo mode.
These shortcuts are also helpful:
  • Ctrl+Alt+Up goes to Expo.
  • Ctrl+Alt+Down goes to Scale.
  • Ctrl+Alt+Left/Right switches to the left/right adjacent workspace.
  • Ctrl+Alt+Shift+Left/Right moves the active window to the left/right adjacent workspace.

   Hide Drive Icons on the Desktop
In addition to the Computer and Home icons, Linux Mint 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. Go to Menu and click the "Cinnamon Settings" icon.
  2. Click the Desktop icon.
  3. Untick the "Computer icon visible on the desktop", "Home icon visible on the desktop" and "Show mounted volumes on the desktop", then close the window.
The drive icons as well as Computer and Home icons would then disappear from the desktop, simple as that. Remember that you can always access the drives from Menu > Files.

   Change Wallpapers Automatically
You can right click your desktop, select "Change Desktop Background" and choose any one of the wallpapers pre-installed, but you need to do it each time you want to change a wallpaper. What about changing a wallpaper automatically within a certain time interval? Try Wally.
  1. Change Wallpapers with WallyGo to Menu > Software Manager, enter wally into the Search box and click "Install".
  2. Press Alt-F2, type wally and press Enter to run it.
  3. Right-click the Wally icon on the system tray or the notification area, select Settings.
  4. Click "Folders" in the left column, then add /usr/share/backgrounds to the Folder box and tick "Include subfolders".
  5. Click "Settings" in the left column, then tick "Play automatically on application starts". You can also check the option to disable splash screen and auto quit if you wish.
  6. Set the application to auto start, using this tip Auto Start Up an Application (as Wally's option to "Start automatically when system starts" being disabled).
Your wallpaper on the desktop will automatically change following these basic settings when you log back in the system (or right click the Wally icon on the system tray and select "Play").

   Set a Default View in File Manager
Set File BrowserWindows Explorer allows for users to set a default view to all folders. In almost the same way, Linux Mint's Nautilus File Browser allows for these settings:
  1. Go to "Menu" and click the Files icon.
  2. At the top of the File Browser, click "Edit" and "Preferences".
  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 and preview files can be done in the same window as well.

   Preview Files in File Manager
The Linux Mint system has a quick previewer tool Sushi pre-installed for the Nautilus file browser. While running the file browser, you can preview text, PDF, audio and video files, and other supported documents in a single step.
  • Select a file, press Spacebar to preview.
  • Press Spacebar again or Escape to close a preview.

   Change a Folder Icon
When running a Nautilus file browser, you will see that the folder icons are predetermined by the theme you set. If you wish to change a folder icon to another for it to stand out from the system-wide icons, follow these steps:
  1. In Nautilus file browser, right click a folder icon, select Properties.
  2. Under the Basic tab, click the icon image to open up the "Select Custom Icon" window.
  3. In the Location field, type /usr/share/icons, press Enter. (You can hide or unhide the Location field by clicking the Edit button on the top-left of the window.)
  4. Browse and select an icon you want.
  5. Click the Open button on the bottom-right of the window to confirm.
Note: You can change your custom folder icon back to the default by clicking the "Revert" button in the "Select Custom Icon" window at Step 2 above.

   Create an Advanced File Manager
In the Mint file system, you can use Nautilus file manager to browse most files but can only write files in your home folder /home/your_name and its sub-folders such as Desktop and Documents. If you have to rename a folder or write files outside of your home folder using the file manager, you won't be able to but you can create an advanced file manager for this purpose.
  1. Go to Menu > Preferences > Keyboard
  2. Under the "Shortcuts" tab, select Custom Shortcuts, then click the "+" sign to create a custom shortcut.
  3. Enter a name such as Advanced Nautilus in the "Name" box.
  4. Enter gksu nautilus in the "Command" box, then click the Apply button.
  5. Click on Disabled at the Advanced Nautilus row in the Keyboard Shortcuts window (Disabled is then changed to New accelerator...).
  6. Press a new key combination, e.g. Ctrl+Alt+N (New accelerator... is then changed to Ctrl+Alt+N).
Now you can easily access the Advanced Nautilus by pressing the shortcut key you assigned. But be careful since you can use it to delete or change any files on your system.

   Add or Change Keyboard Shortcuts
Keyboard shortcuts are preset in the system, but you can add new ones or change them easily. For instance, change the default shortcut Ctrl+Alt+T (Run a Terminal) to Super+R (press R while holding down the Super [aka Windows] key) by the following steps:
  1. Keyboard ShortcutsGo to Menu > Preferences > Keyboard.
  2. Under the "Shortcuts" tab, select "Launchers" on the left panel
  3. Click "Launch Terminal", and it shows "New accelerator..."
  4. Tap Super+R, and it shows Super+R
  5. Close the window and try the new shortcut. (Note: In this article, I use Ctrl-Alt-T as a default shortcut to Terminal.)
   To disable a shortcut, press Backspace when it shows "New accelerator..." after the step 3 above.
   Keyboard shortcuts can also be set by changing keybinding values with Configuration Editor. Press Alt+F2 and enter gconf-editor, then navigate to apps > metacity > global_keybindings and window_keybindings.

   Terminate Unresponsive Programs
Xkill is part of the X11 utilities pre-installed in Linux Mint and a tool for terminating misbehaving X clients or unresponsive programs. You can easily add a shortcut key to launch xkill with the steps below.
  1. xkillGo to Menu > Preferences > Keyboard.
  2. Under the Shortcuts tab, click the "+" button to create a custom shortcut.
  3. Enter xkill to both the Name and Command boxes and click the Applybutton.
  4. Click on Disabled at the xkill row in the Keyboard Shortcuts window (Disabled is then changed to New shortcut...).
  5. Press a new key combination, e.g. Ctrl+Alt+X (New shortcut... is then changed to Ctrl+Alt+X).
Xkill is ready for use. Press the above key combination to turn the cursor to an X-sign, move the X-sign and drop it into a program interface to terminate the unresponsive program, or cancel the X-sign with a right-click.

   Re-start System without Rebooting
If you press Ctrl+Alt+Delete, Linux Mint brings you a menu to log out your system. But for some reason you might encounter that the system freezes, the mouse cursor can't move, neither pressing Ctrl+Alt+Delete can work.
Remember that there's a shortcut key Ctrl+Alt+Backspace that can bring you back to the log-in screen immediately without the need to reboot the system. That's a time saver.
As an alternative, you can also use Alt+PrintScreen+K to do the same.

   Set Sound Output
If you use a PC with an integrated audio device and it has no sound when playing a media file on a player, try these simple steps to set Sound Preferences for your PC. It works for me for the audio device I have.
  1. Go to Menu > Preferences > Sound to bring up the Sound window.
  2. Under the Hardware tab, change Profile to Analog Stereo Duplex from the drop-down menu. Click "Test Speakers" to check if it works.
  3. Under the Output tab, change Connector to Analog Output from the drop-down menu.
As the items available from the drop-down menus might differ depending on the hardware devices detected by the system, you might want to try other items in the menus to see if they work for your devices.

   Change or Disable Login Sound
Each time when you login to Linux Mint, it plays a login sound. If you don't like to listen to it each time you login, you can easily disable it, or change it to your favorite sound.
  1. Go to Menu > Administration > Login Window.
  2. Under the "Accessibility" tab, change to a sound you like from the drop-down menu for "Login successful", click "Play" to try the sound if needed.
  3. If you want to disable the log-in sound, untick "Login successful"
Log out and log back in to check the new setting for login sound. Similarly you can try out sounds for "Login screen ready" and "Login failed".

   Install Extra Fonts
Do you prefer Windows TrueType fonts to the default fonts installed by Linux Mint? The mscorefonts package containing most Microsoft fonts can be installed and configured easily in a few steps below:
  1. Mint Extra FontsGo to Menu > Terminal.
  2. Paste sudo apt-get install ttf-mscorefonts-installer into the Terminal (by pressing Ctrl-Shift-V in the Terminal after copying the highlighted code).
  3. When prompted, use the arrow left/right keys to navigate and agree to the EULA license terms for the install.
  4. Go to Menu > Cinnamon Settings > Fonts.
  5. Click each of them, pick a font, such as Verdana, and size to configure for window title and so on.
How about installing more TrueType fonts? With your font files, you can manually add them into the system following the steps below:
  1. Press Alt+F2, paste gksu nautilus /usr/share/fonts/truetype into the box and hit "Enter" to open Nautilus in the right folder.
  2. Create a new sub-folder and copy your files ending with .ttf into the sub-folder.
  3. Enter sudo fc-cache -f -v in the Terminal to rebuild the font information.
Besides this, you can run an application such as Font-Manager to view, install, remove fonts and so on.
Note: 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 and install them.

   Install Screenlets
Screenlets are small applications to represent things such as sticky notes, clocks, calendars around on your desktop. You can launch a pre-installed screenlet from Screenlets manager, or install a new one into the manager for launching it. Here are the steps for installing and launching a screenlet, for example, WaterMark System Information.
  1. WaterMark ScreenletInstall Screenlets manager if it has not been added from the Ubuntu Apps Directory. (Note: You can also install it via Software Manager by searching for this application.)
  2. Download the screenlet "WaterMark System Information" to a folder.
  3. Press Alt-F2, type Screenlets into the box and press Enter to run the manager.
  4. Click Install, select Install Screenlet and click OK.
  5. Browse to the folder, select the file downloaded and click "Open" to install the screenlet into the Screenlets manager.
  6. Select the screenlet "WaterMark" and click "Launch/Add". (Tips: you can add more than one WaterMark screenlet and set it to display other system information.)
More screenlets are available for installation from screenlets.org.

   Install Oracle Java Packages
Linux Mint uses OpenJDK by default, but some web services might need the Oracle Java Runtime Environment (JRE) to be installed for running the services properly. If you would like to get the proprietary Oracle Java package for your system, you can download and install it with the steps below:
  1. Go to Menu > Terminal.
  2. Enter sudo add-apt-repository ppa:webupd8team/java to add the partner repository.
  3. Enter sudo apt-get update to update the source list.
  4. Enter sudo apt-get install oracle-java7-installer
At any time, you can check the Java version you're using and configure it when necessary:
  • Enter sudo java -version to check the version of the Java used in the system.
  • Enter sudo update-alternatives --config java to choose the default Java for use in the system.

   Add More Useful Software
Linux Mint's Software Manager lets you search and get free software. You can go to Menu > Software Manager, type in an application to search, download and install it. You can also go to Menu > Administration > Synaptic Package Manager, type in an application name to search and install a software package from the repositories.
Besides this, you can also go to Ubuntu Apps Directory to find the software products you need. If you like a product on the Directory, just click the orange download button and it opens up in a package manager for you to confirm the install.
Alternatively, you can get the latest freeware applications by clicking the Install this now button from theGetDeb Repository after the getdeb package is installed with the instructions given.

   Auto Mount Drives at System Startup
Linux Mint 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 or partitions without the need to manually mount them for access.
  1. Storage Device ManagerGo to Menu > Administration > Storage Device Manager. (If not available, go to Software Manager and search pysdm to install it, then log out and back in the system.)
  2. Extend the list of sda and select the sda you want to auto mount, click 'OK' to configure.
  3. Click the "Assistant" button.
  4. Uncheck "Mount file system in read only mode" and keep "The file system is mounted at boot time" checked.
  5. Click the "Mount" button to mount the partition, then click "Apply" "Close", and restart the system.
In case you wish to remove the auto-mount of a certain drive or partition, you can similarly use Storage Device Manager to do the setting.
Note: If you need to identify disk partitions by label, paste ls /dev/disk/by-label -g in Terminal, or to view partition sizes and file systems, enter sudo fdisk -l. Disk Utility mentioned in "Name or Label a Partition" also gives you a glance of device numbers, partition types, sizes and labels.

   Manually Mount a USB Drive
A USB storage device plugged into the system usually mounts automatically, but if for some reasons it doesn't automount, it's possible to manually mount it with these steps.
  1. Go to Menu > Terminal.
  2. Enter sudo mkdir /media/usb to create a mount point called usb.
  3. Enter sudo fdisk -l to look for the USB drive already plugged in, let's say the drive you want to mount is /dev/sdb1.
  4. Enter sudo mount -t vfat /dev/sdb1 /media/usb -o uid=1000,gid=100,utf8,dmask=027,fmask=137 to mount a USB drive formatted with FAT16 or FAT32 system. OR:
    Enter sudo mount -t ntfs-3g /dev/sdb1 /media/usb to mount a USB drive formatted with NTFS system.
To unmount it, just enter sudo umount /media/usb in the Terminal.

   Name or Label a Partition
Nautilus file manager shows the root directory as File System for your Mint system partition. If you have other partitions (or volumes), it shows them as xx GB Filesystem if they’re not named or labelled.
Using Disk Utility is one of the effective ways to name a partition easily:
  1. Go to Menu > Preferences > Disk Utility
  2. Select the item Hard Disk.
  3. In the Volumes section, click a partition you want to label.
  4. Click "Edit Filesystem Label" (Note 1)
  5. In the Label box, enter a name, e.g. Data-Disk, and click Apply.
The file manager should now show the partition label, such as Data-Disk, instead of xx GB Filesystem.
Note 1: If the option for "Edit Filesystem Label" is not shown, click "Unmount Volume" before hand. In case you can't unmount a volume, try Storage Device Manager to unmount it. See Auto Mount Drives at System Startup.
Note 2: This tip is for naming a partition using Disk Utility, use other advanced features such as format, edit or delete partitions with caution as they can delete data on your disk.

   Auto Start Up an Application
In Windows, you can place a program shortcut in a startup folder for running a program automatically when the system starts. In Linux Mint, you can do the same in this way:
  1. Auto Start Up ApplicationsGo To Menu > Preferences > Startup Applications
  2. Click the "Add" button.
  3. Name a program.
  4. Click the "Browse" button and navigate to File System > usr > bin, where programs are usually installed.
  5. Select a program, click the "Open" button followed by the "Add" button.
The above program will then be listed in additional startup programs. Check if the program runs automatically by logging out and back to the system.

   Change a Login Screen and Theme
Linux Mint offers you a Mint Display Manager (MDM) to configure a login session. You can use it to change a login screen or a theme you like in a few steps:
  1. MGM Theme with a User ListGo to Menu > Administration > "Login Window" to open this window "Login Window Preferences".
  2. Under the "Local" tab, select a built-in theme such as "Circles", then log out and back in to try a new log-in screen.
Get a Theme showing User Names
Under the same tab, you can choose a style "Themed with face browser", which lists user names on a login screen and saves you the trouble of typing out a username each time you log in:
  1. Download an MDM theme for example Super Brothers mdm, which supports this style, from gnome-look.org.
  2. Add the theme file (.tar.gz) by drag-and-drop to the MDM, under the "Local" tab with the style "Themed with face browser" chosen.
  3. Click "Install", select this new theme and enjoy a new login session with a user list.
Tweak a GDM Theme for MDM Display Manager
Some themes are made for Gnome Display Manager (GDM), but you can also add it to MDM with just a minor tweak:
  1. Right click a downloaded theme file (.tar.gz) and select "Open With Archive Manager" from the context menu.
  2. Double click the folder inside the archive manager, then double click this file "GdmGreeterTheme.desktop" in the expanded folder.
  3. In the opened text editor Gedit, change this line [GdmGreeterTheme] to [MdmGreeterTheme], click "Save", "Update" and close Gedit.
  4. Right click the file "GdmGreeterTheme.desktop" and rename to "MdmGreeterTheme.desktop", then close the archive manager.
The archived theme file is then tweaked and can be added to the MGM for use.

   Change Default Boot Options
After full installation, Linux Mint 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 Grub Customizer.
Press Ctrl-Alt-T to call up Terminal, copy following codes and paste (Ctrl-Shift-V) them inside the Terminal to install Grub Customizer.
  1. sudo add-apt-repository ppa:danielrichter2007/grub-customizer
  2. sudo apt-get update
  3. sudo apt-get install grub-customizer
After installation, run Grub Customizer to set the default boot options with the following steps.
  1. Press Alt-F2, type grub-customizer into the box and press Enter to run it.
  2. Click "Preferences" from the menu
  3. Under the "General" tab, select the default entry you like to boot up from the drop-down menu.
  4. Adjust the timeout value if needed, then press the Close button and the Save button.
Avoid changing timeout to 0 seconds if you need to select a system to boot up from a multi-boot menu.

   Clean Up Boot Menu
Each time when Linux Mint updates to a new Linux kernel, the old one is left behind and the boot menu gets longer. If your new Linux kernel works well, it's safe to clean up the boot menu. Do take these steps carefully as incorrectly hiding the items can make your system unbootable. You can check the Linux kernel version you're running by entering this command line uname -r into the Terminal.
To clean up the boot menu, it's pretty straightforward with Grub Customizer used in the tip above.
  1. Press Alt-F2, type grub-customizer into the box and press Enter to run it.
  2. Uncheck the entries you want to hide from the boot menu.
  3. Click the Save button.

   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 Menu > 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, entersudo shutdown -c in the Terminal.
Alternatively, you might want to download and install GShutdown, which is a GUI program for scheduling a time to shutdown the system.

Related Links
Editor
This article is maintained by volunteer editor Jojoyee.
Tags
things to do after installing Linux Mint, Linux Mint tips and tricks, tweak Linux Mint, Linux Mint 11 Katya, Linux Mint 10 Julia.

Wednesday, October 17, 2012

gdm2mdm converter



Are you on Linux Mint and are not finding Login window themes?

Now you can convert your fancy looking GDM login themes to Mint MDM format. I wrote a small app that does the conversion for you. You can as well convert the themes by yourself, this app only makes it easier for you.

Download gdm2mdm from here.


PS: Author takes no responsibility of any data that you lose.

Download link: http://www.mediafire.com/?ua7rivfl1swwbef

Guys, let me know if it worked/did not worked for you. Did you like it? Leave your comments I would be very happy to hear from you :)

Cheers!


Some C++ :p



Read content of file to stringstream


int main()
{
    std::ifstream file( "myFile" );

    if ( file )
    {
        std::stringstream buffer;

        buffer << file.rdbuf();

        file.close();

        // operations on the buffer...
    }
}

Tuesday, October 16, 2012

Linux / mint / Ubuntu - free up disk space


sudo apt clean

Cleans up data in directory /var/cache/apt/archives

Linux C++ / Some basics


Create directory



#include <sys/types.h>
#include <sys/stat.h>

int status = mkdir("dir_path", S_IRWXU);

Saturday, October 13, 2012

Change Linux Login screen - GNOME



Steps

  1. Download nice looking GDM themes (GDM = GNOME Display Manager)
  2. Open Login manager (# sudo mdmsetup or System > Administration > Login Window)
  3. Login manager -> Local -> add -> select the downloaded theme files

Resources

I found my set of nice looking GDM themes from -

Linux HDMI no sound with HDA Intel ALC269VB


Taken from - http://ubuntuforums.org/showthread.php?t=1825882

Digital Output (SPDIF) not working with HDA Intel ALC269VB

Got it working!

Open a terminal
Code:
sudo gedit /etc/modprobe.d/alsa-base.conf
Add this to the bottom of the file
Code:
options snd-hda-intel model=auto
REBOOT

Under Sound Preferences > Hardware > Profile will be Digital Stereo Duplex (IEC958) and selecting that option made the digital spdif output work for me.

Thursday, October 11, 2012

Find list of open ports / listening ports


lsof

Samples 
 # lsof -i -n -P

netstat

Samples
# netstat -tulpn
# netstat -a | egrep 'Proto|LISTEN'
# netstat -ao

Important netstat arguments
-n, --numeric           don't resolve names - this one really saves time ;)
-e, --extend            display other/more information
-p, --programs          display PID/Program name for sockets
-l, --listening         display listening server sockets
-t, --tcp   tcp
-u, --udp   udp
-a, --all, --listening  display all sockets (default: connected)
-c, --continuous        continuous listing 

Tuesday, October 9, 2012

ZooKeeper Overview


Taken from - https://cwiki.apache.org/confluence/display/ZOOKEEPER/ProjectDescription

ZooKeeper Overview
ZooKeeper allows distributed processes to coordinate with each other through a shared hierarchical name space of data registers (we call these registers znodes), much like a file system. Unlike normal file systems ZooKeeper provides its clients with high throughput, low latency, highly available, strictly ordered access to the znodes. The performance aspects of ZooKeeper allows it to be used in large distributed systems. The reliability aspects prevent it from becoming the single point of failure in big systems. Its strict ordering allows sophisticated synchronization primitives to be implemented at the client.
The name space provided by ZooKeeper is much like that of a standard file system. A name is a sequence of path elements separated by a slash ("/"). Every znode in ZooKeeper's name space is identified by a path. And every znode has a parent whose path is a prefix of the znode with one less element; the exception to this rule is root ("/") which has no parent. Also, exactly like standard file systems, a znode cannot be deleted if it has any children.
The main differences between ZooKeeper and standard file systems are that every znode can have data associated with it (every file can also be a directory and vice-versa) and znodes are limited to the amount of data that they can have. ZooKeeper was designed to store coordination data: status information, configuration, location information, etc. This kind of meta-information is usually measured in kilobytes, if not bytes. ZooKeeper has a built-in sanity check of 1M, to prevent it from being used as a large data store, but in general it is used to store much smaller pieces of data.
The service itself is replicated over a set of machines that comprise the service. These machines maintain an in-memory image of the data tree along with a transaction logs and snapshots in a persistent store. Because the data is kept in-memory ZooKeeper is able to get very high throughput and low latency numbers. The downside to an in memory database is that the size of the database that ZooKeeper can manage is limited by memory. This limitation is further reason to keep the amount of data stored in znodes small.
The servers that make up the ZooKeeper service must all know about each other. As long as a majority of the servers are available the ZooKeeper service will be available. Clients must also know the list of servers. The clients create a handle to the ZooKeeper service using this list of servers.
Clients only connect to a single ZooKeeper server. The client maintains a TCP connection through which it sends requests, gets responses, gets watch events, and sends heart beats. If the TCP connection to the server breaks, the client will connect to a different server. When a client first connects to the ZooKeeper service, the first ZooKeeper server will setup a session for the client. If the client needs to connect to another server, this session will get reestablished with the new server.
Read requests sent by a ZooKeeper client are processed locally at the ZooKeeper server to which the client is connected. If the read request registers a watch on a znode, that watch is also tracked locally at the ZooKeeper server. Write requests are forwarded to other ZooKeeper servers and go through consensus before a response is generated. Sync requests are also forwarded to another server, but does not actually go through consensus. Thus, the throughput of read requests scales with the number of servers and the throughput of write requests decreases with the number of servers.
Order is very important to ZooKeeper. (They tend to be a bit obsessive compulsive.) All updates are totally ordered. ZooKeeper actually stamps each update with a number that reflects this order. We call this number the zxid (ZooKeeper Transaction Id). Each update will have a unique zxid. Reads (and watches) are ordered with respect to updates. Read responses will be stamped with the last zxid processed by the server that services the read.


Monday, October 8, 2012

Kejriwal Vs People - Arvind Kejriwal gives straight answers to mango people :)



Original source: http://www.ndtv.com/video/player/hum-log/video-story/249766?vod-mostpopular

हम लोग : केजरीवाल बनाम लोग





इस बार के हम लोग में केजरीवाल बनाम लोग... आम जनता के सवालों का सीधा जवाब दे रहे हैं अरविंद केजरीवाल।

Friday, October 5, 2012

Setting up adb on Linux for android development


Taken from - http://developer.android.com/tools/device.html#setting-up

Setting up a Device for Development


With an Android-powered device, you can develop and debug your Android applications just as you would on the emulator. Before you can start, there are just a few things to do:
  1. Declare your application as "debuggable" in your Android Manifest.
    When using Eclipse, you can skip this step, because running your app directly from the Eclipse IDE automatically enables debugging.
    In the AndroidManifest.xml file, add android:debuggable="true" to the <application> element.
    Note: If you manually enable debugging in the manifest file, be sure to disable it before you build for release (your published application should usually not be debuggable).
  2. Turn on "USB Debugging" on your device.
    On the device, go to Settings > Applications > Development and enable USB debugging (on an Android 4.0 device, the setting is located in Settings > Developer options).
  3. Set up your system to detect your device.
    • If you're developing on Windows, you need to install a USB driver for adb. For an installation guide and links to OEM drivers, see the OEM USB Drivers document.
    • If you're developing on Mac OS X, it just works. Skip this step.
    • If you're developing on Ubuntu Linux, you need to add a udev rules file that contains a USB configuration for each type of device you want to use for development. In the rules file, each device manufacturer is identified by a unique vendor ID, as specified by the ATTR{idVendor} property. For a list of vendor IDs, see USB Vendor IDs, below. To set up device detection on Ubuntu Linux:
      1. Log in as root and create this file: /etc/udev/rules.d/51-android.rules.
        Use this format to add each vendor to the file:
        SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"

        In this example, the vendor ID is for HTC. The MODE assignment specifies read/write permissions, and GROUPdefines which Unix group owns the device node.
        Note: The rule syntax may vary slightly depending on your environment. Consult the udev documentation for your system as needed. For an overview of rule syntax, see this guide to writing udev rules.
      2. Now execute:
        chmod a+r /etc/udev/rules.d/51-android.rules
When plugged in over USB, can verify that your device is connected by executing adb devices from your SDKplatform-tools/ directory. If connected, you'll see the device name listed as a "device."
If using Eclipse, run or debug your application as usual. You will be presented with a Device Chooser dialog that lists the available emulator(s) and connected device(s). Select the device upon which you want to install and run the application.
If using the Android Debug Bridge (adb), you can issue commands with the -d flag to target your connected device.

USB Vendor IDs

This table provides a reference to the vendor IDs needed in order to add USB device support on Linux. The USB Vendor ID is the value given to the ATTR{idVendor} property in the rules file, as described above.
CompanyUSB Vendor ID
Acer0502
ASUS0b05
Dell413c
Foxconn0489
Fujitsu04c5
Fujitsu Toshiba04c5
Garmin-Asus091e
Google18d1
Hisense109b
HTC0bb4
Huawei12d1
K-Touch24e3
KT Tech2116
Kyocera0482
Lenovo17ef
LG1004
Motorola22b8
NEC0409
Nook2080
Nvidia0955
OTGV2257
Pantech10a9
Pegatron1d4d
Philips0471
PMC-Sierra04da
Qualcomm05c6
SK Telesys1f53
Samsung04e8
Sharp04dd
Sony054c
Sony Ericsson0fce
Teleepoch2340
Toshiba0930
ZTE19d2
My set of commands were -

# sudo nano /etc/udev/rules.d/51-android.rules
Inside file: SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="robin"
# sudo chmod a+r /etc/udev/rules.d/51-android.rules


Verified by  -
# adb devices



Wednesday, October 3, 2012

Setting up thunderbird 16 on Linux with Exchange server 2010 emails, contacts and calendar


Update, New guide for Thunderbird 17 is here: http://adhocshare.blogspot.in/2012/10/setting-up-thunderbird-17-on-linux-with.html

Now you could setup Thunderbird 16 with emails, contacts and calendar. Yey!

Lets see what we need and from where to get them

  1. Thunderbird 16
  2. Lightning Version 1.8b1 from https://addons.mozilla.org/en-US/thunderbird/addon/lightning/versions/
  3. Exchange 2007/2010 Calendar and Tasks Provider 3.0.0-rc3 from http://www.1st-setup.nl/wordpress/ (Direct link = http://www.1st-setup.nl/wordpress/wp-content/plugins/download-monitor/download.php?id=13)
  4. ExQuilla for Microsoft Exchange 16.0 from Thunderbird add-ons section

That is it!


PS: Follow the guides for the respective add-ons in case you are not able to set them up together.

Linux Launchers - Kupfer, Synapse - Two Ubercool GNOME Do Alternatives


Taken from: http://www.techdrivein.com/2010/12/kupfer-synapse-two-ubercool-gnome-do.html



This is why I love Linux. If you don't like one application, choose from the alternatives, simple as that. GNOME Do is an incredible launcher application for Ubuntu. But since GNOME Do is basically a Mono application, many might refrain from using it. But don't worry, Synapse and Kupfer are equally good or even better GNOME Do alternatives. Learn more.



Kupfer
Kupfer is a convenient command and access tool that does the job. The default keyboard combination to launch Kupfer is ctrl+space and by simply hitting down arrow, you are able to access your list of applications quite easily. Below screenshot depicts launching of Opera browser in my Ubuntu using Kupfer.

  • To install Kupfer in Ubuntu, simply do the following in Terminal.
sudo add-apt-repository ppa:kupfer-team/ppa && sudo apt-get update
sudo apt-get install kupfer
  • Done. Now goto Applications - Accessories - Kupfer. Now, whenever you want to launch Kupfer, hit ctrl+space. 

Kupfer is quite remarkably light weight and easy to use. It also come with a number of plugins and many of them enabled by default. You could find more Kupfer tips here.

Synapse
Synapse is another good GNOME Do alternative which is quite new also. Synapse definitely looks a lot better and might even be a bit lighter than Kupfer.

And like Kupfer, It can used for launching applications and your internal files as well. In the first screenshot, I am launching Hotot twitter client using Synapse and in the below screenshot I am launching a video(see the preview) downloaded from YouTube using Synapse.

  • Do the following in Terminal to install Synapse in Ubuntu.
sudo add-apt-repository ppa:synapse-core/ppa && sudo apt-get update
sudo apt-get install synapse
  • Done. Now goto Applications - Accessories - Synapse to launch application.

Please note that, both Kupfer and Synapse has ctrl+space as the default key combination. So don't run both applications at the same time. Or else, you need to manually set up different keyboard shortcuts.

After using both of them for nearly an hour, Synapse turned out to be my pick of the two. How about you? And if you are wondering, all those beautiful icons in the screenshots are because of the newly upgraded Faenza 0.8 Icon theme for Ubuntu.