Saturday, December 12, 2009

FEDORA 12 LXDE SPIN

After reading about super effecient lxde and having xfce earlier, I was glad that fedora came up with lxde spin. After some trial and errors and lot of googling here is my personal installation guide for my dell xps 1210

-Download and install lxde spin for fedora 12. I used the 64bit spin on my dell xps 1210

-setup sudo
login as root and execute following
echo 'loginname ALL=(ALL) ALL' >> /etc/sudoers

-disabled selinux. Though this provides great security, sometimes it is very irritating for home use.
sudo vi /etc/selinux/config
Change SELINUX=enforcing to SELINUX=disabled

-setup rpmfusion and fastestmirror
sudo rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
sudo rpm -ivh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
run 'sudo yum install yum-plugin-fastestmirror'

-install apps that i like to use :-)
sudo yum install firefox mplayer gecko-mediaplayer mencoder gnome-mplayer java-1.6.0-openjdk java-1.6.0-openjdk-devel java-1.6.0-openjdk-plugin pidgin audacious audacious-plugins-freeworld* gpicview brasero

-Firefox tweaks
Installed following add-ons
firebug
firecookie
codeburner for firebug
colorzilla
downloadhelper
fastdial
http resource test
jsview
live http headers
measureit
modify headers
refcontrol
screengrab
Also set following params in about:config for better performace
network.dn.disableIPv6=true
network.http.pipelining=true
network.http.pipelining.maxrequests=8
network.http.pipelining.ssl=true
network.http.proxy.pipelining=true
ui.submenuDelay=0
nglayout.initialpaint.delay=0

-install flash plugin
For 32 bit sudo yum install flash-plugin should do it, but since I have 64 bit dual core, I downloaded http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-10.0.42.34.linux-x86_64.so.tar.gz and installed the plugin manually.
sudo tar -zxvf libflashplayer-10.0.32.18.linux-x86_64.so.tar.gz -C /usr/lib64/mozilla/plugins
[Well, make sure you get the latest version of the flash from this page http://labs.adobe.com/downloads/flashplayer10_64bit.html]

-install chromium instead of googe chrome
Download following rpm from http://spot.fedorapeople.org/chromium/F12/
v8-2.0.0-1.20091118svn3334.fc12.x86_64.rpm
chromium-4.0.252.0-0.1.20091119svn32498.fc12.x86_64.rpm

sudo yum install minizip nss-mdns
sudo rpm -ivh v8-2.0.0-1.20091118svn3334.fc12.x86_64.rpm chromium-4.0.252.0-0.1.20091119svn32498.fc12.x86_64.rpm

-install opera - seriosly page loads are faster than firefox
sudo yum install qt3
Download opera-10.10.gcc4.shared.qt3.x86_64.rpm from http://www.opera.com/download/
sudo rpm -ivh opera-10.10.gcc4.shared.qt3.x86_64.rpm

-install microsfot fonts.
Download the rpm created by at Mauriat. Many thanks to Mauriat Miranda for the rpm and notes at http://www.mjmwired.net/resources/mjm-fedora-f12.html
run 'sudo rpm -ivh msttcore-fonts-2.0-3.noarch.rpm'

-remove unwanted apps
run 'sudo yum remove midori gxine lxmusic xmms2 abiword iok osmo'
I also removed lot of unwanted font packages. eg. I dont read arabic, chinese, japanese and many more so why install the fonts.
run 'package-cleanup --leaves' and uninstall the listed packages
run 'sudo yum update' to update all the installed packages.
Once done reboot system

-webcam, worked out of the box with cheese application
sudo yum install cheese


-Install skype
sudo gpg --keyserver pgp.mit.edu --recv-keys 0xD66B746E
sudo gpg -a -o /etc/pki/rpm-gpg/RPM-GPG-KEY-skype --export 0xD66B746E
Add following to /etc/yum.repos.d/skype.repo and then call yum installed skype
[skype]
name=Skype Repository
baseurl=http://download.skype.com/linux/repos/fedora/updates/i586/
#gpgkey=http://www.skype.com/products/skype/linux/rpm-public-key.asc
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-skype
enabled=1
gpgcheck=1

Unfortunatly I found that this is the old version of skype. So I downloaded the new version from http://www.skype.com/go/getskype-linux-beta-fc10 and manually installed it
sudo rpm -Uvh skype-2.1.0.47-fc10.i586.rpm
Good thing with using the repo first was that the dependencies got installed and I need not manually hunt for those rpm packages.
Unfortunatly again, the new skype had issues with my webcam so i reverted back to the repo based skype version.

-Install Virtual box. I have win xp virtual machine in VirtualBox which I used for windows specific use eg. office apps.
Visit virtualbox site and check instructions for repo installation. But before that make sure you have following installed.
sudo yum install dkms gcc kernel-headers

-issue with touch pad. Scrolling and clicks did not work out of the box. I enabled click using following
sudo yum install xorg-x11-drv-synaptics
cp /usr/share/hal/fdi/policy/20thirdparty/10-synaptics.fdi /etc/hal/fdi/policy/
vi /etc/hal/fdi/policy/10-synaptics.fdi
Remove the comments around the match section in the file.
Either reboot or run following to see if touchpad click works
synclient TapButton1=1
Now for vertical scroll To verify if it's on or off, do the following
synclient -l | grep -i vertedge
If it reports VertEdgeScroll = 0, try to manually enable it
synclient VertEdgeScroll=1
If above works then add following merge line in /etc/hal/fdi/policy/10-synaptics.fdi
<merge key="input.x11_options.VertEdgeScroll" type="string">1</merge>
Many thanks to Walter Francis for his post http://fedorasolved.org/Members/khaytsus/configuring-synaptics-using-hal/?searchterm=None

-issue with keyring. When I setup my wireless, keyring popup asked me for password and I set up one. Then on every reboot if promted me to enter it which was annoying. So went and deleted /home/bhupendra/.gnome2/keyrings/default.keyring. Next time I logged back in, left keyring password emty and chose unprotected keyring settings.

-remove wallpaper, modify slim background
Slim's login screen wallpaper is background.jpg in /usr/share/slim/themes/default. I removed the symlink and dropped my own plain wallpaper.
Next to remove wallpaper on desktop, I right clicked desktop, click desktop settings and unchecked wallpaper. Instead set background color to #1B144D which was close to my login screen background image.
I wanted to remove use of wallpaper to minimize system resource use.

-disable plymouth boot screen
The plymouth graphical boot in fedora is nice but I wanted to remove it and see the conole log.
Removed rhgb quite from /boot/grub/grub.conf to achive this.
If you just want to try out other plymouth theme eg. solar (I was using this for a long time even in F11)
sudo yum install plymouth-theme-solar
plymouth-set-default-theme solar
/usr/libexec/plymouth/plymouth-update-initrd

-easy vpnc setup
I need to use cisco vpn to connect to office network. Originally I was using vpnc package and configured the setup in /etc/vpnc/default.conf. But F12 comes with nice gui setup via network manager. Make sure you have following packages for cisco
sudo yum install NetworkManager-vpnc vpnc

-bluetooth
Since lxde does not have it's own bluetooth manager, I installed bluez and hoped it would work. It did work but few gnome specific packages were also installed. Atleast I was able to see my nokia n80's bluetooth.

-minor issue with gmixer and volume control buttons on laptop
Gmixer is good but by default it sets control buttons to my mic instead of speaker. I have to manually select HDA intel alsa mixer in the selection and then change volume

-connecting to tv
Miss the gnome system-config-monitor. Using monitor settings in lxde i.e lxrandr I could only change screen resolution. I wanted to replicate my laptop screen to tv when connected with svideo and came up with following scripts.
#tvconnect
xrandr --auto --output LVDS1 --mode 800x600
xrandr --auto --output TV1 --mode 800x600 --same-as LVDS1

#tvdisconnect
xrandr --output TV1 --off
xrandr --output LVDS1 --mode 1280x800

I had to change the resolution from 1280x800 to 800x600 since that was the correct fit for my big non hd toshiba tv.

With all of the above changes, my cpu usage has seldom crossed 20% and memory usage was always under 500mb under normal use. Think my F12 lxde xps 1210 is faster than better high end laptops running bloted win* :-)

Wednesday, September 9, 2009

speed up gnome on fedora 11

disable unnecessary services eg. bluetooth and print services when not in use.

cd

touch .gtkrc-2.0
echo "gtk-menu-popup-delay = 0"| tee -a .gtkrc-2.0


login as root or sudo
yum install gconf-editor
open gconf-editor by typing it on terminal
goto /->apps->metacity->general and check 'reduced resources'

Sunday, March 22, 2009

Need two OS on single laptop/machine

-Download virtualbox from http://www.virtualbox.org/wiki/Downloads. Downloads available for multiple host OS.
-I installed rpm for fedora 10 and also installed dkms so that my kernel upgrades do not give probelms
-The install creates a group vboxusers. my user being 'bhupendra' I added it to this group.
-To start virtulbox gui type in VirtualBox [V abd B should be capital] and follow the instructions.

Well I thought things would be ok, but while launching VirtualBox, I got following error:
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (2.6.27.19-170.2.35.fc10.i686) or it failed to
load. Please recompile the kernel module and install it by

sudo /etc/init.d/vboxdrv setup

You will not be able to start VMs until this problem is fixed.
WARNING: The compilation of the vboxdrv.ko kernel module failed during the
installation for some reason. Starting a VM will not be possible.
Please consult the User Manual for build instructions.

So changed to root user and ran /etc/init.d/vboxdrv setup only to find out that the setup failed. Fortunately the log showed that I did not have gcc installed so did yum install gcc. After that the setup was smooth and VirtualBox gui was up.

Friday, February 6, 2009

disk full on fedora 10? clean it up...

Use gnome's disk usage analyser to get insight on possible junk data. It came handy for me.

I saw deleted torrent data from my transmission in /home/myusername/.local/share/Trash/files. Ran 'rm-rf *' to delete everything here.

Have heard that tempwatch is good to delete /tmp folder. Run or add tmpwatch to cron tab. 'tmpwatch -maf 4 /tmp' deletes tmp files older than 4 hours.

run 'yum clean all' to clear yum cache.

Sometimes we install a package which install bunch of dependencies. Later when we remove using yum, the dependencies are not removed. Use
package-cleanup --leaves
to get list of unused packages and remove them.

After doing above 3 things my 'df -h' statistics jumped from 25% / usage to 13% / usage :-)

Wednesday, January 21, 2009

connect office networks with vpn on linux

-install licensed cisco vpn client on windows os to check if it works fine.
-copy the *.pcf file which is the configuration file.
-on your linux install vpnc
-run following to get the value for [decrypted enc_GroupPwd]
cisco-decrypt [value of enc_GroupPwd from the *.pfc]
-now edit /etc/vpnc/default.conf with values from pfc file
IPSec gateway [Host]
IPSec ID [GroupName]
IPSec secret [decrypted enc_GroupPwd]
Xauth username [your username for vpn connection]
-now run "sudo vpnc", it would ask for password key and once set runs as a background process
-to disconnect type "vpnc-disconnect"

Sunday, January 18, 2009

Register and create your website - all for free

DOMAIN REGISTRATION AND DNS FOR FREE
-Open account on freedns.afraid.org
-I did not have any domain registered. once logged in, click the "registry" to choose your domain eg. mooo.com and click on it. Ensure that the domain is public.
-Now you are creating a subdomain from the available domains. Select type A, type your subdomain eg. I did bhupendra. Your external ip would already be captured. Hit save and you are done.

SETTING UP LOCAL SITE
-I have a laptop running fedora 10 configured to netgear wireless router and had to make few changes as follow:
#router changes ------------------------------------------------------------------------------
-keep router as DHCP for devices attached to the network eg. my laptop however I reserved 192.168.1.2 for my laptop
-enable port forwarding for http on port 80 from my router to
192.168.1.2
-both the above steps can vary depending on your router however most of the basic router do come with these features. Also be sure to upgrade your firmware just to get best security and features.
#laptop changes-------------------------------------------------------------------------------
-system should be aware of the network ip address. I removed the dhcp setting for my wlan0 and set static ip of 192.168.1.2 with subnet mask of 255.255.255.0 as specified by my router.
-open system-config-firewall and enable http/80 which is disabled by default
-install apache. yum install httpd httpd-tools
-edit /etc/httpd/conf/httpd.conf to remove welcome page include and/or comment entries in /etc/httpd/conf.d/welcome.conf
-create /var/www/html/index.html to serve your custom welcome page
-"apachectl start" to start your apache.

TEST
-goto http://localhost to verify if your apache is up and default index.html is picking up
-goto http://192.168.1.2 or http://yournetworkip to see if your static ip for network is all ok
-goto http://bhupendra.mooo.com to check if your external domain is working

A WORD FOR IMPATIENT
If you are impatient like me, just take a break go out for a smoke or something. And even after few hours things dont work, get a manual for your router which I did and found about a NAT filtering option which is a firewall on the router which was blocking the port forwading. I changed the NAT filtering from secured to open and things began to work.

EXTERNAL IP ALWAYS CHANGES? no probs
-download script to update the external ip from http://freedns.afraid.org/scripts/freedns.clients.php
-I use http://freedns.afraid.org/scripts/dnsactual.sh.txt simple and clean. Just download the script, remove txt, give permission of your default user on linux and add crontab entry to schedule it to run say 5 min or more as per your ip lease expiry.

THE DOWNSIDE AS I SEE IT........
http://freedns.afraid.org/faq/#16
alternative: If you want your site to be google seo friendly then register a domain (not free) and set the domain in your freedns account. you can then create subdomain on the registered domain instead of using it off the available freedns public domains.