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.

Thursday, November 27, 2008

Fedora 10 out and on my xps 1210

Fedora 10 went GA on 25th nov 08 and I was counting days for over a month. I was pretty happy with fedora 9 with few exception of system crashes when using skype. In any case I had to try out the new version. Believe me, I never had a troublefree all working linux before. Always something or other had problems. Audio, else video or flash or jdk.......but not this time.

-INSTALL
This time instead of downloading the dvd image, i decided to get the gnome live cd since the download times is less for this.
Booted through the cd, click the desktop item and the install started. If you have installed fedora before this should not be any different.
My wireless internet was easy to configure and less cranky than on fedora 9.

-POST INSTALL
no open office, no jdk
instead found abiword
Fine good for me, I prefer to install openoffice and jdk manually myself.
Here is the list of packages I removed/added:
yum remove pidgin
yum install empathy [bye bye pidgin and hello empathy - gtalk call support]
yum install vlc [for all my video needs]
I had xmms on fedora 9 but decided to use rythmbox going forward as it was already installed. There are radio channels in it. free music :-)
yum install gnome-applet-netspeed [I like to see how much bandwidth my comcast internet connection gives, I had to configure the applet on panel]
yum remove abiword
yum install wget
wget http://www.skype.com/go/getskype-linux-fc7 [downloading skype rpm]
rpm -ivh skype-2.0.0.72-fc5.i586.rpm [after install, had to chage audio settings]
Also downloaded the rpm for adobe reader and flash player from adobe site and installed them. The flash plugin showed up on about:plugins on firefox and youtube was working without any headaches [really surprised]y
yum install gstreamer-plugin* [to add mp3 support to rythmbox]
For java and openoffice, I followed the install instruction on respective sites. [quite similar to my install on fedora 9 actually]

Ahh.....after a day, when I actually installed jdk1.6.0.10, my logmein on firefox did not work. firefox started hanging on remote connectivity. Suspecting java plugin issue, reverted back to the old version i had on fedora 9 which was jdk1.6.0.07. Everything works fine now.

oops few more days and I found that I am not able to connect my laptop to tv to watch youtube videos. After heavy googling, i came to know that something has broken in f10 and was forced to play around with randr
-to see connections run
xrandr
-to configure dual monitor
xrandr --output TV --mode 800x600 --set TV_FORMAT NTSC-M
-to stop replication to tv
xrandr --output TV --off

Though my entire 12 inch monitor is not correctly replicated on tv screen, it's sufficient to see youtube videos on full screen mode.

Sunday, October 26, 2008

My personal Fedora 9 installation

I have dell xps 1210 and fedora 9 works superb with it.

-partition layout
2 primary partition one for winxp and one for linux. Third partition for data to be shared by both OS. First and third NTFS and formatted 2nd as ext3 using partition magic.

-Dual booting
My winxp was always present but i rarely use it. In order to experint with other OS (to name a few: FreeBSD and fedoras) I installed GAG boot manager.

-Install fedora 9
Download fedora 9 dvd for gnome preferably using torrent. Boot the dvd for install. Do not forget to "remove all linux partitions" (since we had preformatted 3rd partition using ext3) and select advanced boot loader configuration to install linux boot loader on first sector of boot partion instead of MBR.

-what to install
I did not select to install games and java or any other developer tools since i wanted to install them manually. Also do not install open office if you plan intall java manually. open office from software repo install jre 1.5. I wanted everything to run on jdk 6

-post installation
1. Firs thing i configured was my wireless network.
2. Once internet was available i got loads of software updates, of which i updated most using yum and ignored rest.
3. download EasyLife for fedora 9. This does most of the boring but much needed tasks like adding livna repo, installing skype, add flash support to firefox etc. Select whatever you like when you run the script, note that here also i selected not to install java since i wanted the complete sun version instead of almost perfect open jdk implementation.
4. configure skype
Go to skype options - sound devices. For my laptop configuration following works when earphones and mic are plugged in
sound in: usb device 0x46d:0x8c6 (hw:U0x46d0x8c6,0)
sound out:HDA intel (hw:intel,0)
ringing:
HDA intel (hw:intel,0)
Play around with the options till you figure out which one is for you. I did the same.
5. install pidgin for all my yahoo/gmail/aol messenger needs using yum
6. installed xmms and vlc for all my audio and video needs
7. installed k3b for all my cd/dvd burning needs
8. I hated the default desktop on this one and even if i changed it, the same old image was appearing on logon screen. Seems some modifications are in plan and i had to use a hack to get what i want. I liked the sulphur wallpaper. So i went to /usr/share/background/waves and edited all the image paths in waves.xml to point to sulphur-on-waves.png located in same folder.

-Note though rpm provides easy interface for installing uninstalling packages, for developer tools i always prefer installing manually for 2 reaons:
1. I can intall latest version which may not be available in rpm
2. I have control over what to install and where to install.

-installing jdk
Downloaded and installed jdk-6u7-linux-i586.bin under /opt. Follow instructions for jdk install for non-rpm binary. It's really sweet.
I had to edit /home/bhupendra/.bashrc to have java_home and path available to bhupendra. However finally decided to add the path to /etc/profile so that it gets available to all users just in case.
As for java plugin for firefox, followed sun java instructions. In /usr/lib/mozilla/plugins made a symlink as follow:
ls -s /opt/jdk1.6.0_07/jre/plugin/i386/ns7/libjavaplugin_oji.so and restarted firefox.

-open office
for open office downloaded OOo_2.4.1_LinuxIntel_install_wJRE_en-US.tar.gz and followed install instructions on site
to uninstall goto /opt/open... and ./setup to start the uninstallation wizard.

-eclipse
downloaded eclipse-jee-ganymede-SR1-linux-gtk.tar.gz and moved to /opt
tar xvzf eclipse-jee-ganymede-SR1-linux-gtk.tar.gz
to run eclipse /opt/eclipse/eclipse or goto /opt/eclipse and ./eclipse
if eclipse is ran as user bhupendra, default workspace is created at /home/bhupendra/workspace which was fine with me

-Tomcat 6
downloaded apache-tomcat-6.0.18.tar.gz, copied to /opt
tar xvzf apache-tomcat-6.0.18.tar.gz
mv apache-tomcat-6.0.18.tar.gz tomcat6 (renames the folder)
goto /opt/tomcat6/bin and to start ./catalina start and to stop ./catalina stop
Also added CATALINA_HOME and tomcat's bin on PATH
I was root when i installed tomcat as mentioned above. Hence i always had to login as root to start/stop tomcat. Note if you do not want to start/stop tomcat using root then goto /opt/tomcat6 and change owner
chown -R bhupendra *

-RDBMS
I was in dilema to install mysql or oracle. Though I had installed and used mysql on windows before, i was using oracle in my office. Hence thought of giving it a try. Plus my friend madhav had already installed oracle on centOS so i knew it would work. After googling for some time, found an excellent writeup for oracle on fedora 9. Only modification i made was instead of having a new oracle user, i used my existing user id so that i could start stop oracle using same user. Also instead of installing to /u01/app/oracle/product/11.1.0/db_1, installed at /opt/oracle/product/11.1.0/db_1. Being a lazy bum i created scripts to start and stop oracle from desktop.
#-------------------------------------
#ora_dbca.sh (opens oracle database configuration assistant)
#-------------------------------------
#!/bin/bash
/opt/oracle/product/11.1.0/db_1/bin/dbca

#------------------------------------------------------------------------
#ora_DB11G_start.sh (starts the DB11G database and listener)
#------------------------------------------------------------------------
#!/bin/bash
$ORACLE_HOME/bin/lsnrctl start
$ORACLE_HOME/bin/dbstart $ORACLE_HOME
emctl start dbconsole


#------------------------------------------------------------------------
#ora_DB11G_stop.sh (stops the DB11G database and listener)
#------------------------------------------------------------------------

#!/bin/bash
emctl stop dbconsole
$ORACLE_HOME/bin/dbshut $ORACLE_HOME
$ORACLE_HOME/bin/lsnrctl stop