Ralfs
Linux Snippets
The Red Hat by Madalina Iordache

Linux commands

System Setup

Syslog:

# (from Fedora < 8 was /etc/syslog.conf)
$ nano /etc/rsyslog.conf
# go to bottom
*.*                             /dev/tty12

Aliases:

$ nano /etc/bashrc
# go to bottom
alias df='df -h'
alias psg='ps aux|grep -E'
alias nano='nano -w'
alias scp='scp -p'

Environment:

$ nano /etc/profile
# go to bottom
# add proxy entries
PROXY=http://192.168.9.1:8080
HTTP_PROXY=http://192.168.9.1:8080
NO_PROXY="127.0.0.0/8,192.168.0.0/16,mypc.mydomain"
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC PROXY HTTP_PROXY NO_PROXY

Box

$ nano /etc/sysconfig/network
replace "localhost.localdomain" with your host and domain name.
NETWORKING=yes
HOSTNAME=box.domain.org

Scripts

My IP Address
$ nano ~/bin/myipaddr
#!/bin/sh
MYADDR=`/sbin/ifconfig $1 2>/dev/null |grep inet |cut -f2 -d: |cut -f1 -d' '`
echo $MYADDR
$ chmod a+x ~/bin/myipaddr
Usage:
myipaddr eth1

Software

Kernel

Get Fedora 12 kernels
Change the default kernel in the system's boot loader configuration.
/etc/sysconfig/kernel:
UPGRADEDEFAULT - Controls whether new kernels will be booted by default (default value: yes)
DEFAULTKERNEL - kernel RPMs whose names match this value will be booted by default 
                (default value: depends on hardware configuration)
Build kernel:
1. Obtain the kernel-<version>.src.rpm  file
	i.e: up2date --get-source kernel
2. Install kernel-<version>.src.rpm
	default to /usr/src/redhat/
3. Change directory to /usr/src/redhat/SPECS/, and issue the following command:
	rpmbuild -bp --target=i686 kernel-<version>.spec
	or
	rpmbuild -bp --target=x86_64 kernel-<version>.spec
	On a default RPM configuration, the kernel tree will be located in
	/usr/src/redhat/BUILD/.
4. In resulting tree, the configurations in the /configs/ directory.
	Place the desired configuration in the proper place for building:
	cp <desired-file>  ./.config
5. Issue the following command:
	make menuconfig
You can then proceed as usual.

Firefox

Setup

Here's something for broadband people that will really speed Firefox up:
1.Type "about:config" into the address bar and hit return. Scroll down and look for the following entries:

network.http.pipelining network.http.proxy.pipelining
network.http.pipelining.maxrequests

Normally the browser will make one request to a web page at a time. When you enable pipelining it will make several at once, which really speeds up page loading.

2. Alter the entries as follows:

Set "network.http.pipelining" to "true"

Set "network.http.proxy.pipelining" to "true"

Set "network.http.pipelining.maxrequests" to some number like 30. This means it will make 30 requests at once.

3. Lastly right-click anywhere and select New-> Integer. Name it "nglayout.initialpaint.delay" and set its value to "0". This value is the amount of time the browser waits before it acts on information it receives.

If you're using a broadband connection you'll load pages MUCH faster now!

Linux Plugins

On 64bit systems:
yum install nspluginwrapper.i686  # or: yum install nspluginwrapper.i386
# nspluginwrapper.x86_64 is not enough !!!
Firefox & Konquerror plugins:
/usr/lib/mozilla/plugins
# /var/lib/firefox-ver/plugins/
After installing new plugins from Konquerror: rescan new plugins
PluginDoc

Adobe Flash Player

Get .tar.gz for Linux (x86)
$ cp libflashplayer.so /usr/lib/mozilla/plugins

RealPlayer 10 for Linux

Get
Helix Community Helix Player project
$ rpm -i RealPlayer10GOLD.rpm
$ cd /usr/local/RealPlayer
$ ./realplay
This make link "/usr/bin/realplay"
Test: LR 1, LR 2

Java Runtime Environment

Sun JRE 5.0
  1. Install Java Runtime Environment.
  2. Make a symbolic link to libjavaplugin_oji.so in your Mozilla Plugins directory. Unless you are using an old version of Mozilla, or one you compiled yourself with gcc 2.9x, use the copy located in the plugin/i386/ns7 directory of JRE 5.0, or plugin/i386/ns610-gcc32 if you are using JRE 1.4.2.
Note: java usually installs in /usr/java/
# var šādi:
$ ln -s /usr/java/jre1.5.0_06/plugin/i386/ns7/libjavaplugin_oji.so 
        /usr/lib/firefox-1.0/plugins/libjavaplugin_oji.so
        
# labaak (universālāk):
$ ln -s /usr/java/jre1.5.0_06/plugin/i386/ns7/libjavaplugin_oji.so 
	/usr/lib/mozilla/plugins/libjavaplugin_oji.so
For comand line java support edit /etc/profile
pathmunge /usr/java/jre1.5.0_03/bin after

Shift to Open Source Java plugin for firefox

Es paskatījos un tas strādā galīgi šķībi :( Info about to not use Sun Java plugin for firefox, but instead the open source gcjwebplugin - there is a link and gcjwebplugin home

Mozilla resources


Fedora

Additional software

First set up needed repositories.
RPM Fusion
rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm \
     http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm
Usable software:
# System
yum -y install mc
yum -y install iptraf units udftools
yum -y install memtest86+
# yum -y install yumex usbutils

# Archiving
# Not in Fedora, but in RPM Fusion: lha unace unrar
yum -y install cabextract arj p7zip upx ucl lha unace unrar

# Development
yum -y install tidy libtidy perltidy php-tidy
# for HTML Validator extension for Firefox
yum -y install compat-libstdc++-33
yum -y install w3c-markup-validator
yum -y install syslinux
yum -y install php php-manual-en cssed
yum -y install java-1.5.0-gcj-devel
yum -y install gcc gcc-c++ gcc-java
yum -y install qt-creator qt-demos qt-devel qt-doc qt-examples qt-mysql qt-sqlite
yum -y install gtk2-devel gtk2-engines
yum -y install perl-CPAN
yum -y install php-pear-DB php-mysql php-mbstring
yum -y install fuse-sshfs fsarchiver
yum -y install lshw lshw-gui
yum -y install kernel-devel
yum -y install foremost                    # Recover files
yum -y install partimage
# yum -y install mkinitrd ( in dracut )
# for x86_64:
yum -y install glibc-devel.i686

### Eclipse Plug-Ins:
# eclipse-cdt-sdk:    C/C++ Development Tools (CDT) SDK
# eclipse-epic:       Perl Eclipse plugin
# eclipse-phpeclipse: PHP Eclipse plugin
# eclipse-quickrex:   Regular-expression test
# eclipse-shelled:    Eclipse Shell script editor
# eclipse-gef:        Graphical Editing Framework (GEF)
yum -y install eclipse-cdt-sdk eclipse-epic eclipse-phpeclipse \
 eclipse-quickrex eclipse-shelled eclipse-gef

# DataBases:
yum -y install mysql-administrator mysql-query-browser  # F13 nomore ?
yum -y install mysql++ mysql-devel     # MySQL++ is a C++ wrapper for MySQL’s C API
yum -y install sqliteman sqlite-devel
yum -y install perl-DBD-SQLite perl-DBD-XBase
# yum -y install pgadmin3

# Additional tools:
yum -y install gqview
yum -y install qemu qemu-img qemu-launcher kvm
yum -y install VirtualBox-OSE VirtualBox-OSE-guest
yum -y install dia lyx joe pwgen htmldoc tigervnc-server
yum -y install gconf-editor system-config-display
yum -y install kde-plasma-translatoid
yum -y install ksensors kdirstat
yum -y install nmap-frontend fwbuilder
yum -y install dvd95 nrg2iso squashfs-tools
# Bluetooth related:
yum -y install bluez-hcidump kdebluetooth pulseaudio-module-bluetooth amora bluez-alsa
yum -y install openoffice.org-javafilter
yum -y install conglomerate ooo2txt
yum -y install bitstream-vera-sans-fonts \
 bitstream-vera-sans-mono-fonts bitstream-vera-serif-fonts
yum -y install qt3-config
yum -y install openoffice.org-base
yum -y install smolt-gui
# yum -y install kde-l10n-Latvian

# SIPphone
### NAVA: yum -y install kphone

# Edutainment
# periodic table of the elements
yum -y install gperiodic
yum -y install stellarium
# fractal:
yum -y install xaos gnofract4d

# Games:
yum -y install kdegames games-menus kdetoys
yum -y install frozen-bubble
yum -y install pinball
# PlanetPenguin Racer is an OpenGL racing game
# yum -y install ppracer
# Extreme Tux Racer 
yum -y install extremetuxracer
# Njam is a full-featured cross-platform pacman-like game written in C++ using SDL library
yum -y install njam
TORCS is a 3D racing cars simulator using OpenGL.
yum -y install torcs

Skype

You can use rpm package:
yum -y install libsigc++20 dbus-qt qt4 qt4-x11
# Fedora 10 have libsigc++20 dbus-qt; Not need qt4 qt4-x11
rpm -i skype-2.0.0.72-fc5.i586.rpm

### For x86_64:
yum -y install qt.i686 qt-x11.i686
yum -y install alsa-lib.i686
yum -y install libXv.i686
yum -y install libXScrnSaver.i686
Better use yum:
nano /etc/yum.repos.d/skype.repo
[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
gpgcheck=0
enabled=1
# NEIET: rpm --import http://www.skype.com/products/skype/linux/rpm-public-key.asc
# TAPEC: gpgcheck=0
yum -y install skype

Multimedia

Install multimedia from repo's:

# Multimedia
yum -y install pavucontrol pavumeter pulseaudio-module-zeroconf \
 pulseaudio-libs-zeroconf pulseaudio-esound-compat padevchooser \
 paprefs paman
yum -y install lame
yum -y install ffmpeg transcode
yum -y install mplayer mencoder mplayer-gui mplayer-doc smplayer
yum -y install vlc mjpegtools
yum -y install xine xine-lib-extras xine-lib-extras-freeworld xine-plugin
yum -y install k3b-extras-freeworld
yum -y install grip kid3 tagtool easytag
yum -y install xawtv
# yum -y install xmms* xmms-mp3 xmms-lirc xmms-wma xmms-skins xmms-scrobbler xmms-xosd
# yum -y install cinelerra

# DVB
yum -y install dvb-apps

# v4l (for video capture card / TV view)
yum -y install xawtv
yum -y install v4l2ucp
# nothing usable:
yum -y install v4l2-tool
Needed?:
yum -y install libmpeg3
yum -y install kaffeine
yum -y install xine-lib-devel

Links

Software

Hardware