Friday, August 30, 2013

Installing Ubuntu on a fresh system

Ubuntu 13.04

1. Download the iso file and create a live bootable USB stick (http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows).

2. Boot the system using the USB stick and install Ubuntu in a 50 GB or 15% of total capacity of your hard disk, whatever is greater. Create a swap equal to installed memory but do not create any partitions at present. Leave rest of the disk free.

3. Log on to new user and create two (or more) encrypted partitions.

4.  Open software center and uninstall useless software.

5. I also remove unity lenses by executing following commands as root:

apt-get autoremove unity-lens-shopping 
apt-get autoremove unity-lens-music 
apt-get autoremove unity-lens-photos 
apt-get autoremove unity-lens-video

6. Execute following command as root:

apt-get update && apt-get upgrade

7. Install essential software:
apt-get install geany g++ vlc gimp ghex 

8. Now open "Disks" utility and create two (or more) encrypted partitions.

Saturday, August 17, 2013

Transition from Gnome 3 to LXDE

1. Install LXDE as root
  # yum install @lxde-desktop

2. Log on as standard user in LXDE mode

3. Edit the file ~/.config/openbox/lxde-rc.xml and change font size for ActiveWindow and InactiveWindow from 10 to 1. This will finally make title bars completely vanish.

4. To enable clicking by tapping on touchpad, add following line to /etc/xdg/lxsession/LXDE/autostart:
  @synclient TapButton1=1

5. (Optional) If you want to adjust font size create file ~/.Xresources and add following line to it (default value 96):
  Xft.dpi: 163

6. Right click the "panel" and click on "panel settings" and set them as follows:
  Geometry
    Edge: Top
    Alignment: Left
    Width: Dynamic
    Height: 18
    Icon Size: 16
  Panel Applets
    Menu
    Application Launch Bar
      Select "Application Launch Bar" and clik on "Edit".
      Then add following items to Application Launch Bar:
        Files
        Firefox
        Terminal
        Sound
    System Tray
    Battery Monitor

7. Skip to step 9 if you don't want Mac-Expose/Gnome-3 style window switching.
  Edit the file ~/.config/openbox/lxde-rc.xml again and add following lines:
  <keybind key="A-grave">
    <action name="NextWindow"/>
  </keybind>
 
  Change key bindings for A-Tab to follows:
 
  <keybind key="A-Tab">
    <action name="Execute"><command>skippy-xd</command></action>
  </keybind>

8. Skippy-xd installation:
  Install mercurial
    # yum install mercurial
 
Install dependencies:
    # yum install libX11-devel libXmu-devel libXfixes-devel libXdamage-devel   
  Install skippy-xd.
    $ hg clone https://code.google.com/p/skippy-xd/
    $ cd skippy-xd
    $ make
   
    If make command results in error, verify if all dependencies given on the following link are installed : http://code.google.com/p/skippy-xd/wiki/Installation
   
    Copy skippy-xd executable to /usr/bin as root:
      # cp skippy-xd /usr/bin

9. Log out and log in again

How to survive the above configuration:
1. Use icons in the panel on the top to launch various applications.
2. Some applications can be launched by pressing Win-r key.
3. Since no window has title bar you can close a window by pressing Alt-F4
    You can replace Alt-F4 with some other value like Alt-q or Ctrl-q in the lxde-rc.xml file.
4. Use Alt-Tab or Alt-` to switch between applications (Mac-Expose/Gnome-3 style).

Wednesday, June 26, 2013

Advanced Yum

Yum History

Sometimes after an update you may want to revert to an older version of a package.

Following command shows you summary of last few yum transactions:

yum history

If you want to see more details, use the command:

yum history info 26

where 26 is to be replaced with the ID of the particular transaction you are interested in.

Search for a particular package

 Try
yum search libXss


Happy yumming!

Wednesday, June 12, 2013

Making Gome 3 Usable ( 11 Tips and a Confession)


After installing the latest version of Gnome 3 if you were shocked by the lack of usability and wondered how hard or impossible it was to configure small things, say, window font size then I have to confess that this is exactly what I also felt when I installed a fresh copy of Gnome 3 flavored Fedora.

Still, I'm a fan of Gnome 3 and after relevant customization I find it more usable than Windows 7 or OS X 10.8.

Here's a list of important changes I make. You may have to change the values of parameters so that they work well on your hardware.

1. Install custom fonts:

mkdir ~/.local/share/fonts

  Dump your favorite fonts in this folder. My favorite are Verdana and Arial.

2. Improve the interface:

gsettings set org.gnome.desktop.interface text-scaling-factor '1.7'

gsettings set org.gnome.desktop.wm.preferences titlebar-font 'Arial Narrow Bold 0'

gsettings set org.gnome.desktop.interface font-name 'Arial Narrow 11'

gsettings set org.gnome.desktop.wm.keybindings close "['<Alt>Q']"

You might have noticed that now I have no way of closing a window with mouse. Only way to do is to press Alt-Q.

3. In mouse and touchpad settings enable "two finger scroll" and "tap to click"

4. Resize Gnome panel

http://useful-linux-tips.blogspot.in/2013/02/resize-gnome-panel.html

5. Remove unwanted entries from Nautilus

http://useful-linux-tips.blogspot.in/2013/02/modify-places-menu-in-nautilus-file.html

6. Remove all favorite apps from gnome panel except firefox, nautilus and one or two other apps that you frequently use.

7. I generally clear my home folder and tell browsers to directly download in my home folder from where I transfer important data (if any) to a different partition which is fully organized.

  rmdir Public/ Documents/ Music/ Pictures/ Videos/ Templates/ Desktop/ Downloads/

8. Disable recent documents:

  rm .local/share/recently-used.xbel; mkdir .local/share/recently-used.xbel

9. Remove all default bookmarks by erasing all contents of

    vi .config/gtk-3.0/bookmarks

   Rather, manually bookmark folders that you frequently visit.

10. Disable auto update from all accounts by command

 gpk-prefs

11. Make fonts smooth if needed:

http://useful-linux-tips.blogspot.in/2013/01/smooth-font-rendering-on-fedora-18.html

That should make it usable enough.

Tuesday, June 4, 2013

Convert mp3 to wav format using mpg123

Audacity that comes from Fedora's repository, by default, does not support loading and saving mp3 files.

Using mpg123 (you may need to install mpg123), mp3 files can be easily converted to wav files for further editing.

mpg123 -w music.wav music.mp3

I recommend saving your work in lossless compressed format like flac rather than mp3.