Saturday, July 7, 2012

My personal Fedora 17 LXDE installation

Thanks to Fedora and many more users on other blogs/forums whose efforts helped me setup up Fedora 17 lxde on my home laptop and office laptop for regular use.

-unchecked use lvm and check review and modify partitioning layout
-set correct swap space, too much is waste anyways
-delete /home partition and merge space onto /
-Personally I would keep /home on the extended partition but this layout helps me reclaim the available space for partitions easily
-If dual booting with windows make sure you do not overwrite mbr and select first sector of sda2 or which ever partition has the /boot
-I also use  to dual boot my windows 7 and fedora on my office laptop.

#setup sudo, update system and reboot
echo 'bhupendra ALL=(ALL) ALL' >> /etc/sudoers
sudo yum update

#if getting error at boot 'cannot open Front File True'

#if you are in virtualbox vm, do following to install guest additions
sudo yum install kernel-devel kernel-headers dkms gcc gcc-c++
mount guest additions if not already mounted
cd /run/media/bhupendra/VBOXADDITIONS_*
sudo ./

#desktop changes
-Moved bottom panel to top, change background appearance to solid #000000 color with 30 opacity
-second panel to left for quick launch items again solid #000000 color with 30 opacity and width 26px, height 97%, alighnment bottom, edge left
-right click desktop preferences, wallpaper mode -> fill with background color only. Set background color to black
-disable screensaver or set to xmatrix, change to small fonts
-set custom color white to top panel and change date format on digital clock to %m/%d %r
-just in case you want to change the default background for login screen is controlled by symlink
default.png -> ./verne/default/standard/verne.png under /usr/share/backgrounds
Say we downloaded simple_linux.png under /usr/share/backgrounds/images and change the symlink to point to the downloaded image
sudo ln -sf /usr/share/backgrounds/images/simple_linux.png default.png
-If Tools > "Open Current Folder as Root" command gives an error, you probably need to enter a change similar to this one:
sudo yum install beesu
Then, PCManFM > Edit > Preferences > Advanced and in the the "Switch user command" field add the command "beesu %s" (without quotes).
-Enable left clicks and scrolling on mousepad
I added following lines to /usr/share/X11/xorg.conf.d/50-synaptics.conf. If you do not have this file, check which conf file is present under /usr/share/X11/xorg.conf.d
    Option "TapButton1" "1"
    Option "HorizEdgeScroll" "1"
    Option "VertEdgeScroll" "1"
Here is an interesting page to test scrolling:
Reboot system.

#Make linux faster
-Preload - adaptive readahead daemon
sudo yum install preload
ensure it's running
sudo systemctl enable preload.service
sudo systemctl start preload.service
-On Fedora 16 lxde I also tried changing vm swappiness but held of from doing it here since I felt io operations were slower when I reduced the value.

#App installations
sudo yum -y install libXv.i686 libXScrnSaver.i686 qt.i686 qt-x11.i686 pulseaudio-libs.i686 pulseaudio-libs-glib2.i686 alsa-plugins-pulseaudio.i686
sudo yum install
Based on test call, my mic was not correctly working.
Opened up pulse audio volume mixer, undere recording tab, show all streams, then gave test skype call.
Once the recording showed an entry I changed the option to Quickcam

-adobe flash 11 64bit
sudo yum install
sudo yum install flash-plugin

-office suite
removed exsting F17lxde office apps and install libreoffice
sudo yum remove abiword gnumeric osmo
sudo yum install libreoffice planner

-Firefox comes as default
Add fastdial to firefox and import bookmarks. Change default page startup to blank
Adblock plus
Awesome screenshot
live http headers
modify headers
wsj/bol smartfox
UserAgent Switcher. Download xml file from and import via addon via options.

-google chrome and voice chat
download rpm from for chrome
download rpm from ls for google voice and video chat
sudo yum install lsb [required for chrome]
sudo rpm -Uvh google-*.rpm

-pdf viewer
lxde f17 comes preinstalled with epdfview, however it cannot enter fillable pdf forms
for editing pdfs, nothing beats pdfedit unfortunatly it's not in repo since F16
For now, I am staying with epdfview and mozplugger to view pdfs in firefox
sudo yum install epdfview mozplugger

-disk usage analyser
sudo yum install baobab

-rpm fusion repos for third party softwares
sudo yum install
sudo yum install
sudo yum update

-audio and video requirements
Since I use audacious and vlc for all my video/audio needs, I removed others and installed these
sudo yum remove asunder lxmusic gxine
sudo yum install mozilla-vlc vlc vlc-extras ffmpeg audacious audacious-plugins*

sudo yum install conky
To add any applications to autostart read I have added conky to autostart.
sudo vi /etc/xdg/lxsession/LXDE/autostart
Add follwing

-Enable ssh
sudo systemctl enable sshd.service
sudo systemctl start sshd.service
Ensure firewall has port opened for 22, and enable port forwarding on wireless router
I found weird bug in Fedora 17. After doing aove changes, I was still not able to ssh to fedora 17 laptop. I had to uncheck apply and check apply again and reload rule for ssh in firewall.

-install 7zip
sudo yum install p7zip
To extract file use
7za e filename.7z
To create 7zip archive use
7za a filename.7z directoryWithFilesToCompress/

-image manipulation
lxde comes with mtpaint, which is ok but nothing beats gimp
sudo yum remove mtpaint
sudo yum install gimp
open gimp, under windows, there is option for single window mode

sudo yum install hplip hplip-gui
run following on command prompt or go to application menu -> administration -> hp device manager
During printer configuration, use ip to configure [] and enter username/password for root.
For any other printer config like xerox, cannon etc. OR for most hp printer including hp estation
directly open printing menu, find netwrok printers and add them.

-scan to pdf if required
sudo yum install gscan2pdf

-picasa alternative
gone are the days for picasa on linux. I usually upload pics directly to picasa web. Alternatively shotwell is nice with photo editing features like red eye removal
sudo yum update shotwell
Anyways I did not install it this time around.

-finding key bindings
Use xev command to find out the key values
On hp elitebook 8440p
keycode 121 = XF86AudioMute
keycode 122 = XF86AudioLowerVolume
keycode 123 = XF86AudioRaiseVolume
keycode 171 = XF86AudioNext
Keycode 172 = XF86AudioPlay
Keycode 173 = XF86AudioPrev
Keycode 174 = XF86AudioStop
Keycode 163 = XXF86Mail
Keycode 107 = Print
keycode 232 = XF86MonBrightnessDown
keycode 233 = XF86MonBrightnessUp
keycode 150 = XF86Sleep
keycode 133 = Super_L
keycode 244 = XF86Battery
keycode 201 = XF86TouchpadOff

-volume key buttons
In ~/.config/openbox/lxde-rc.xml inside the <keyboard> element add the following
   <keybind key="XF86AudioLowerVolume">
     <action name="Execute">
       <command>amixer -c 0 set Master 5- unmute</command>
   <keybind key="XF86AudioRaiseVolume">
     <action name="Execute">
       <command>amixer -c 0 set Master 5+ unmute</command>
   <keybind key="XF86AudioMute">
     <action name="Execute">
       <command>amixer set Master toggle</command>
Re-login, reboot or just run openbox --reconfigure for above changes to be in effect.  

-print screen on linux
On terminal, run following, and click mouse on the screen whose image needs to be captured
xwd > myimage.xwd
To view the captured screen image run following or open with display, gimp, xv etc.
xwud -in myimage.xwd
Another option is to use gimp which has screenshot option
sudo yum install gimp
Goto file -> create ->screenshot
All this was great on comman promt but what about the print key?
Install scrot
sudo yum install scrot
Add following to inn ~/.config/openbox/lxde-rc.xml under keyboard
<!-- Keybinding for PrintScreen Key -->
    <keybind key="Print">
      <action name="Execute">
       <execute>scrot -e 'mv $f ~/Desktop/'</execute>

    <keybind key="A-Print">
      <action name="Execute">
       <execute>scrot -b -s -e 'mv $f ~/Desktop/'</execute>
Re-login or reboot and alt+printscreen allows you to select area to capture while printscreen captures whole page
On my laptop printscreen button was shared with insert key and had to be invoked using fn+insert/prt sc
Now there will be times when we want to take screenshot of pull down menu or something, in that case we need deplay

-dual monitor setups
LXDE ships with lxrandr which has limited functionality for xrandr, so most of the time we have to get hands dirty with xrandr as below:
get list of connected display with their supported resolution
To attach 2nd monitor
xrandr --output VGA-1 --auto --right-of eDP-1
To remove 2nd monitor
xrandr --output VGA-1 --off
[More simplified details at]
Alternatively, we can download and run arandr which is more complete but less intuitive gui for xrandr
cd ~
wget [download latest one from]
tar xzf arandr-0.1.6.tar.gz
chmod 775 arandr-0.1.6
rm -rf arandr-0.1.6.tar.gz
One could create a menu item for this, but I just added keyboard shortcut for convinience
Add following to in ~/.config/openbox/lxde-rc.xml under keyboard
    <keybind key="C-F12">
      <action name="Execute">
Reboot or relogin or openbox --reconfigure and hit ctrl+F12 keys

-Remmina - gtk+ app for rdp/nx/vnc/xdmcp/ssh
sudo yum install remminia remmina-plugins*
Once opened, it docks to tray. To disable that edit->preferences->applet->disable tray icon

Download repo from virtualbox site into /etc/yum.repos.d/
cd /etc/yum.repos.d/
sudo wget
sudo yum install dkms kernel-headers gcc
sudo yum install VirtualBox-4.1
Add your user to vboxusers group
sudo service vboxdrv setup
Download and install extention pack

-configure wireless nw using certificates for office
check 'connect automatically'
security=WPA & WPA2 Enterprise
user certificate=username-b64.cer
CA certificate=certname.cer
private key=username.pem
Private key password=passwordhere

-import certificates to firefox
-Firefox promts to import certificate when clicked to save it in it's store.
-google chrome does not have it's own certificate store unlike firefox. On windows it uses windows store etc.
For more details
yum install nss-tools
As for me, I download all the certificates to load using chrome
cd ~
certutil -d sql:$HOME/.pki/nssdb -A -t "C,," -n certname -i pathtocertfile/certname.crt

-configure cisco vpn to office
sudo yum install vpnc NetworkManager-vpnc
Now configure vpn using network manager applet

-outlook alternative -> thunderbird
sudo yum remove sylpheed [comes default with lxde]
sudo yum install thunderbird thunderbird-lightning
>>CONFIGURE MAIL [if does not work, try ]
incoming: IMAP 143 STARTTLS normal password
outgoing: SMTP 587 STARTTLS normal password
username: atreb [if this does not work try DJNAMERICAS/atreb]
>>Install addons
Exchange 2007/2010 Calendar and Tasks Provider
Tools -> address book
File -> New -> Ldap directory
This will need the ldap details.
Right click new address book and click properties -> offline tab -> click download
Now goto mail settings -> composition & addressing
select 'Use a different LDAP server' and select new address book.
File -> New -> calendar
Select 'on the network'
Select Microsoft Exchange 2007/2010
Check Use Exchange's autodiscovery function

-ms office communicator plugin for pidgin
sudo yum install pidgin pidgin-sipe

-file editor
sudo yum install geany geany-plugins-treebrowser geany-plugins-xmlsnippets
Enable TreeBrowser and XML Snippets under tools -> plugins

-Install java
open jdk 1.7 was already installed
sudo yum install java-1.7.0-openjdk java-1.7.0-openjdk-devel

-subversion installation
sudo yum install svn

-Download eclipse
mkdir ~/DEV
cp ~/Downloads/eclipse-jee-juno-linux-gtk-x86_64.tar.gz ~/DEV
cd ~/DEV
tar -xzvf eclipse-jee-juno-linux-gtk-x86_64.tar.gz
rm -rf eclipse-jee-juno-linux-gtk-x86_64.tar.gz
cd eclipse
chmod 775 eclipse
set workspace as /home/bhupendra/DEV/eclipse/workspace
Once eclipse is opened:
move outline and task panel to right
window -> show view -> navigator
help -> check for updates
Drop eclipse.png in /usr/share/icons and Create eclipse.desktop file under /usr/share/applications
[Desktop Entry]

Install subversive from the juno update site using eclipse add new software.
After restart select svnkit 1.3x for connector [after checking which version of svn is running]

-for file and folder diff operations
sudo yum install meld

-Download sql developer from oracle site
sudo rpm -Uvh sqldeveloper-*

type sqldeveloper and it will prompt for jdk path, enter following

-Maven installation
Downloaded apache-maven-2.2.1-bin.tar.gz
cp apache-maven-2.2.1-bin.tar.gz ../DEV
cd ../DEV
tar -xzvf apache-maven-2.2.1-bin.tar.gz
rm apache-maven-2.2.1-bin.tar.gz
Add following to /etc/profile
export M2_HOME=/home/bhupendra/DEV/apache-maven-2.2.1
export M2=$M2_HOME/bin
export PATH=$M2:$PATH
To check the installation immediatly, run above command in terminal and type
mvn --version
For my dev, I updated the settings.xml file under $M2_HOME/conf

-Apache httpd installation
sudo yum install httpd
to check service status
sudo systemctl status httpd.service
to start service
sudo systemctl start httpd.service
to stop service
sudo systemctl stop httpd.service
conf files located at /etc/httpd/conf
Disable the default welcome page by commenting out lines in /etc/httpd/conf.d/welcome.conf
New files can be dropped in at /var/www/html which is the default DocumentRoot
Created index.htmll in the Document root and accessed using http://localhost/index.html
sudo yum install php
restart httpd so that it loads up php module
create new file /home/bhupendra/DEV/html/test.php
// Show all information, defaults to INFO_ALL
// Show just the module information.
// phpinfo(8) yields identical results.

-mount windows share
mkdir /mnt/mountdir
sudo mount -t cifs //ipaddresshere/client4 -o username=myusername,password=mypassword /mnt/mountdir
umount /mnt/mountdir


Ahmad Azkan said...

Neat stuffs. Thought i let you know I use some of your setup steps on a Fedora 17+pekwm+lxpanel only, modified to taste.

I check back again when you have new posts.

Anonymous said...

Why pekwm?