Sunday, August 12, 2012

Xubuntu desktop for Ubuntu

I had long wanted to try XFCE for my Ubuntu. People had always appreciated XFCE for it's simplicity. For starters, post-installation, XFCE can be intimidating. Home screen after login will have nothing, absolutely nothing.

Right-click on the the desktop and create a panel with applets of your choice. Isn't that simple. If you are tired of looking at UNITY and don't like KDE and Ubuntu classic, XFCE is worth an experience to try. It gives a wonderful blend of customization and default behavior.

How to install Xubuntu desktop in Ubuntu12.04

sudo apt-get install xubuntu-desktop

If you did not like what you see, you can get rid of it in 2 ways. Here's how you can remove the items exclusively. You have a choice of cho0sing what you want to remove

Remove Xubuntu desktop completly from ubuntu 12.04
sudo apt-get remove abiword abiword-common abiword-plugin-grammar abiword-plugin-mathview bison blueman brltty-x11 catfish elementary-icon-theme exo-utils flex gigolo gimp gimp-data gmusicbrowser gnome-icon-theme-full gnome-system-tools gnome-time-admin gnumeric gnumeric-common gnumeric-doc gstreamer0.10-gnomevfs gthumb gthumb-data gtk2-engines-pixbuf gtk2-engines-xfce indicator-application-gtk2 indicator-messages-gtk2 indicator-sound-gtk2 indicator-status-provider-pidgin leafpad libabiword-2.8 libaiksaurus-1.2-0c2a libaiksaurus-1.2-data libaiksaurusgtk-1.2-0c2a libao-common libao4 libaudio-scrobbler-perl libbabl-0.0-0 libclutter-1.0-0 libclutter-1.0-common libclutter-gtk-1.0-0 libcogl-common libcogl5 libconfig-inifiles-perl libencode-locale-perl libept1 libexo-1-0 libexo-common libfile-listing-perl libfont-afm-perl libgarcon-1-0 libgarcon-common libgdome2-0 libgdome2-cpp-smart0c2a libgegl-0.0-0 libgimp2.0 libglade2-0 libgnomevfs2-extra libgoffice-0.8-8 libgoffice-0.8-8-common libgsf-1-114 libgsf-1-common libgstreamer-perl libgtk2-notify-perl libgtk2-trayicon-perl libgtkmathview0c2a libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libid3tag0 libido-0.1-0 libilmbase6 libio-socket-ssl-perl libjpeg-progs libkeybinder0 liblink-grammar4 libloudmouth1-0 liblwp-mediatypes-perl liblwp-protocol-https-perl libmad0 libmailtools-perl libnet-dbus-perl libnet-http-perl libnet-ssleay-perl liboobs-1-5 libopenexr6 libotr2 libots0 libpolkit-gtk-1-0 libsexy2 libtagc0 libthunarx-2-0 libtie-ixhash-perl libtimedate-perl libtumbler-1-0 liburi-perl libwv-1.2-3 libwww-perl libwww-robotrules-perl libxfce4ui-1-0 libxfce4util-bin libxfce4util-common libxfce4util4 libxfcegui4-4 libxfconf-0-2 libxml-parser-perl libxml-twig-perl libxml-xpath-perl libxss1 lightdm-gtk-greeter link-grammar-dictionaries-en m4 mpg321 murrine-themes orage parole pastebinit pidgin pidgin-data pidgin-libnotify pidgin-microblog pidgin-otr plymouth-theme-xubuntu-logo plymouth-theme-xubuntu-text python-configobj python-glade2 quadrapassel ristretto screensaver-default-images synaptic system-tools-backends tango-icon-theme tango-icon-theme-common tcl8.5 thunar thunar-archive-plugin thunar-data thunar-media-tags-plugin thunar-volman ttf-droid ttf-lyx tumbler tumbler-common xchat xchat-common xfburn xfce-keyboard-shortcuts xfce4-appfinder xfce4-cpugraph-plugin xfce4-dict xfce4-fsguard-plugin xfce4-indicator-plugin xfce4-mailwatch-plugin xfce4-mixer xfce4-mount-plugin xfce4-netload-plugin xfce4-notes xfce4-notes-plugin xfce4-notifyd xfce4-panel xfce4-places-plugin xfce4-power-manager xfce4-power-manager-data xfce4-quicklauncher-plugin xfce4-screenshooter xfce4-session xfce4-settings xfce4-smartbookmark-plugin xfce4-systemload-plugin xfce4-taskmanager xfce4-terminal xfce4-utils xfce4-verve-plugin xfce4-volumed xfce4-weather-plugin xfconf xfdesktop4 xfdesktop4-data xfwm4 xfwm4-themes xscreensaver xscreensaver-data xscreensaver-gl xubuntu-artwork xubuntu-default-settings xubuntu-desktop xubuntu-docs xubuntu-icon-theme xubuntu-wallpapers && sudo apt-get install ubuntu-desktop

If that is way complicated for you, here are some other alternatives for you
sudo apt-get autoremove --purge xubuntu-* && sudo apt-get autoremove --purge xfce*
sudo apt-get autoremove --purge $( dpkg-query -l *xubuntu* | grep ii | tr -s " " | cut -d" " -f2; dpkg-query -l *xfce* | grep 'ii' | tr -s " " | cut -d" " -f2 )

Fix repository issues in Ubuntu

If you are experimenting on your LINUX PC chances are highly likely that you will mess up your repository. Then on it will be a pain to do an update, either through command line or from synaptic package manager

I am restless with my LINUX box all the time, I am either installing something in it or changing configurations. Quite recently I installed KDM/XFCE to evaluate it for my friend and I somehow seem to have  messed up my environment. Every time I attempted to execute "sudo apt-get update" I'd see the following message. I tried to go around the issue with Synaptic. But Synaptic will throw this error when I open it. So I was sort of struck and I need to get out soon. Here's what I had to do to fix it

Error
.......
.......
Fetched 2 B in 8s (0 B/s)                                                    
W: Failed to fetch gzip:/var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_precise-updates_main_i18n_Translation-en  Encountered a section with no Package: header
W: Failed to fetch gzip:/var/lib/apt/lists/partial/us.archive.ubuntu.com_ubuntu_dists_precise-updates_universe_i18n_Translation-en
E: Some index files failed to download. They have been ignored, or old ones used instead.

Note: Make sure you close Synaptic/package manager before you attempt to do any of this

After a lot of hunt, I creates a simple shell script "fix_update.sh" with the following contents

sudo fuser -vvv /var/lib/dpkg/lock
sudo rm /var/lib/apt/lists/lock
sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
sudo rm -rf /var/lib/dpkg/updates/*
sudo rm -rf /var/lib/apt/lists
sudo rm /var/cache/apt/*.bin
sudo mkdir /var/lib/apt/lists
sudo mkdir /var/lib/apt/lists/partial
LANG=C;sudo apt-get clean
LANG=C;sudo apt-get autoclean
LANG=C;sudo apt-get --purge autoremove
LANG=C;sudo apt-get update -o APT::Cache-Limit=25165824
sudo dpkg --clear-avail
sudo dpkg --configure -a
LANG=C;sudo apt-get -f install
LANG=C;sudo apt-get --fix-missing install
LANG=C;sudo apt-get update -o APT::Cache-Limit=25165824 && sudo apt-get dist-upgrade


Save the file
Grant execute privilege - chmod +x ./fix_update.sh
Execute the script - ./fix_update.sh
VOILA, you are good to go now
Save the file in your home custom scripts directory, it will always be handy

Saturday, August 4, 2012

Trackpad issues in Ubuntu


If you have problems with your trackpad - issues like right-click, drag etc. Out of the box it does not work because Ubuntu sometimes does not recognize that laptop does not have buttons over the trackpad to differentiate left and right-click's.

Here's a way to get around
Open terminal and do the following

If you are using a "samsung" laptop, do the following else skip this step
sudo add-apt-repository ppa:voria/ppa
sudo apt-get install update && sudo apt-get install upgrade
sudo apt-get install samsung-tools
sudo apt-get install samsung-laptop
sudo reboot

In the command prompt type xinput
You should see something like this along with other output

 ETPS/2 Elantech Touchpad                 id=12 [slave  pointer  (2)]

cd ~
wget "http://people.canonical.com/~cndougla/enable-clickpad.sh"
chmod +x enable-clickpad.sh
wget "http://people.canonical.com/~cndougla/enable-rightbutton.sh"
chmod +x enable-rightbutton.sh

Now that you have the scripts that will do the job for you and you have execute permissions set for them, do the following. Parameter 12 is passed to the script. We got the value from xinput  command's output (id=12). If you see some other value than 12 show up in your output, please use that
~/enable-clickpad.sh 12
~/enable-rightbutton.sh 12

Now you should be able to right-click, drag and drop easily without any external mouse.

Well issue now is when you restart your OS, all these changes are gone. You need this functionality all the time. Here's what you may have to do. Move those scripts to /usr/local/sbin directory

/usr/local/sbin/enable-clickpad.sh 12

sudo mv ~/enable-clickpad.sh /usr/local/sbin/
sudo mv ~/enable-rightbutton.sh /usr/local/sbin/

Open .gnomerc through gedit/vim/vi or editor of  you choice and type in the following
gedit ~/.gnomerc
/usr/local/sbin/enable-rightbutton.sh 12


If you don't like a naive .gnomerc file like the one above, feel free to add some error handlers to do things the way you want


That's pretty much it. Now reboot and enjoy

Wednesday, August 1, 2012

Compiz Settings for Ubuntu 12.04


Install compiz config settings manager from Ubuntu Software center

Animations and installations
In order to have support for all the animations of your choice like explode, Magic lamp, burn, 3D cube, etc, make sure you have done the following
sudo apt-get install compiz-fusion-plugins-extra compiz-fusion-plugins-main compiz-plugins

Make sure all of them are installed with out any errors

Wobbly windows
open Compiz Config Settings Manager from HUD or from terminal type "ccsm"
Select "Effects" from Category list on the left side
check on "Wobbly Windows". Make sure the checkbox is selected
Move the windows around you will see the windows wobble

Animation - Open window
open Compiz Config Settings Manager from HUD or from terminal type "ccsm"
Select checkbox against Animations
Select "Animation Add-on"
Click on Animations, that should show you more options for Animations
Select "Open Animations" tab and choose the first item, change the effect to "Leaf Spread"

Animation - Close Window
open Compiz Config Settings Manager from HUD or from terminal type "ccsm"
Select checkbox against Animations
Click on Animations, that should show you more options for Animations
Select "Close Animations" tab and choose the first item, change the effect to "Burn"

Animation - Workspace switcher
open Compiz Config Settings Manager from HUD or from terminal type "ccsm"
Select "Desktop" category from the left side of the settings manager
Select Checkbox "Desktop Cube"
Select Checkbox "Rotate Cube"
Click on "Rotate Cube", this will take you to more settings for "Rotate Cube"
Select Bindings tab choose keys you wish to use for "Rotate Left" and "Rotate Right"

Add compiz in startup
From HUD open "Startup Application"
Click on the Add button
Give it a name "Compiz" and set command as "compiz --replace"

Some common issues with CCSM and fixes
Non-movable windows
open Compiz Config Settings Manager from HUD or from terminal type "ccsm"
Select "Windows Management" from categories in the left
Make sure you have the following choices selected - "Move Window", "Resize Window", "Place Windows", "Extra Windows", "Extra WM Actions", "Window Rules"

Missing Title Bar
open Compiz Config Settings Manager from HUD or from terminal type "ccsm"
Select "Effects" from categories in the left
Make sure "Windows Decoration" is selected

Restart plugin
compiz --replace

Missing Unity
open Compiz Config Settings Manager from HUD or from terminal type "ccsm"
In the Filter search for "Unity"
Select the unity plugin that shows up in teh right
Make sure "Enable Ubuntu PLugin" is selected

Reset to default settings
open Compiz Config Settings Manager from HUD or from terminal type "ccsm"
Select Preferences
Select "Reset to Defaults"