Sunday, June 19, 2011

Fedora 15 with gnome 3 - my howto

Installed live image from Fedora 15 64bit running gnome 3
I had to reinstalled since first time around, it loaded into fallback mode.

-disable selinux
vi /etc/selinux/config
change SELINUX=targetted to SELINUX=disabled
save and close

-enable sudo
vi /etc/sudoers
add following
yourusername ALL=(ALL) ALL

-enable left click on touchpad of laptop
click 'Activities' (top left)
click 'System tools' (right)
click 'Mouse and Touchpad'
goto Touchpad tab and check following boxes
Disable touchpad while typing
Enable mouse clicks with touchpad

-intall new programs
sudo yum install yum-fastestmirror

-install plugins for the new gnome-shell
sudo yum install gnome-shell-extensions-alternative-status-menu [to have shutdown(power off) along with suspend menu]
sudo yum install gnome-shell-extensions-places-menu [adds places menu to right hand system indicator aread on top panel]
sudo yum install gnome-tweak-tool

-install flash plugin,for my 64 bit installation I did following
sudo yum install wget
cd /tmp
wget http://download.macromedia.com/pub/labs/flashplayer10/flashplayer10_2_p3_64bit_linux_111710.tar.gz
tar xzvf flashplayer10_2_p3_64bit_linux_111710.tar.gz
sudo mv /tmp/libflashplayer.so /usr/lib64/mozilla/plugins/
For 32 bit, recommended approach is to download rpm from adobe site and install flash-plugin.

-skype
sudo yum -y install pulseaudio-libs.i686 pulseaudio-libs-devel.i686 alsa-plugins-pulseaudio.i686 libv4l.i686 libXv.i686 libXv-devel.i686 libXScrnSaver.i686 libXScrnSaver-devel.i686 dbus-qt-devel.i686 qt.i686 qt-devel.i686 dus-qt.i686
Then download and install fedora10+ rpm from skype site.
sudo rpm -Uvh skype-2.2.0.35-fedora.i586.rpm

-Install office
sudo yum install libreoffice-writer libreoffice-calc libreoffice-draw libreoffice-impress

-install webstart and java applet support for firefox
icetea-web

-install other programs that I use
gimp p7zip p7zip-plugins xboard gnuchess unrar wget

-Install repo for third party apps
su -c 'yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm'

-For mp3 player needs I use audacious, simple and winap like.
sudo yum install audacious audacious-plugins-freeworld*
change theme to winamp from view menu

-install play it all video player and fierfox plugin for videos.
sudo yum install vlc vlc-extras
God knows where vlc plugin for firefox went. It used to be available via rpmfusion repos. Anyways I downloaded it from ATrpms. Also got libdvdcss for dvd playback
http://dl.atrpms.net/all/vlc-plugin-1.1.9-69.fc15.x86_64.rpm at http://packages.atrpms.net/dist/f15/vlc/
http://dl.atrpms.net/all/libdvdcss2-1.2.10-5.fc15.x86_64.rpm at http://packages.atrpms.net/dist/f15/libdvdcss/
NOTE:After few days, once I updated using yum update, I was not able to update vlc due to vlc-plugin hard dependency. So I uninstalled vlc-plugin only to find out mozilla-vlc was back in repo. This was good news so no manual rpm installation required just do
sudo yum install vlc vlc-extras

-Enable ssh
system-config-services was missing on fedora 15, so I manually installed it only to find that I cannot enable/disable services only start/stop them. So I uninstalled it and googled for more info and found this http://fedoraproject.org/wiki/Systemd#How_do_I_start.2Fstop_or_enable.2Fdisable_services.3F
So after reading that, it was easy
sudo systemctl enable sshd.service
sudo systemctl start sshd.service

-Enable remote desktop
sudo yum install x11vnc x11vnc-javaviewers
x11vnc -storepasswd
The above command creates /home/yourusername/.vnc/passwd file where yourusername is your usernmae
To run server
sudo /usr/bin/x11vnc -o /var/log/x11vnc.log -display :0 -rfbauth /home/bhupendra/.vnc/passwd -many -bg -http
access via java enabled browser using http://hostOrIP:5800
access via vnc client hostOrIP:5900
To disconnect all connected clients
x11vnc -R disconnect:all
To stop running x11vnc server
x11vnc -R stop
To autostart x11vnc server on logon
cd /etc/gdm/PostLogin
sudo cp Default.sample Default
Add following line to Default file
/usr/bin/x11vnc -o /var/log/x11vnc.log -display :0 -rfbauth /home/bhupendra/.vnc/passwd -many -bg -http

-make fast firefox 4 faster, in browser open about:config
Search and update following
network.http.max-connections change to 60 (default: 30)
network.http.max-connections-per-server change to 20 (default: 15)
network.http.max-persistent-connections-per-server change to 8 (default: 6)
network.http.pipelining change to true (default: false)
network.http.pipelining.ssl change to true (default: false)

-Added following firefox addons
fireftp
User Agent switcher
Download helper
Awesome screenshot
fast dial
firecookie
firebug
colorzilla
live http header
measureit
refcontrol
JSONview
poster
jsview
flashblock

-share media on dlna enabled devices [Samsung BD-6500]
sudo yum install ffmpeg java-1.6.0-openjdk
Open TCP 8895 and UDP 1900 ports in firewall
Download serviio-0.5.2-linux.tar.gz from http://www.serviio.org/download
cp serviio-0.5.2-linux.tar.gz /home/bhupendra [where bhupendra is my home directory]
tar xzvf serviio-0.5.2-linux.tar.gz
rm serviio-0.5.2-linux.tar.gz
cd serviio-0.5.2/bin
Now turn on your dlan enabled device
Then run
./serviio.sh
Then run following to add media directory
./serviio-console.sh
If you are not knowing what's happening take a look at serviio-0.5.2/log/serviio.log
I was tailing the log in seperate conosle to see which all media got added.

-remove unwated apps
sudo yum remove totem totem-mozplugin totem-nautilus orca evince evince-nautilus rhythmbox evolution sound-juicer cdparanoia
ran package-cleanup --leaves
and uninstalled unwanted apps from it.

-organize photos and upload to picasa. I used to install picasa and run it with wine installation, but no more now.
sudo yum install shotwell
shotwell has dependency on totem, waiting for 0.10 version which removes it. Till then totem needs to be installed.
If shotwell fails to upload, check upload limit on picasa web, we may have exceeded limit.
[Update: switched back to picasa since needed it for collage creation]
Downloaded the rpm from http://picasa.google.com/linux/download.html#picasa30
sudo yum localinstall picasa-3.0-current.i386.rpm
This installed all the dependency rpms too.
sudo yum install wine
Had to install wine since default picasa gives segmentation fault.
So to run picasa I use following:
wine "/opt/google/picasa/3.0/wine/drive_c/Program Files/Google/Picasa3/Picasa3.exe"


-Enable ssh
system-config-services was missing on fedora 15, so I manually installed it only to find that I cannot enable/disable services only start/stop them. So I uninstalled it and googled for more info and found this http://fedoraproject.org/wiki/Systemd#How_do_I_start.2Fstop_or_enable.2Fdisable_services.3F
So after reading that, it was easy
sudo systemctl enable sshd.service
sudo systemctl start sshd.service

-Enable remote desktop
sudo yum install x11vnc x11vnc-javaviewers
x11vnc -storepasswd
The above command creates /home/yourusername/.vnc/passwd file where yourusername is your usernmae
To run server
sudo /usr/bin/x11vnc -o /var/log/x11vnc.log -display :0 -rfbauth /home/bhupendra/.vnc/passwd -many -bg -http
access via java enabled browser using http://hostOrIP:5800
access via vnc client hostOrIP:5900
To disconnect all connected clients
x11vnc -R disconnect:all
To stop running x11vnc server
x11vnc -R stop
To autostart x11vnc server on logon
cd /etc/gdm/PostLogin
sudo cp Default.sample Default
Add following line to Default file
/usr/bin/x11vnc -o /var/log/x11vnc.log -display :0 -rfbauth /home/bhupendra/.vnc/passwd -many -bg -http

-make fast firefox 4 faster
in browser open about:config
Search and update following
network.http.max-connections change to 60 (default: 30)
network.http.max-connections-per-server change to 20 (default: 15)
network.http.max-persistent-connections-per-server change to 8 (default: 6)
network.http.pipelining change to true (default: false)
network.http.pipelining.ssl change to true (default: false)
-Added following firefox addons
fireftp
User Agent switcher
Download helper
Awesome screenshot
fast dial
firecookie
firebug
colorzilla
live http header
measureit
refcontrol
JSONview
poster
jsview
flashblock

-share media on dlna enabled devices [Samsung BD-6500]
#USING SERVIO
sudo yum install ffmpeg java-1.6.0-openjdk
Open TCP 8895 and UDP 1900 ports in firewall
Download serviio-0.5.2-linux.tar.gz from http://www.serviio.org/download
cp serviio-0.5.2-linux.tar.gz /home/bhupendra [where bhupendra is my home directory]
tar xzvf serviio-0.5.2-linux.tar.gz
rm serviio-0.5.2-linux.tar.gz
cd serviio-0.5.2/bin
Now turn on your dlan enabled device
Then run
./serviio.sh
Then run following to add media directory
./serviio-console.sh
If you are not knowing what's happening take a look at serviio-0.5.2/log/serviio.log
I was tailing the log in seperate conosle to see which all media got added.
Added shortcut for serviio
/etc/share/applications/serviio-start.desktop with following in it.
[Desktop Entry]
Name=Serviio-start
Comment=Starts serviio
Icon=Serviio
Exec=/home/bhupendra/serviio-0.5.2/bin/serviio.sh
Terminal=false
Type=Application
Categories=AudioVideo;Player;
StartupNotify=true
#USING TVMOBILI
I found video buffering issue with serviio and also intermittently the connection was breaking with my blue ray. So I downloaded rpm from http://www.tvmobili.com/download.php, installed it. And that's it - all done. It installs service which runs when my laptop starts. It picked up wifi and immediatly my Videos, PIctures, Music folders were available on my blue ray player.
Ensure 30888 port is enabled on firewall.
TVmobili comes with a web console which can be accessed as http://yourLocalNetworkIP:30888/__index?page=information

-Run ftp server
sudo yum install proftpd
sudo vi /etc/proftpd.conf
Change DefaultRoot to some specific directory. By default it opens up user's home directory. ftp credentials is same as user's login credentials on the machine.
to start ftp as service
sudo systemctl enable proftpd.service
sudo systemctl start proftpd.service

-Enable bluetooth
systemctl status bluetooth.service
systemctl enable bluetooth.service
systemctl start bluetooth.service
I still was unable to send files from my cell to laptop after pairing. Dmsg showed following
Parsing /etc/bluetooth/input.conf failed: No such file or directory
I am still looking at solutions, will post once I get.

Sunday, May 22, 2011

vnc to current session on fedora

Been using fedora 14 and wanted to set up vnc to current session on the running gnome desktop

#install server
sudo yum install x11vnc-javaviewers x11vnc

#set x11vnc password, it is written to /home/yourusername/.vnc/passwd where yourusername is your usernmae
x11vnc -storepasswd

#run server
#-forever so that it does not disconnect when client disconnets
#-display :0 so that client shadows current logged in session
#-usepw so that client uses password from /home/yourusername/.vnc/passwd on server
#-bg can be used for the x11vnc to go into into the background after screen setup.Messages to
stderr are lost unless -o logfile is used
x11vnc -forever -usepw -display :0


#set up x11vnc startup in xinetd for autostart
sudo yum install xinetd
sudo vi /etc/xinetd.d/x11vnc
Enter following in the file
service x11vnc
{
port = 5900
type = UNLISTED
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/bin/x11vnc
server_args = -inetd -o /var/log/x11vnc.log -display :0 -rfbauth /home/yourusername/.vnc/passwd -many -bg
disable = no
}
Note here we are running the service as root so that it can access /var/log/x11vnc.log but use /home/yourusername/.vnc/passwd file created by yourusername

UPDATE:
my x11vnc server was sometimes giving error, probably it may be starting before x windows. So I removed inetd and it's config and instead added following to /etc/gdm/PostLogin/Default

#!/bin/sh
#Running x11vnc server
/usr/bin/x11vnc -o /var/log/x11vnc.log -display :0 -rfbauth /home/bhupendra/.vnc/passwd -many -bg