2011-04-22

Fedora 15 Snippets

These steps are inspired by
http://www.mjmwired.net/resources/mjm-fedora-f15.html


#-------------Download from nearest mirror
yum -y install yum-plugin-fastestmirror


#-------------Other repositories
#Rpmfusion for FC15 not stable at the time of FC15 release - needed to use rawhide originally
#rpm -Uhv http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-rawhide.noarch.rpm
#rpm -Uhv http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-rawhide.noarch.rpm

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


#----------------- Citrix -----------------------
#http://webmail.scatterpated.net:10080/index.php?name=News&file=article&sid=5
yum -y install openmotif
#http://www.citrix.com/English/SS/downloads/details.asp?downloadID=3323&productID=-1#top
rpm -Uhv ICAClient-11.100-1.i386.rpm


#------------------Adobe ---------------------
rpm -Uhv http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm

#Reader + flash
yum -y install AdobeReader_enu flash-plugin


#----------------- Java -------------------------
#wget http://javadl.sun.com/webapps/download/AutoDL?BundleId=35674
#http://www.oracle.com/technetwork/java/javase/downloads/index.html
http://download.oracle.com/otn-pub/java/jdk/6u25-b06/jdk-6u25-linux-i586-rpm.bin
#http://download.oracle.com/otn-pub/java/jdk/6u25-b06/jre-6u25-linux-i586-rpm.bin
#

sh jre-6u25-linux-i586-rpm.bin
sh jdk-6u25-linux-i586-rpm.bin
/usr/sbin/alternatives --install /usr/bin/java java /usr/java/default/bin/java 20000
/usr/sbin/alternatives --install /usr/bin/keytool keytool /usr/java/default/bin/keytool 20000

sudo /usr/sbin/alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so libjavaplugin.so /usr/java/default/lib/i386/libnpjp2.so 20000

sudo /usr/sbin/alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so libjavaplugin.so /usr/java/default/jre/lib/i386/libnpjp2.so 30000

#Pulse audio plugin for java
cp /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext/pulse-java.jar /usr/java/default/jre/lib/ext/
cp /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/libpulse-java.so /usr/java/default/jre/lib/i386/
cp /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext/pulse-java.jar /usr/java/jre*/lib/ext/
cp /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/libpulse-java.so /usr/java/jre*/lib/i386/

mv /usr/java/default/jre/lib/i386/libjsoundalsa.so /usr/java/default/jre/lib/i386/libjsoundalsa.so.bak
mv /usr/java/jre*/lib/i386/libjsoundalsa.so /usr/java/jre*/lib/i386/libjsoundalsa.so.bak

/usr/sbin/alternatives --config java
/usr/sbin/alternatives --config libjavaplugin.so



#----------------- Font MS Core Fonts -------------------------
wget http://www.mjmwired.net/resources/files/msttcore-fonts-2.0-3.spec
rpmbuild -ba msttcore-fonts-2.0-3.spec
rpm -Uhv msttcore-fonts-2.0-3.noarch.rpm



#----------------- Font Google Webfonts -------------------------
cd /tmp
wget http://joemaller.com.nyud.net/googlewebfonts.tgz
tar xzvf googlewebfonts.tgz
cd googlefontdirectory
mkdir /usr/share/fonts/googlefontdirectory/
find ./ -type f -name *.ttf |xargs -i cp '{}' /usr/share/fonts/googlefontdirectory/
/usr/bin/fc-cache -f /usr/share/fonts/googlefontdirectory/


#----------------- Skype -------------------------
wget http://www.skype.com/go/getskype-linux-beta-fc10
rpm -Uhv skype-2.1.0.81-fc10.i586.rpm


#----------------- Additional packages -------------------------
#Gnome
yum -y install gconf-editor dconf-editor gnome-tweak-tool

#Photo
yum -y install gqview gthumb

#Audio
yum -y install audacity-freeworld xmms xmms-mp3 xmms* xmms2*

#Video
yum -y install mplayer xine vlc xine-lib-extras-freeworld kino transcode ffmpeg ffmpeg-devel
yum -y install gstreamer-plugins-ugly gstreamer-plugins-bad gstreamer-ffmpeg

#CD/DVD Burning
yum -y install k3b k3b-extras-freeworld

#Wine
yum -y install wine
yum -y install stardict.i686 stardict-dic-cs_CZ.noarch stardict-dic-en.noarch
yum -y install alacarte #gnome menu editor
yum -y install dia-*

#GPS
yum -y install gpsbabel viking gpscorrelate

#internet
yum -y install galeon psi
yum -y install firefox thunderbird
yum -y install lftp ncftp ftp tftp tftp-server dhcping ethtool wol net-tools tor polipo iptraf
cntlm wireshark-gnome wireshark-devel tcpdump
yum -y install tftp-server xinetd dhcp httpd php php-mysql php-cli php-pgsql php-ldap ppp kismet
umit


#kernel
yum -y install dkms
yum -y install kernel-headers-`uname -r` kernel-devel-`uname -r`

#RPM dev
yum -y install rpm-build rpmlint rpmdevtools expect rpm-sign

#----------------- Crypto ------------------------
yum -y install keepassx realcrypt john

#------------------ File tools ---------------------
yum -y install cabextract p7zip p7zip-plugins unrar unace

#devel
yum -y install qmake rpm-build rpm-sign

#----------------- Forensics ------------------------
yum -y install sharutils #uuencode uudecode
yum -y install sleuthkit
yum -y install squashfs-tools ufdtools ocfs2-tools nfs4-acl-tools
yum -y install guestfish libguestfs-*

sudo rpm -Uhv http://www.cert.org/forensics/tools/fedora/cert/14/i386/cert-forensics-tools-release-14.noarch.rpm
yum install CERT-Forensics-Tools

#----------------- Networking ------------------------
#Servers
chkconfig --level 12345 xinetd off
chkconfig --level 12345 dhcpd off
chkconfig --level 12345 avahi-daemon off
chkconfig --level 12345 tor off
chkconfig --level 12345 polipo off

# Wake on lan
cat >> /etc/rc.local <<EOF
ethtool -s eth0 wol g > /dev/null 2>&1
ethtool -s eth1 wol g > /dev/null 2>&1
EOF

#-------------------- Gnome 3 Hints -------------------------------
yum -y install gnome-shell-extension* gnome-shell-theme*

#gsettings list-recursively org.gnome.shell
#opt-out extensions I do not like
gsettings set org.gnome.shell disabled-extensions "['alternate-tab@gnome-shell-extensions.gnome.org', 'righthotcorner@fpmurphy.com', 'noripple@fpmurphy.com',

#I fail to keep track what the date is :)
gsettings set org.gnome.shell.clock show-date true

#still I like to see 3 buttons when there is vasted 1280x20 space not good for anything else
gconftool-2 -s /desktop/gnome/shell/windows/button_layout --type str ":minimize,maximize,close"

#It was wery annoying to me to not be able to move spell checker window away to see what is bellow
gconftool-2 -s /desktop/gnome/shell/windows/attach_modal_dialogs --type bool "false"

#Nautilus
gsettings set org.gnome.nautilus.desktop home-icon-visible true
gsettings set org.gnome.desktop.background show-desktop-icons true
gsettings set org.gnome.shell.calendar show-weekdate true

#Icons
gsettings set org.gnome.desktop.interface menus-have-icons true
gsettings set org.gnome.desktop.interface menus-have-tearoff true

#Notebook lid
# I preffer to not shutdown notebook on lid close, rather I preffer to controll manually
#http://fedora.rasmil.dk/blog/?p=208
#setting ::= nothing|blank|suspend|hibernate|shutdown

#gsettings list-recursively org.gnome.settings-daemon.plugins.power
gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action blank
gsettings set org.gnome.settings-daemon.plugins.power lid-close-battery-action blank

#Favourite keyboard shortcuts
#Run Terminal on Win+t
gconftool-2 -s /apps/metacity/global_keybindings/run_command_terminal --type string 't'

#Show Desktop on Win+d
gconftool-2 -s /apps/metacity/global_keybindings/show_desktop --type string 'd'

#Show window menu on Alt+space
gconftool-2 -s /apps/metacity/window_keybindings/activate_window_menu --type string 'space'

#Run Firefox on Win+f
gconftool-2 -s /apps/metacity/global_keybindings/run_command_1 --type string 'f'
gconftool-2 -s /apps/metacity/keybinding_commands/command_1 --type=string 'firefox'

#Lock the screen on Win+l
gconftool-2 -s /apps/metacity/global_keybindings/run_command_2 --type=string 'l'
gconftool-2 -s /apps/metacity/keybinding_commands/command_2 --type=string 'gnome-screensaver-command -l'

#I preffer dark background in the terminal - set the dark background in vi
echo ":set background=dark" >> ~/.vimrc


2011-04-13

Run Elluminate Live Webcasts under Fedora 14

I was up to listen some SANS webcasts when I found that my java installation on Fedora 14 is totally mute. Everything looked fine, but no sound. The root case was that SUN java I was using was supporting alsa, but not pulse audio. Solution was to use the library from openjdk and disable the alsa library.

#Pulse audio plugin for java
cp /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext/pulse-java.jar /usr/java/default/jre/lib/ext/
cp /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/libpulse-java.so /usr/java/default/jre/lib/i386/
cp /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/i386/libpulse-java.so /usr/java/jre1.6.0_22/lib/i386/
cp /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext/pulse-java.jar /usr/java/jre1.6.0_22/lib/ext/

mv /usr/java/default/jre/lib/i386/libjsoundalsa.so /usr/java/default/jre/lib/i386/libjsoundalsa.so.bak



Sources:
http://www.linuxquestions.org/questions/linux-newbie-8/elluminate-live-on-linux-641328/
http://ubuntuforums.org/showthread.php?p=10659231