Saturday, November 8, 2008

Fedora Tips and Tricks

Fedora9

From Fedora Guide

(Redirected from Main Page)
Jump to: navigation, search

Fedora 9 (Sulphur)

Unofficial Guide to Fedora

Fedora 9 (Sulphur) was released on the 13th of May 2008.

This guide will provide a basic run down on how to do things in Fedora. As this is a work in progress please provide feedback on the Fedora Forum to help us improve this how to. If you would like to contribute please do so by registering and contributing.

Tours

To see what Fedora 9 will look like check out the tour!!!

What has Changed

Fedora has changed a lot from Fedora 8 to Fedora 9 to see the list of changes.

Common Problems and Solutions

Common Bugs and their Solutions

Contents

[hide]


General Notes

  1. This guide is not related to Fedora or Red Hat in anyway whatsoever.
  2. This guide can be updated by emailing admin fedoraguide.info
  3. Contributions are important for maintaining the future content on this wiki.
  4. The bluish boxes represent what you type in the screen.
  5. The information will be input using the recommended method of Fedora using 'su -c' where applicable.
  6. An example for updating your system would be:
su -c 'yum update'
  1. I have Fedora 9 using i386/i686 so while this is configured for i386/i686 if something does not perform on your 64 bit version please provide me with information so that I can rectify it. I do not own a 64 bit machine so I can not test the results.
  2. When saving files right click and save-as to your desktop.
  3. The assumption is you know how to boot your system and you know how to type into your terminal if required.
  4. I will be adding repositories to make it as simple as possible for installation. I will not have the additional repositories added by default except for Livna.

Switching to Root

  • Read the #General Notes
  • There will be times that you will need to be the root user (Administrator) to be root you will need to issue the following command
su --login

or

su -

Fedora Updates

How To use Yum

Yum is a very powerfull package manager. yum will resolve dependencies for you and makes installing applications a breeze. yum also searches, removes, and lists packages for you.

 Usage: yum [options] <>

Options:
-h, --help show this help message and exit
-t, --tolerant be tolerant of errors
-C run entirely from cache, don't update cache
-c [config file] config file location
-R [minutes] maximum command wait time
-d [debug level] debugging output level
-e [error level] error output level
-y answer yes for all questions
--version show Yum version and exit
--installroot=[path] set install root
--enablerepo=[repo] enable one or more repositories (wildcards allowed)
--disablerepo=[repo] disable one or more repositories (wildcards allowed)
-x [package], --exclude=[package]
exclude package(s) by name or glob
--obsoletes enable obsoletes processing during updates
--noplugins disable Yum plugins
--nogpgcheck disable gpg signature checking
--disableplugin=[plugin] disable plugins by name

From a first look this can look rather intimidating, but this is rather easy.

Examples:
  • To seach for a application

Yum will search all your enabled repos and tell you where you can obtain the package from

yum search application_name
  • Yum can list all available packages from your enabled repos and tell you where you can obtain the package from:
yum list available
  • To find out more info about some package
yum info application_name
  • Installing applications

Inastalling is as easy as

yum install application_name
  • Listing rpms

yum can list installed rpms for you from the repos you have enabled

yum list extras
  • Removing rpms

Yum can remove a application and the dependenciesit installed with tat application. it will not remove depenencies if another application installed needs them.

yum remove application_name
  • Updating the system

Yum can update the system for you with out user interact if you want it to.

yum update
  • Not sure if you have upates?
yum check-update
  • Local install

downloaded a rpm and cannot install it with rpm because of dependencies?

yum localinstall /path/to/the/rpm
Happy yumming...

Recommended Plugins

yum-presto

  • This plugin speeds up the processing of packages and downloading of packages by downloading the difference between the new package and the old package. It is recommended to install it to reduce the quantity you download for updates. You can get it with this command:
su -c 'yum -y install yum-presto'
  • However, to use it, you need to have some presto repositories enabled. To do this, you have to edit the content of a file. Type the following command:
su -c 'gedit /etc/yum.repos.d/fedora-updates-newkey.repo'
  • Now, you have to change the mirrorlist to:
mirrorlist=http://presto-mirrors.anmar.eu.org/mirrorlist?repo=updates-released-f$releasever.newkey&arch=$basearch 

Helpful Fedora Websites

These are some useful websites.

Fedora Forum

Fedora Project

Fedora Solved

The Unofficial Fedora FAQ

Dangermouse's Website

  • There is a very helpful thread relating to a script which will install some of the more popular packages.

Dangermouse's script thread

Folding at Home Howto (Use those spare CPU Cycles)

How to Install Fedora

  • To install Fedora refer to the Installation documents and the common problems.

Installation Documents

How to Upgrade Fedora

  • To upgrade Fedora refer to the information listed at the following website.

http://fedoraproject.org/wiki/YumUpgradeFaq#head-56b13936246769f517ac488a0098d193c7fc3600

  • Make sure you clear your yum cache then update everything and reboot
su -c 'yum clear all'
su -c 'yum update'
  • For i386
su -c '/bin/rpm -Uhv http://mirror.anl.gov/pub/fedora/linux/releases/8/Fedora/i386/os/Packages/fedora-release-8-3.noarch.rpm \
http://mirror.anl.gov/pub/fedora/linux/releases/8/Fedora/i386/os/Packages/fedora-release-notes-8.0.0-3.noarch.rpm'
  • For x86_64
su -c '/bin/rpm -Uvh http://mirror.anl.gov/pub/fedora/linux/releases/8/Fedora/x86_64/os/Packages/fedora-release-8-3.noarch.rpm \
http://mirror.anl.gov/pub/fedora/linux/releases/8/Fedora/x86_64/os/Packages/fedora-release-notes-8.0.0-3.noarch.rpm'
  • You will need to disable all other repositories during the upgrade and you will need to delete some files in order to complete the transition.
su -c 'yum upgrade'

Problems with Installing

With every version there are some problems.

Fedora 9 Common Issues

How to Contribute to Fedora

There are lots of ways you can help make this great operating system even better. It also can't progress faster without your help. If you want to get involved or are interested in getting involved.

Join the Fedora team

Users Administration

How to set/change/enable root user password

su --login
  • You can then change the root password
passwd root

How to disable root user account

passwd -l root

Installing System-Config-User

su -c 'yum -y install system-config-users'

How to add/edit/delete system users

Users Tab -> Add User.../Properties/Delete

How to add/edit/delete system groups

Groups Tab -> Add Group.../Properties/Delete

How to automatic login into GNOME (not secure)

  • Read #General Notes
  • Desktop -> System Settings -> Login Screen
  • Login Screen Setup
General Tab -> Automatic Login ->
Login a user automatically on first bootup (Checked)
Automatic login username: Select "system_username"

How to change files/folders permissions

Right click on files/folders -> Properties 
Permissions Tab -> Read/Write/Execute (Checked the permissions for Owner/Group/Others)

How to change files/folders ownership

chown system_username /location_of_files_or_folders

How to change files/folders group ownership

chgrp system_groupname /location_of_files_or_folders



List out your last update with rpm

rpm -qa --last | tac

Repositories

These additional software repositories will not be enabled by default. This is because there is a risk to your installation with differing version details which may leave your computer unable to function.

Note: Mixing repositories can be dangerous. After installation of the Livna repository protect it using the command listed here.

Livna

To install the Livna repository which can be left on by default.

su -c 'rpm -i http://rpm.livna.org/livna-release-9.rpm'

Protect your Repositories

Protect your repository so you do not break your Fedora installation.

su -c 'yum -y install yum-protectbase'
su -c 'perl -i -pe "s/(\[.*\])/\1\nprotect=yes/" /etc/yum.repos.d/{fedora*,livna*}'

Adobe

Create the file in the repository folder.

su -c 'rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm' 
  • When that has been installed edit the repo file to look like the following.
su -c 'gedit /etc/yum.repos.d/adobe-linux-i386.repo'
[adobe-linux-i386]
name=Adobe Systems Incorporated
baseurl=http://linuxdownload.adobe.com/linux/i386/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux

Atrpms

Atrpms has some packages that are quite helpful.

At the repository to your repository folder.

su -
cat < /etc/yum.repos.d/atrpms.repo
[atrpms]
name=Fedora Core $releasever - $basearch - ATrpms
baseurl=http://dl.atrpms.net/f$releasever-$basearch/atrpms/stable
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
gpgcheck=1
enabled = 0
EOF

FreshRPMS

You can install the freshrpms package however it is recommended to change the enabled section to be manually enabled.

su -c 'rpm -i http://ftp.freshrpms.net/pub/freshrpms/fedora/linux/7/freshrpms-release/freshrpms-release-1.1-1.fc.noarch.rpm'
su -c 'gedit /etc/yum.repos.d/freshrpms.repo'

You will need to change the enabled=1 to enabled=0 This is how it will be installed.

[freshrpms]
name=Fedora Core $releasever - $basearch - Freshrpms
#baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/$basearch/freshrpms/
mirrorlist=http://ayo.freshrpms.net/fedora/linux/$releasever/mirrors-freshrpms
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-freshrpms
gpgcheck=1

It needs to be changed to

[freshrpms]
name=Fedora Core $releasever - $basearch - Freshrpms
#baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/$basearch/freshrpms/
mirrorlist=http://ayo.freshrpms.net/fedora/linux/$releasever/mirrors-freshrpms
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-freshrpms
gpgcheck=1

Jpackage

  • NB Excepting JPackage free and non-free generic, this configuration is specific to Fedora 9 &

Red Hat 5.00.

  • You need to be in the directory and get the file.
cd /etc/yum.repos.d/
su -c 'wget http://www.jpackage.org/jpackage.repo'
  • You will need to edit the repository file.
su -c 'gedit /etc/yum.repos.d/jpackage.repo'
  • Adjust so it matches the following repo file.
  • In addition, place the symbol # before every line of a repository you do not need or want.
  • Uncomment, (which means to delete the # symbol) before every line of a repository you do want or need.
  • In order to enable a repository, change the line from enabled=0 to enabled=1.
# Be sure to enable the distro specific repository for your distro below:
# - jpackage-fc for Fedora Core
# - jpackage-rhel for Red Hat Enterprise Linux and derivatives

[jpackage-generic]
name=JPackage (free), generic
mirrorlist=http://www.jpackage.org/jpackage_generic_1.7.txt
failovermethod=priority
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc
enabled=1

[jpackage17-f9]
name=JPackage 1.7 (free) for Fedora 9
baseurl=ftp://jpackage.hmdc.harvard.edu/JPackage/1.7/fedora-9/free/
failovermethod=priority
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc
enabled=1

[jpackage50-f9]
name=JPackage 5.0 (free) for Fedora 9
baseurl=ftp://jpackage.hmdc.harvard.edu/JPackage/5.0/fedora-9/free/
failovermethod=priority
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc
enabled=1

#[jpackage17-rhel50]
#name=JPackage 1.7 (free) for Red Hat Enterprise Linux 5.0
#baseurl=ftp://jpackage.hmdc.harvard.edu/JPackage/1.7/redhat-el-5.0/free/
#failovermethod=priority
#gpgcheck=1
#gpgkey=http://www.jpackage.org/jpackage.asc
#enabled=0

#[jpackage17-rhel50]
#name=JPackage 5.0 (free) for Red Hat Enterprise Linux 5.0
#baseurl=ftp://jpackage.hmdc.harvard.edu/JPackage/5.0/redhat-el-5.0/free/
#failovermethod=priority
#gpgcheck=1
#gpgkey=http://www.jpackage.org/jpackage.asc
#enabled=0

[jpackage-generic-nonfree]
name=JPackage (non-free), generic
mirrorlist=http://www.jpackage.org/jpackage_generic_nonfree.txt
failovermethod=priority
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc
enabled=1

Google

You will need to be root to create the file.

su --login

Then create the repo

cat < /etc/yum.repos.d/google.repo
[google]
name=Google - i386
baseurl=http://dl.google.com/linux/rpm/stable/i386
enabled=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub
EOF

Is there a graphical (GUI) version for Yum

There are several types of software to help in the graphical area for yum.

Yumex

su -c 'yum -y install yumex'

Package Manager (Default)

This can be located in the following menu

System -> Administration -> Add/Remove Software

Permissions in Fedora

Adding your username to Sudo

Log in as root.

su --login

Add your user to the sudoers file.

echo 'your_plain_loginname_here ALL=(ALL) ALL’ >> /etc/sudoers


Hardware

Video Drivers

  • NVidia users, install the Livna repositories and yum for kmod-nvidia and reboot.
  • For ATI users, if your card is older than Radeon 9600, it should work out-of-the-box, if not, you will need to wait until ATI releases a new driver for kernel 2.6.23 and yum for kmod-fglrx from Livna after it has been released.
  • Intel user cheer to yourself as it works out-of-the-box.

Nvidia

Obtain Linux drivers from Nvidia.

http://www.nvidia.com/object/unix.html

The x86_64bit version works well on my AMD Athlon X2 notebook.

Nvidia (96xx)

su -c 'yum -y install kmod-nvidia-96xx'

ATI

You need to have the Livna Repository enabled.

Note: There are some bugs in the current version as of kmod-fglrx

su -c 'yum -y install kmod-fglrx xorg-x11-drv-fglrx-libs-32bit'

Wireless Drivers

Intel IPW3945

  • This is a guide to installing and setting up the Intel 3945 A/B/G wireless network adapter using FreshRPMS. It seems people are still having issues with this method. I will add the other method to aid in sorting out the issues.
  • Note: The new Fedora 9 drivers are very good and you should try them ahead of installing these. Install these as a last resort.
Method 1

You will need to install the FreshRPMS repository.

su -c 'yum --enablerepo=freshrpms install  dkms-ipw3945'
  • You must Configure your wireless using sytem-config-network a lot of people are forgetting this step. Do it through system-config-network. Delete wlan0 and install eth1
System -> Administration -> Network


Method 2

Credit for this method comes from the great fellas at fedorasolved.org

Basic description of what will be done and what is expected. Learn to become root here.

  • Blacklisting the offending modules:
nano /etc/modprobe.d/blacklist
  • add these exact lines at the bottom then save and exit:
#iwl3945
blacklist iwl3945
blacklist mac80211
  • Reboot the system:
reboot
  • Create a temp directory on your desktop called 'ipw3945' and download the following files into it:


mkdir /home/$user/Desktop/ipw3945 (replace $user with your username)


http://prdownloads.sourceforge.net/ipw3945/ipw3945-1.2.1.tgz?download

http://bughost.org/ipw3945/ucode/ipw3945-ucode-1.14.2.tgz

http://bughost.org/ipw3945/daemon/ipw3945d-1.7.22.tgz

http://fedoraos.org/ipw3945/ipw3945


  • Install kernel development packages and gcc compiler:
yum install kernel-devel gcc
  • Unpack the gzipped tarballs into the directory on your desktop called 'ipw3945' that we created earlier:
tar xvfz ipw3945-1.2.1.tgz
tar xvfz ipw3945-ucode-1.14.2.tgz
tar xvfz ipw3945d-1.7.22.tgz
  • Copy ucode firmware and regulatory daemon to their respective locations:
cp ipw3945-ucode-1.14.2/ipw3945.ucode /lib/firmware && cp ipw3945d-1.7.22/x86/ipw3945d /sbin
  • (or choose the version for x86_64 if necessary)
  • Compile and copy the resuling kernel module to the correct location (for more options here see 'more information' below):
cd ipw3945-1.2.1 && make

su --login

cp /home/$user/Desktop/ipw3945/ipw3945-1.2.1/ipw3945.ko lib/modules/`uname -r`/kernel/drivers/net/wireless/

chmod 744 /lib/modules/`uname -r`/kernel/drivers/net/wireless/ipw3945.ko

depmod -ae
  • Install startup init script:
cp /home/$user/Desktop/ipw3945/ipw3945 /etc/init.d
chmod +x /etc/init.d/ipw3945
chkconfig --add ipw3945 && chkconfig ipw3945 on
  • Reboot the system:
reboot

Troubleshooting How to test Explanation troubleshooting basics and expectations.

  • Configure the device:
system-config-network
  • new --> wireless connection --> Intel Corporation PRO/Wireless 3945ABG Network Connection --> forward
  • Restart the network:

Once you have disabled all other network cards, configured your ip address, gateway, DNS, subnet mask, SSID, wifi channel, and encryption key:

service network restart

Common problems and fixes

Many laptops with built in wireless have a WLAN switch that is a toggle switch for enabling/disabling the wireless radio.

Please make sure you check this is on, or your ipw3945 wireless adapter will not detect correctly or work at all.

Also, disable all other network cards before attempting to use the ipw3945. More Information

Special Notes:

If you'd like Monitor Mode, Promiscuous Mode or RadioTap enabled for this device you will need to edit the Makefile in

Step 7 before compiling the kernel module uncomment the corresponding line(s): Code:

CONFIG_IPW3945_MONITOR=y CONFIG_IEEE80211_RADIOTAP=y CONFIG_IPW3945_PROMISCUOUS=y


Added Reading

For new kernels you will have to do step 7 again.

Madwifi

You will need to install the Livna repository.

su -c 'yum -y install madwifi kmod-madwifi'
  • You will need to add the following lines to your modprobe.conf file
su -c 'gedit /etc/modprobe.conf'
## Start Atheros Stuff
alias wifi0 ath_pci
alias ath0 ath_pci
options ath_pci autocreate=sta
## End Atheros Stuff
  • Configure your wireless
System -> Administration -> Network

IPW2x00

  • You need to determine what wireless card you have
su -c '/sbin/lspci | grep Wireless'
  • Your output should look like the following.
02:01.0 Network controller: Intel Corporation PRO/Wireless 2200BG (rev 05)
02:01.0 Network controller: Intel Corporation PRO/Wireless LAN 2100 3B Mini PCI Adapter (rev 04)
  • You will need to install the relevant firmware
su -c 'yum -y install ipw2xxx-firmware'
  • Reboot your machine then configure your network.
System -> Administration -> Network

Broadcom b43 (Method 1)


su -c 'yum -y install b43-fwcutter'
  • Download the appropriate package based on this file
su -c 'gedit /usr/share/doc/b43-fwcutter-008/README'
  • Fedora instructions can be located under the README.Fedora
su -c 'gedit /usr/share/doc/b43-fwcutter-008/README.Fedora'
  • A copy of the README is listed below
Where can I find some driver source files?
------------------------------------------

Please check the references at
http://www.linuxwireless.org/en/users/Drivers/bcm43xx#devicefirmware

It is recommended that you extract firmware for both b43 and b43legacy in
order to support both types of cards on your system.
  • Run the fwcutter program
su -c 'b43-fwcutter -w /lib/firmware ~/Downloads/bcmwl5.sys'
  • Add it to the modules to test.
su -c '/sbin/modprobe b43'
  • Configure your network
System -> Administration -> Network

Broadcom b43 (Method 2)

  • Configure NetworkManager to automatically start and start the service.
su -c '/sbin/chkconfig NetworkManager on'
su -c '/sbin/service NetworkManager start'
  • Download and extract the firmware
wget http://downloads.openwrt.org/sources/broadcom-wl-4.80.53.0.tar.bz2
tar -jxvf broadcom-wl-4.80.53.0.tar.bz2
  • Cut the firmware
cd broadcom-wl-4.80.53.0/kmod
/usr/bin/b43-fwcutter -w /lib/firmware wl_apsta.o
  • Add the following line so that it can be configured by system-config-network
su -c 'echo "alias wlan0 b43" >> /etc/modprobe.conf'
  • Restart NetworkManager
su -c '/sbin/service NetworkManager restart'

Ndiswrapper drivers howto

Some drivers which are not released for linux will require Ndiswrapper to function. Bcm43xx driver may have been limited to 11Mbs using Ndiswrapper increases the speed.

You will need to install the Livna repository.

  • Install Ndiswrapper
su -c 'yum -y install kmod-ndiswrapper'
  • Make a directory to hold your driver.
su -c 'mkdir /ndiswrapper_drivers'
  • Log in as root
su --login
  • Now you will either need to get the drivers from your windows driver disk or download the drivers needed for your network card from the Ndiswrapper Wiki
cp netbc564.inf /ndiswrapper_drivers/
cp bcmwl564.sys /ndiswrapper_drivers/
  • Install the drivers
ndiswrapper -i netbc564.inf
  • The output should show the following
Installing netbc564
Forcing parameter IBSSGMode|0 to IBSSGMode|2
  • Verify that the drivers are loaded
ndiswrapper -l
  • The output should show
Installed drivers:
netbc564 driver present, hardware present
  • Load the kernel module
modprobe ndiswrapper
  • If everything loads and works add ndiswrapper to your modprobe.conf file. Then exit from root.
ndiswrapper -ma
echo "alias wlan0 ndiswrapper" >> /etc/modprobe.conf
exit
  • Configure your network
System -> Administration -> Network

or

su -c 'system-config-network'
  • The BCM4318 driver can be downloaded from the following links. Thanks go to Fedora Solved for hosting them.
BCM4318 using Ndiswrapper

There have been issues with bcm43xx actually working with the bcm4318 broadcom device. A solution is to use ndiswrapper, however, the bc43xx bits need to be removed to avoid conflicts

Download the BCM4318 drivers from the following links if you do not have the original driver disc. If you have the original drivers from disc or your windows partition use those drivers that are guaranteed to function. Thanks go to Fedora Solved for hosting them.

  • Log in as root
su --login
  • Unload the kernel module and open up the module blacklist file
/sbin/rmmod bcm43xx
su -c 'gedit /etc/modprobe.d/blacklist'
  • Blacklist the driver by adding the following line at the bottom of the file just opened.
blacklist bcm43xx_mac80211
  • Remove the device from system-config-network then create a new device
System -> Administration -> Network

Or

su -c 'system-config-network'

Activate side-mouse-buttons in FireFox

Just add two lines to xorg.conf will activate side-mouse-buttons in FireFox. This should work with most 5-button mouse. Here is a list of mice that worked with this instruction.

  • Logitech MX510
  • Logitech MX518
  • Logitech MX700
  • Intellimouse Explorer (first edition)

Backup Xorg configuration file

su -c 'cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak'

Modify the Xorg configuration file

su -c 'gedit /etc/X11/xorg.conf'

Find the Input Device section for your mouse and add two lines as shown below. You may also increase the number of buttons if your mouse has more than 7, just fix the rest of the section based upon the number of buttons (remember back/forward, wheel click & tilt left/right all count as buttons)

Change:

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
...
Option "Protocol" "ExplorerPS/2"
...
Option "Emulate3Buttons" "true"
EndSection

to:

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
...
Option "Protocol" "ExplorerPS/2"
...
Option "Emulate3Buttons" "true"
Option "Buttons" "7"
Option "ButtonMapping" "1 2 3 6 7"
EndSection

At this point you can reboot your computer or reboot Gnome (Ctrl-Alt-BackSpace) to see if your forward/back buttons work in FireFox. They still won't work in Nautilus yet until you install the imwheel dameon.


How to list partition tables

su -c '/sbin/fdisk -l'

How to list filesystem disk space usage

su -c 'df -T -h'

How to list mounted devices

mount

How to list PCI devices

/sbin/lspci

How to list USB devices

lsusb

How to speed up CD/DVD-ROM

e.g. Assumed that /dev/cdrom is the location of CD/DVD-ROM
su -c '/sbin/hdparm -d1 /dev/cdrom'
su -c 'gedit /etc/hdparm.conf'
  • Insert the following lines in the new file
/dev/cdrom {
dma = on
}
  • Save the edited file

How to mount/unmount CD/DVD-ROM manually, and show all hidden and associated files/folders

e.g. Assumed that /media/cdrom0/ is the location of CD/DVD-ROM
  • To mount CD/DVD-ROM
su -c 'mount /media/cdrom0/ -o unhide'
  • To unmount CD/DVD-ROM
su -c 'umount /media/cdrom0/'

How to forcefully unmount CD/DVD-ROM manually

e.g. Assumed that /media/cdrom0/ is the location of CD/DVD-ROM
su -c 'umount /media/cdrom0/ -l'

How to remount /etc/fstab without rebooting

su -c 'mount -a'

Applications

Compiz-fusion (3D effects)

  • Install compiz-fusion
su -c 'yum -y install compiz-fusion compiz-fusion-extras libcompizconfig ccsm compiz-manager'
  • For gnome these additional software are helpful
su -c 'yum -y install compiz-fusion-gnome compiz-fusion-extras-gnome'
  • To start it up run the following
compiz-manager
  • To start it up on boot do the following go to the following menu's

System > Preferences > Personal > Sessions > Startup Programs

Multimedia Applications

Installing a Media Player (Mplayer/Kplayer)

A movie player that can play propietary codecs.

You need to have the Livna Repository enabled.

  • For gnome
su -c 'yum -y install mplayer-gui'
  • For KDE
su -c 'yum -y install kplayer'

Installing a Media Player (Xine)

Another Movie Player

You need to have the Livna Repository enabled.

su -c 'yum -y install xine'
Enabling Extra Codecs
su -c 'yum -y install xine-lib-extras-nonfree'

Installing a Media Player (VLC)

You need to have the Livna Repository enabled.

su -c 'yum -y install vlc'

DVD Playback

This will enable dvd playback in Fedora.

su -c 'yum -y install libdvdread'

Windows Codecs (ALL video players)

  • Read #General Notes
  • Install wget first (sometimes not installed by default)
su -c 'yum -y install wget'
  • This will enable the codecs required to play most media released.
cd /tmp
wget http://www1.mplayerhq.hu/MPlayer/releases/codecs/all-20071007.tar.bz2
tar -jxvf all-20071007.tar.bz2
su -c 'mkdir -p /usr/local/lib/codecs'
su -c 'cp all-20071007/* /usr/local/lib/codecs'
rm -rf /tmp/all-20071007*

This may help as well but it is not required.

su -c 'ln -sf /usr/local/lib/codecs /usr/lib/codecs && ln -sf \
/usr/local/lib/codecs /usr/local/lib/win32 && ln -sf /usr/local/lib/codecs '

MP3 Playback

This will enable MP3 playback.

You need to have the Livna Repository enabled.

Gnome

This will enable MP3 playback using gstreamer in gnome.

su -c 'yum -y install gstreamer-plugins-ugly libmad libid3tag id3v2'
KDE

This will enable MP3 playback in KDE using KDE Multimedia

su -c 'yum -y install kdemultimedia-extras-nonfree id3v2'

OR

su -c 'yum install xine-lib-extras-nonfree id3v2'
Codeina
  • This is a new feature in Fedora 9. It should be installed by default. If not run the following commands. When you try to run an mp3 file it will offer you the opportunity to download a codec.
su -c 'yum install codeina'

Picasa

Picasa is software that helps you instantly find, edit and share all the pictures on your computer. Every time you open Picasa, it automatically locates all your pictures (even ones you forgot you had) and sorts them into visual albums organized by date with folder names you will recognize. You can drag and drop to arrange your albums and make labels to create new groups. Picasa makes sure your pictures are always organized.

You will need to have the Google Repo installed.

su -c 'yum --enablerepo=google install picasa'

Google Desktop

Google Desktop is a desktop search application that gives you easy access to information on your computer and from the web. Desktop makes searching your own email, files, music, photos, and more as easy as searching the web with Google.

You will need to have the Google Repo installed.

su -c 'yum --enablerepo=google install google-desktop-linux'

How to install ID3 Tag Editor (EasyTAG)

yum --enablerepo=freshrpms install easytag
  • Applications -> Sound & Video -> EasyTAG

How to install Video Editor (Kino)

su -c 'yum -y install kino'
  • Applications -> Sound & Video -> Kino

How to install K9copy

su -c 'yum install k9copy'

How to install DVD Ripper (dvd::rip)

su -c 'yum --enablerepo=freshrpms install dvdrip'

Firefox Tweaks

Speed Up Firefox Web Browser Tips

  • Applications -> Internet -> Firefox Web Browser
  • Mozilla Firefox
Address Bar -> about:config
Filter: ->
network.dns.disableIPv6 -> true
network.http.pipelining -> true
network.http.pipelining.maxrequests -> 8
network.http.proxy.pipelining -> true
  • Restart Mozilla Firefox

How to disable beep sound for link find function in Mozilla Firefox

  • Applications -> Internet -> Firefox Web Browser
  • Mozilla Firefox
Address Bar -> about:config
Filter: accessibility.typeaheadfind.enablesound -> false
  • Restart Mozilla Firefox

Setting the backspace button to go to a previous page

  • Applications -> Internet -> Firefox Web Browser
  • Mozilla Firefox
Address Bar -> about:config
Filter: -> browser.backspace_action -> 0
  • Restart Mozilla Firefox

Close the Download dialog quicker

  • Go to Applications -> Internet -> Firefox Web Browser
  • Put in your address bar
Address Bar -> about:config

Filter the configs options

Filter: -> alerts.totalOpenTime -> 500

Reduce the quantity of popups

  • Load Mozilla Firefox
  • Applications -> Internet -> Firefox Web Browser
  • Put in your address bar
Address Bar -> about:config
  • Filter the config options and change it to a reasonable number
Filter: -> dom.popup_maximum -> 5

Hide the Go Button

  • Load Mozilla Firefox
  • Applications -> Internet -> Firefox Web Browser
  • Put in your address bar
Address Bar -> about:config
  • Filter the config options and double click so it changes the result
browser.urlbar.hideGoButton -> Yes

Speed improvements using tmpfs

  • Load Mozilla Firefox
  • Applications -> Internet -> Firefox Web Browser
  • Put in your address bar
Address Bar -> about:config
  • Right click anywhere in the browser window and select
New -> String
  • Type in:
browser.cache.disk.parent_directory
  • press OK, and type in the new window:
/tmp
  • press OK

Fedora tweaks

Improving your bandwidth

This guide was taken from the ubuntu guide

  • Open the sysctl.conf file for editing and backup your previous sysctl.conf file
su -c 'cp /etc/syctl.conf /etc/sysctl.conf.backup'
su -c 'gedit /etc/sysctl.conf/
  • Add the following lines
 ## increase TCP max buffer size setable using setsockopt()
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
## increase Linux autotuning TCP buffer limits
## min, default, and max number of bytes to use
## set max to at least 4MB, or higher if you use very high BDP paths
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
## don't cache ssthresh from previous connection
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.tcp_moderate_rcvbuf = 1
## recommended to increase this for 1000 BT or higher
net.core.netdev_max_backlog = 2500
## for 10 GigE, use this, uncomment below
## net.core.netdev_max_backlog = 30000
## Turn off timestamps if you're on a gigabit or very busy network
## Having it off is one less thing the IP stack needs to work on
## net.ipv4.tcp_timestamps = 0
## disable tcp selective acknowledgements.
net.ipv4.tcp_sack = 0
##enable window scaling
net.ipv4.tcp_window_scaling = 1
  • Save it and close it. Run the following command
 su -c '/sbin/sysctl -p'

Swappiness

  • You can change how much swap space you use by changing the swappiness of your Fedora install. To do this add the following line with the number between 0-100.
  • Open the sysctl.conf file for editing and backup your previous sysctl.conf file
su -c 'cp /etc/sysctl.conf /etc/sysctl.conf.backup'
su -c 'gedit /etc/sysctl.conf'
  • Add the following line
vm.swappiness = 0
  • Reboot your computer

Noatime

  • Noatime affects how often the system updates your time in your computer. This is a significant loss in speed according to the kernel Devs. To speed it up do the following modifications.
  • Edit your fstab file and back it up
su -c 'cp /etc/fstab /etc/fstab.backup'
su -c 'gedit /etc/fstab'
  • Where the mount option says defaults you should add some more text.
  • Before:
UUID=5f7e8362-66d0-4806-b2cf-61eb74200001       /                       ext3    defaults        1 1
UUID=5f7e8362-66d0-4806-b2cf-61eb74200022 /home ext3 defaults 1 2
UUID=5f7e8362-66d0-4806-b2cf-61eb74200333 /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
UUID=5f7e8362-66d0-4806-b2cf-61eb74204444 swap swap defaults 0 0
  • After:
UUID=5f7e8362-66d0-4806-b2cf-61eb74200001       /                       ext3    defaults,noatime,nodiratime        1 1
UUID=5f7e8362-66d0-4806-b2cf-61eb74200022 /home ext3 defaults,noatime,nodiratime 1 2
UUID=5f7e8362-66d0-4806-b2cf-61eb74200333 /boot ext3 defaults,noatime,nodiratime 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
UUID=5f7e8362-66d0-4806-b2cf-61eb74204444 swap swap defaults 0 0
  • Notice the only modification is to the lines that mount my default partitions. After the editing has been completed you will need to restart your computer for it to take effect.
  • If you don't wish to reboot the computer, you may also remount the partitions of the live system:
su -c 'mount / -o remount'
su -c 'mount /home -o remount'

Preload

  • Preload is an adaptive readahead daemon, that will monitor which programs you use most. Parts of these programs will be cached to speed up their load time. You can get it by running the following command:
su -c 'yum -y install preload'
  • After having installed it, remember to check if it's running and if it's enabled to start at boot time. You may do this by going to System -> Administration -> Services and scrolling down to the "preload" entry: if it isn't checked, check it (click on the "Enable" button).

Speed improvements using tmpfs

  • Use tmpfs for frequently use temp folders.
  • Add the following to /etc/fstab
#### RAM Drives ####
tmpfs /tmp tmpfs defaults 0 0
tmpfs /var/tmp tmpfs defaults 0 0
  • As this change is important for SSD (Solid State Drive) systems, it also make significant impact on applications such as Win4LinPro

Gnome Tweaks

Gnome Menu (delay)

  • This is a simple alteration that will speed up your gnome menu load up.
echo "gtk-menu-popup-delay = 0" >> ~/.gtkrc-2.0

KDE Tweaks/Tips

Konqueror tabs (close buttons)

  • Open the following file in Kedit
kedit ~/.kde/share/config/konquerorrc
  • Now you will either need to add the following to the [FMSettings] or add [FMSettings] to the file. I will assume that you don't have the [FMSettings].
[FMSettings]
AddTabButton=false
CloseTabButton=false
HoverCloseButton=true

Viewing info pages in Konqueror/Run

  • To view an info/man page in Konqueror all you have to do is:
info:progname
  • Where progname is the program name such as:
info:bash
  • You put this in the address bar of Konqueror. To do this using man all you have to do is change the line to the following:
man:progname
  • Where progname is the program name such as:
man:yum
  • You can do this using Konqurero or Run (pushing Alt+F2)

Searching with Google in Konqueror/Run

  • To search using Konqueror/Run using google you can simple type:
gg:yoursearch
  • Such as
gg:fedoraguide
  • You can do this using Konqueror or Run (pushing Alt+F2)
  • To alter the standard search engine used Konqueror go to. (Thanks to Kim)
settings->configure konqueror->Web Shortcuts

Bash Tweaks/Tips

Auto-correct typos

  • Bash has a build in command called shopt which helps to find errors this may be helpful.
  • To enable it start the following
shopt -s cdspell
  • Test it
cd /hme/marc
/home/marc

Ignore Case for filenames

  • Using the same program as above you can change bash to search ignoring case for programs
shopt -s nocaseglob
  • What you do then is when you push tab to find a filename bash will do a case insensitive search

Make a file completely secure

  • To make a file completely safe even as the root user run the following command.
su -c 'chattr +i myfile'
  • This will make the file extra secure. To remove it run the following command
su -c 'chattr -i myfile'

Running old commands

  • To run old commands that you aren't sure about try:
history | grep -i "searchvalue"

Renaming a lot of files

  • Sometimes people forget to add file types to the end of files you can do this running the following command.
rename file newfile file
rename ipw3945howto ipw3945howto.txt ipw3945howto

Deleting securely

  • In Fedora there is program that will completely delete your files. The man page explains it like this Overwrite the specified FILE(s) repeatedly, in order to make it harder for even very expensive hardware probing to recover the data.
shred -z -u yourfile

Watching logs

  • There are several ways to follow what is going on in your logs. One way is to use the program watch
su -c 'watch /var/log/messages'
  • Another way is to use the tail command
su -c 'tail -f /var/log/messages'
  • The -f command means to follow the log. This will show any updates to the your messages log file

Firefox Plugins

This section will install some basic browser plugins for firefox which is the default browser in Fedora 7.

Flash

Installation without #Adobe repository:

su -c 'rpm -ivh http://fpdownload.macromedia.com/get/flashplayer/current/flash-plugin-9.0.124.0-release.i386.rpm'

or if you are feeling adventureous try the new Flash Player 10beta:

su -c 'rpm -ivh http://download.macromedia.com/pub/labs/flashplayer10/flashplayer10_install_linux_051508.i386.rpm'


Installation if you have #Adobe repository setup.

  • Install the Flash Plugin
su -c 'yum --enablerepo=adobe-linux-i386 install flash-plugin'
  • If you don't hear audio during playback of flash video just install packet called libflashsupport
su -c 'yum install libflashsupport'

In future if you want to update your flash plugin

su -c 'yum --enablerepo=adobe-linux-i386 update flash-plugin'
  • There is no 64 bit flash so to enable flash in a 64 bit machine you will need a program called nsplugininwrapper to finish off the install.
su -c 'yum install nspluginwrapper'
  • To enable it run the following command.
mozilla-plugin-config

Sun Java (Method 1)

There are several methods to install the Sun Java Runtime Environment. It has not been completely open sourced so it is not included in Fedora at this stage. This will change in the future when Sun has completely open sourced this package.

Some packages need to be installed initially to complement the installation.

su -c 'yum install compat-libstdc++-33 compat-libstdc++-296'

You will then need to update the library links.

su -c '/sbin/ldconfig'

You will need to download the Java Package.

You need to download the *.bin file. Currently the file is Java Runtime Environment (JRE) 6 update 4. (jre-6u4-linux-i586.bin)

You will need to be root

su --login

Switch to the correct directory

cd /opt

You will need to run the binary file.

sh /home/marc/Desktop/jre-6u3-linux-i586.bin

Link the plugins into the browser directory

ln -s /opt/jre1.6.0_04/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/libjavaplugin_oji.so

Create a java.sh script.

/etc/profile.d/java.sh
======================
export JAVA_HOME=/opt/jre1.6.0_04
export PATH=$JAVA_HOME/bin:$PATH

In the terminal:

source /etc/profile.d/java.sh

Type the following

/usr/sbin/alternatives --install /usr/bin/java java /opt/jre1.6.0_04/bin/java 2

Configure the java version

/usr/sbin/alternatives --config java

Enable the Sun JRE as the default package

There are 2 programs which provide 'java'.
Selection Command
-----------------------------------------------
*+ 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
2 /opt/jre1.6.0_04/bin/java
Enter to keep the current selection[+], or type selection number:

Type the following:

2

Test to see if it is enabled you should see it installed.

/usr/sbin/alternatives --display java
  • Restart firefox to make sure firefox is making use of the java go to the following website.
  • It seems that this bug is fixed with a new version of libxcb. You can find more info at this Bugzilla reference

Sun Java (Method 2 - jdk-6u4-linux-i586.bin version)

Some packages need to be installed initially to complement the installation.

su -c 'yum install compat-libstdc++-33 compat-libstdc++-296'

You will then need to update the library links.

su -c '/sbin/ldconfig'
  • You will need to download the Java package from Sun. When you download you will need to download the *bin file NOT the *rpm file. Current version is jdk-6u4-linux-i586.bin
  • You will need to install some pre-requisite packages.
su -c 'yum install rpm-build yum-utils'
  • Switch to root
su --login
  • Move the files to the appropriate directory and create the directories.
rpmdev-setuptree
mv /home/desktop/YourUsername/jdk* /usr/src/redhat/SOURCES/
  • Switch to the directory
cd /usr/src/redhat/SRPMS/
  • Get the Source RPM
wget http://mirrors.dotsrc.org/jpackage/1.7/generic/non-free/SRPMS/java-1.6.0-sun-1.6.0.4-1jpp.nosrc.rpm 
  • Rebuild the RPM
setarch i586 rpmbuild --rebuild java-1.6.0-sun-1.6.0.4-1jpp.nosrc.rpm
  • Delete some files that can't be installed on Fedora
rm -f /usr/src/redhat/RPMS/i586/java-1.6.0-sun-fonts* /usr/src/redhat/RPMS/i586/java-1.6.0-sun-jdbc*
  • Install the rpm's
yum --nogpgcheck localinstall /usr/src/redhat/RPMS/i586/java-1.6.0-sun-*
  • Create the link so that it works in Firefox
ln -s /usr/lib/jvm/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla/plugins/
  • Check to see if it is functioning at java if it shows the wrong version do the following steps.
  • Enable the Sun JRE as the default package
There are 2 programs which provide 'java'.
Selection Command
-----------------------------------------------
*+ 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
2 /opt/jre1.6.0_04/bin/java
Enter to keep the current selection[+], or type selection number:

Type the following:

2

Test to see if it is enabled you should see it installed.

Mplayer (Watching Movies)

If you want to watch movies like avi's in your browser.

You need to have the Livna Repository enabled.

su -c 'yum install mplayerplug-in'

Xine (Watching Movies)

If you want to watch movies like avi's in your browser.

You need to have the Livna Repository enabled.

su -c 'yum install totem-xine-mozplugin'

How to play the mms protocol

How to handle mms protocol in Mozilla Firefox

  • Open your firefox.
  • Type as url: about:config
  • Now just right click somewhere into the main window. A little box with options to choose will appear. Choose "new", then "string".
  • Then copy the following line into the appearing text field:
network.protocol-handler.app.mms
  • Into the next text field copy this:
/usr/bin/mplayer
  • Now you do the same thing again, but this time you do not choose "string" but "boolean", and the line to copy is:
network.protocol-handler.external.mms
  • Then set
true

How to play Quicktime files

You need to have the Livna Repository enabled.

su -c 'yum install libquicktime'

Link Adobe Acrobat to the mozilla plugins

Linking to the mozilla plugins folder will allow you to view the pdf in the browser instead of viewing with Acrobat Reader

cd /usr/lib/mozilla/plugins
su -c 'ln -s /usr/local/Adobe/Acrobat7.0/Browser/intellinux/nppdf.so'

CD/DVD Creation/Burning

How to blank a CD/DVD

You can do this with the software listed below

This is what you can do quickly in the console.

  • Put the CD/DVD in
su -c 'umount /dev/cdrom'
cdrecord dev=/dev/cdrom blank=fast
  • Just a clarification, I cdrecord is not installed on FC9 at all, rather there is a program called "wodim" which is linked to cdrecord. Wodim is a modified version of an old version of cdrecord, not the current program from the original author.

CD/DVD Burning

GnomeBaker

A burning utility known as Gnome-Baker

su -c 'yum install gnomebaker'
K3B

K3B is a burning program with similar functionalities to closed source Nero

su -c 'yum install k3b'
  • To enable MP3 and other proprietary support in K3B
su -c 'yum install k3b-extras-nonfree'
CD/DVD Creator
Places -> CD/DVD Creating

Then when loaded.

File Menu -> Write to Disc

How to Burn an Image (iso) to Disc

Right click on image (ISO) file -> Write to Disc

How to Create an Image (iso) File

  • Using a folder as the data
mkisofs -r -o file.iso /location_of_folder/
  • Creating an iso from a CD/DVD
su -c 'umount /dev/cdrom'
readcd dev=/dev/cdrom f=file.iso

How to Un/Mount an Image (iso) without burning it

  • To mount your file.iso
mkdir ~/your_disc/
su -c 'mount file.iso ~/your_disc -t iso9660 -o loop'

To access your file.iso you can go into the directory ~/your_disc

  • To unmount your file.iso
su -c 'umount ~/your_disc/'

How to generate MD5 checksum files

md5sum file.iso > file.iso.md5

How to check MD5 checksum of files

e.g. Assumed that file.iso and file.iso.md5 are in the same folder
md5sum -c file.iso.md5

How to set/change the burn speed for CD/DVD Burner

  • Read #General Notes
  • Applications -> System Tools -> Configuration Editor
  • Configuration Editor
/ -> apps -> nautilus-cd-burner -> default_speed (set/change the burn speed)

How to enable burnproof for CD/DVD Burner

  • Read #General Notes
  • Applications -> System Tools -> Configuration Editor
  • Configuration Editor
/ -> apps -> nautilus-cd-burner -> burnproof (Checked)

How to enable overburn for CD/DVD Burner

  • Read #General Notes
  • Applications -> System Tools -> Configuration Editor
  • Configuration Editor
/ -> apps -> nautilus-cd-burner -> overburn (Checked)

Installing Music Players

Installing a Music Player (Songbird)

  • Read #General Notes
  • I have since grabbed Martje_001 from ubuntuforums
  • It has been modified slightly to be updated to the latest version.
  • You will need to paste this script into Gedit then run the script as root.
gedit
  • Copy and paste the script below and save it with the filename installsongbird.sh
#!/bin/bash
if [ -d /opt/songbird ]; then
zenity --info --text="You appear to already have Songbird installed. To get the newest version, you should use the self-update function in Songbird instead of using this script."
exit
fi

cd /tmp
uname -m > tmp.arch.txt
if grep -q "64" tmp.arch.txt ; then
anw=`zenity --question --text "You appear to have an AMD64 architecture. Do you want to install the 64-bit version of Songbird?"; echo $?`
if [ $anw = 0 ] ; then
echo 0
wget http://www.xs4all.nl/~mgj1/Songbird/64.bit
URL=`head -n 1 64.bit | tail -n 1`
FILE=`head -n 2 64.bit | tail -n 1`
rm 64.bit
wget "$URL" 2>&1 | sed -u 's/.*\ \([0-9]\+%\)\ \+\([0-9.]\+\ [KMB\/s]\+\)$/\1\n# Downloading Songbird with \2/' | zenity --progress --auto-close --title="Downloading Songbird..."
tar -xvzf "$FILE"
else
zenity --info --text="Installation cancelled."
fi

elif grep -q "86" tmp.arch.txt ; then
anw=`zenity --question --text "You appear to have an x86 architecture. Do you want to install the i686 version of Songbird?"; echo $?`
if [ $anw = 0 ] ; then
gksudo "echo 0"
wget http://www.xs4all.nl/~mgj1/Songbird/32.bit
URL=`head -n 1 32.bit | tail -n 1`
FILE=`head -n 2 32.bit | tail -n 1`
rm 32.bit
wget "$URL" 2>&1 | sed -u 's/.*\ \([0-9]\+%\)\ \+\([0-9.]\+\ [KMB\/s]\+\)$/\1\n# Downloading Songbird with \2/' | zenity --progress --auto-close --title="Downloading Songbird..."
tar -xvzf "$FILE"
else
zenity --info --text="Installation cancelled."
fi
else
zenity --info --text="This script works for only x86 and AMD64 architectures."
fi
rm tmp.arch.txt
mv Songbird /opt/songbird
rm Songbird*.tar.gz
/usr/sbin/alternatives --install /usr/bin/Songbird songbird /opt/songbird/songbird 2
chown -Rf nobody.nobody /opt/songbird
chmod -Rf 777 /opt/songbird/
wget -c -q http://www.psychocats.net/ubuntu/songbirdicon.png
mv songbirdicon.png /usr/share/pixmaps/songbird.png
wget -c -q http://www.psychocats.net/ubuntu/songbird.desktop
mv songbird.desktop /usr/share/applications/songbird.desktop
zenity --info --text="After you refresh your menus, Songbird should be available as an application within the menus. If not, the launcher for Songbird should use the command Songbird (with a capital S). \n \nEnjoy!"
  • Make the script executible
chmod +x installsongbird.sh
  • Switch to root
su --login
  • Switch to the home directory where you saved the script
cd /home/YourUsername
  • Run the script
./installsongbird.sh
  • To uninstall run the following script as root in the same manner you did before.
#!/bin/bash
anw=`zenity --question --text "This will remove Songbird. Continue?"; echo $?`
if [ $anw = 0 ] ; then
rm -rf /opt/songbird
/usr/sbin/alternatives --remove Songbird /usr/bin/Songbird
rm /usr/share/applications/songbird.desktop
rm /usr/share/pixmaps/songbird.png
anw=`zenity --question --text "Do you want to keep your preferences?"; echo $?`
if [ $anw = 1 ] ; then
rm -r ~/.songbird
fi
fi
zenity --info --text="Songbird is now removed from your system."
  • Then run this script as root.
sh uninstallsongbird.sh
  • Finally if you want to remove your preferences you will need to switch to your user and run the following command
rm -r ~/.songbird*

XMMS (playing mp3's)

How to play MP3's using a program such as xmms.

You need to have the Livna Repository enabled.

Setting Winamp Presets in XMMS

You will need to have installed XMMS from above.

  • Create a file in your home directory
gedit ~/.xmms/eq.preset
  • Add this into the file.
;
; WinAmp EQ presets for XMMS. converted by Urpo Lankinen
; Do whatever you want with these. I don't care. No warranty
; expressed or implied. (And if you blast your speakers with these.
; It's Nullsoft's fault anyway =)
;

[Presets]
Preset0=(WinAmp) Classical
Preset1=(WinAmp) Club
Preset2=(WinAmp) Dance
Preset3=(WinAmp) Full Bass
Preset4=(WinAmp) Full Bass & Treble
Preset5=(WinAmp) Full Treble
Preset6=(WinAmp) Laptop Speakers / Headphones
Preset7=(WinAmp) Large Hall
Preset8=(WinAmp) Live
Preset9=(WinAmp) Party
Preset10=(WinAmp) Pop
Preset11=(WinAmp) Reggae
Preset12=(WinAmp) Rock
Preset13=(WinAmp) Ska
Preset14=(WinAmp) Soft
Preset15=(WinAmp) Soft rock
Preset16=(WinAmp) Techno

[(WinAmp) Classical]
Preamp=-1.11022e-15
Band0=-1.11022e-15
Band1=-1.11022e-15
Band2=-1.11022e-15
Band3=-1.11022e-15
Band4=-1.11022e-15
Band5=-1.11022e-15
Band6=-7.2
Band7=-7.2
Band8=-7.2
Band9=-9.6

[(WinAmp) Club]
Preamp=-1.11022e-15
Band0=-1.11022e-15
Band1=-1.11022e-15
Band2=8
Band3=5.6
Band4=5.6
Band5=5.6
Band6=3.2
Band7=-1.11022e-15
Band8=-1.11022e-15
Band9=-1.11022e-15

[(WinAmp) Dance]
Preamp=-1.11022e-15
Band0=9.6
Band1=7.2
Band2=2.4
Band3=-1.11022e-15
Band4=-1.11022e-15
Band5=-5.6
Band6=-7.2
Band7=-7.2
Band8=-1.11022e-15
Band9=-1.11022e-15

[(WinAmp) Full Bass]
Preamp=-1.11022e-15
Band0=-8
Band1=9.6
Band2=9.6
Band3=5.6
Band4=1.6
Band5=-4
Band6=-8
Band7=-10.4
Band8=-11.2
Band9=-11.2

[(WinAmp) Full Bass & Treble]
Preamp=-1.11022e-15
Band0=7.2
Band1=5.6
Band2=-1.11022e-15
Band3=-7.2
Band4=-4.8
Band5=1.6
Band6=8
Band7=11.2
Band8=12
Band9=12

[(WinAmp) Full Treble]
Preamp=-1.11022e-15
Band0=-9.6
Band1=-9.6
Band2=-9.6
Band3=-4
Band4=2.4
Band5=11.2
Band6=16
Band7=16
Band8=16
Band9=16.8

[(WinAmp) Laptop Speakers / Headphones]
Preamp=-1.11022e-15
Band0=4.8
Band1=11.2
Band2=5.6
Band3=-3.2
Band4=-2.4
Band5=1.6
Band6=4.8
Band7=9.6
Band8=12.8
Band9=14.4

[(WinAmp) Large Hall]
Preamp=-1.11022e-15
Band0=10.4
Band1=10.4
Band2=5.6
Band3=5.6
Band4=-1.11022e-15
Band5=-4.8
Band6=-4.8
Band7=-4.8
Band8=-1.11022e-15
Band9=-1.11022e-15

[(WinAmp) Live]
Preamp=-1.11022e-15
Band0=-4.8
Band1=-1.11022e-15
Band2=4
Band3=5.6
Band4=5.6
Band5=5.6
Band6=4
Band7=2.4
Band8=2.4
Band9=2.4

[(WinAmp) Party]
Preamp=-1.11022e-15
Band0=7.2
Band1=7.2
Band2=-1.11022e-15
Band3=-1.11022e-15
Band4=-1.11022e-15
Band5=-1.11022e-15
Band6=-1.11022e-15
Band7=-1.11022e-15
Band8=7.2
Band9=7.2

[(WinAmp) Pop]
Preamp=-1.11022e-15
Band0=-1.6
Band1=4.8
Band2=7.2
Band3=8
Band4=5.6
Band5=-1.11022e-15
Band6=-2.4
Band7=-2.4
Band8=-1.6
Band9=-1.6

[(WinAmp) Reggae]
Preamp=-1.11022e-15
Band0=-1.11022e-15
Band1=-1.11022e-15
Band2=-1.11022e-15
Band3=-5.6
Band4=-1.11022e-15
Band5=6.4
Band6=6.4
Band7=-1.11022e-15
Band8=-1.11022e-15
Band9=-1.11022e-15

[(WinAmp) Rock]
Preamp=-1.11022e-15
Band0=8
Band1=4.8
Band2=-5.6
Band3=-8
Band4=-3.2
Band5=4
Band6=8.8
Band7=11.2
Band8=11.2
Band9=11.2

[(WinAmp) Ska]
Preamp=-1.11022e-15
Band0=-2.4
Band1=-4.8
Band2=-4
Band3=-1.11022e-15
Band4=4
Band5=5.6
Band6=8.8
Band7=9.6
Band8=11.2
Band9=9.6

[(WinAmp) Soft]
Preamp=-1.11022e-15
Band0=4.8
Band1=1.6
Band2=-1.11022e-15
Band3=-2.4
Band4=-1.11022e-15
Band5=4
Band6=8
Band7=9.6
Band8=11.2
Band9=12

[(WinAmp) Soft rock]
Preamp=-1.11022e-15
Band0=4
Band1=4
Band2=2.4
Band3=-1.11022e-15
Band4=-4
Band5=-5.6
Band6=-3.2
Band7=-1.11022e-15
Band8=2.4
Band9=8.8

[(WinAmp) Techno]
Preamp=-1.11022e-15
Band0=8
Band1=5.6
Band2=-1.11022e-15
Band3=-5.6
Band4=-4.8
Band5=-1.11022e-15
Band6=8
Band7=9.6
Band8=9.6
Band9=8.8
  • Save the file
  • Load the preset from within xmms
Open the equalizer -> Click Preset -> Load -> Presets
su -c 'yum install xmms-mp3'

Amarok (with mp3 support)

You need to have the Livna Repository enabled.

su -c 'yum install amarok amarok-extras-nonfree'

Audacious (with mp3 support)

You need to have the Livna Repository enabled.

  • There are numerous plugins that are available.
su -c 'yum install audacious audacious-plugins-nonfree-mp3'

How to install Multimedia Player (RealPlayer 10)

su -c 'yum -y install compat-libstdc++-33'
  • Download RealPlayer Gold from here.
  • Install it.
Assumed that .rpm file has been downloaded to your Desktop, because Firefox by default downloads everything to your Desktop
su -c 'rpm -ivh Desktop/RealPlayer10GOLD.rpm'
su -c 'yum remove HelixPlayer'
  • Applications -> Sound & Video -> RealPlayer 10

How to install Stream Directory Browser (streamtuner)

wget -c ftp://ftp.freshrpms.net/pub/dag/dries/packages/streamtuner/fc5-i386/streamtuner-0.99.99-1.fc5.rf.i386.rpm 
su -c 'rpm -ivh streamtuner-0.99.99-1.fc5.rf.i386.rpm'
su -c 'rm -f streamtuner-0.99.99-1.fc5.rf.i386.rpm'
  • or
su -c 'yum --enablerepo=freshrpms install streamtuner'
  • Applications -> Sound & Video -> streamtuner

How to extract RAR files (rar)

Rar files are starting to be used extensively on the internet. You can install the package in Fedora.

You need to have the Livna Repository enabled.

su -c 'yum install unrar'

Audio Editor (Audacity)

You need to have the Livna Repository enabled.

This will enable the non-free aspects of audacity.

su -c 'yum install audacity-nonfree'

Google Earth

  • You will need either the nvidia or ATI drivers installed to view the graphics properly. It is unsure whether Google Earth will work when F8 is released. I will update this when I know further.
here.]
wget http://dl.google.com/earth/client/current/GoogleEarthLinux.bin
  • Run the associated bin file.
sh GoogleEarthLinux.bin
  • Note: There are issues relating to the latest ATI drivers (8.40.4)with Google Earth. A solution has been found. Please read this post for a way of solving it.

How to view NTFS partitions

Getting access to your windows partitions are easier now.

su -c 'yum install ntfs-3g ntfs-config'

How to configure NTFS partitions using ntfs-config

  • You can setup ntfs partition manually which is explained how to do in a paragraphs beneath this, or just use ntfs-config utility that does that automatically for you. Please first backup your /etc/fstab file before you do anything so you can revert back if you make a mess out of it.
su -c 'cp /etc/fstab /etc/fstab.original'
  • Then just start ntfs-config
su -c 'ntfs-config'

How to configure NTFS partitions manually

Setting up Windows Partition folders

  • You will need to create a folder which you can 'mount' your windows partition in.
su -c 'mkdir /media/windows'
  • If you mount your partitions in /media directory they show up in "Removable media" under Places menue in Gnome and on Desktop. If you don't want your partitions showing there mount then under some other directory; for example unders /mnt.
  • Now you need to locate your windows partition, do this with the following command.
su -c '/sbin/fdisk -l'
  • That command should return something similar to the following.
Disk /dev/sda: 200.0 GB, 200048565760 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 11572 92952058+ 7 HPFS/NTFS
/dev/sda2 11573 23321 94373842+ 83 Linux
/dev/sda3 23322 24321 8032500 82 Linux swap / Solaris

Disk /dev/sdb: 200.0 GB, 200048565760 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 24321 195358401 b W95 FAT32
  • Now an entry is needed in the files system table, to do so enter the following.
su -c 'nano /etc/fstab'
  • Now in text editor make and entry similar to the follwing as the last line of the file.
/dev/sda1   /media/windows ntfs-3g    defaults,fmask=0000,dmask=0000,uid=500   0 0
  • If your partition identifier is not "/dev/sda1" substitute the correct device. (For example it might be "/dev/sda1" if you have a SATA /SCSI drive.) Once the new line is added press ctrl+o, at the File Name to Write: /etc/fstab prompt; press enter, this will save the file. Then press ctrl+x to exit the editor. Now you need to mount your new partitions.
su -c 'mount -a'
  • At the prompt enter your root password and press enter.
  • Close the terminal.
  • Your Windows partition should now be available in Nautilus under "/media/windows".

How to mount/unmount Windows partitions (NTFS) manually, and allow all users to read only


e.g. Assumed that /dev/hda1 is the location of Windows partition (NTFS)
Local mount folder: /media/windows
  • To mount Windows partition
su -c 'mkdir /media/windows'
su -c 'mount /dev/hda1 /media/windows/ -t ntfs-3g -o nls=utf8,umask=0222'
  • To unmount Windows partition
su -c 'umount /media/windows/'

How to mount/unmount Windows partitions (FAT) manually, and allow all users to read/write

e.g. Assumed that /dev/hda1 is the location of Windows partition (FAT)
Local mount folder: /media/windows
  • To mount Windows partition
su -c 'mkdir /media/windows'
su -c 'mount /dev/hda1 /media/windows/ -t vfat -o iocharset=utf8,umask=000'
  • To unmount Windows partition
su -c 'umount /media/windows/'

How to mount Windows partitions (NTFS) on boot-up, and allow all users to read only

e.g. Assumed that /dev/hda1 is the location of Windows partition (NTFS)
Local mount folder: /media/windows
su -c 'mkdir /media/windows'
su -c 'cp /etc/fstab /etc/fstab_backup'
su -c 'gedit /etc/fstab'
  • Append the following line at the end of file
/dev/hda1    /media/windows ntfs-3g  nls=utf8,umask=0222 0    0

How to mount Windows partitions (FAT) on boot-up, and allow all users to read/write

e.g. Assumed that /dev/hda1 is the location of Windows partition (FAT)
Local mount folder: /media/windows
su -c 'mkdir /media/windows'
su -c 'cp /etc/fstab /etc/fstab_backup'
su -c 'gedit /etc/fstab'
  • Append the following line at the end of file
/dev/hda1    /media/windows vfat  iocharset=utf8,umask=000  0    0

Bittorrent Clients

Fedora is released using bittorrent and it is the recommended way to download the Fedora ISO's. Here are some programs you can install to enable bittorrent.

Azureus

This is enabled in extras already.

su -c 'yum install azureus'

Bittorrent

The orginal bittorrent client.

su -c 'yum install bittorrent'

Bittorrent (gui)

The graphical interface to the bittorrent client.

su -c 'yum install bittorrent-gui'

Windows Emulators

Wine

Wine is one of the busiest and fastest changing emulators out on the market. You can find a lot of info relating to what windows programs work at the Wine Application DB

su -c 'yum install wine'
Utorrent

To install UTorrent you will need to install wine as stated above.

wine utorrent.exe

Fonts

After you install the fonts you need to log off and then log back on for the fonts to be enabled and functioning.

Free-type Freeworld

More information relating to fonts can be found on the Linux Font HOWTO.

The freetype-freeworld package uses a technique described in this bug report.

rpm -Uvh http://avi.alkalay.net/software/freetype.bci/FC7/freetype-freeworld-2.3.4-1.i386.rpm

Microsoft Core Fonts

These fonts need to be built from the web so you will build an rpm package based on a SPEC file.

su -c 'yum install wget rpmdevtools rpmbuild cabextract ttmkfdir'
  • Then create the rpmdev directory
rpmdev-setuptree
  • Switch to your SPECS directory that you created in the previous step.
cd ~/rpmbuild/SPECS/
  • Download the spec file.
wget http://dl.atrpms.net/all/chkfontpath-1.10.1-2.fc9.x86_64.rpm
wget http://corefonts.sourceforge.net/msttcorefonts-2.0-1.spec
  • run the following command to build the rpm
rpmbuild -bb msttcorefonts-2.0-1.spec
  • Move to where the msttcorefonts rpm was created
cd ~/rpmbuild/RPMS/noarch/
  • Download and install the msttcorefonts and dependencies
su -c 'rpm -ivh chkfontpath-1.10.1-2.fc9.x86_64.rpm'
su -c 'rpm -ivh msttcorefonts-2.0-1.noarch.rpm'
  • Then run the following code to restart the font server.
su -c '/sbin/service xfs reload'

Or

su -c '/etc/init.d/xfs reload'

Turn on smooth fonts

This will turn on smooth fonts.

gedit ~/.fonts.conf

You then need to enter this data into it.






true



Windows Messaging

To enable Windows Messaging on your computer you will need to install one program.

Amsn

su -c 'yum install amsn'

Gaim/Pidgin

su -c 'yum install gaim'

Internet Relay Chat (IRC)

You can connect to internet relay chat servers to communicate with other people.

XChat

su -c 'yum install XChat'
  • When installed you need to choose a server and log in name.

How to install Skype

  • Add the following repository to your Fedora install.
su -
cat < /etc/yum.repos.d/skype.repo
[skype]
name=Skype Repository
baseurl=http://download.skype.com/linux/repos/fedora/updates/i586/
gpgkey=http://gd.tuwien.ac.at/infosys/phone/skype/rpm-public-key.asc
EOF
  • Install skype
su -c 'yum -y install skype'

How to install Download Manager (Downloader for X)

su -c 'yum -y install d4x'
  • Applications -> Internet -> Downloader for X

How to install FTP Client (gFTP)

su -c 'yum -y install gftp'
  • Applications -> Internet -> gFTP

How to install P2P eMule Client (aMule)

su -c 'yum -y install amule'
  • Applications -> Internet -> aMule

How to install Image Viewer (Gwenview)

su -c 'yum -y install gwenview'
  • Applications -> Graphics -> Gwenview

How to install Email Client (Mozilla Thunderbird)

su -c 'yum -y install thunderbird'
  • Applications -> Internet -> Thunderbird Mail Client

How to install Newsreader (Pan)

su -c 'yum -y install pan'
  • Applications -> Internet -> Pan Newsreader

How to install CHM viewer (GnoCHM)

su -c 'yum -y install gnochm'
  • Applications -> Accessories -> CHM Viewer

How to install RSS/RDF/Atom Newsreader (RSSOwl)

su -c 'tar zxvf rssowl_1_2_3_linux_bin.tar.gz -C /opt/'
su -c 'chown -R root:root /opt/rssowl_1_2_3_linux_bin/'
su -c 'gedit /usr/bin/runRSSOwl.sh'
  • Insert the following lines
export MOZILLA_FIVE_HOME=/usr/lib/mozilla-firefox
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${MOZILLA_FIVE_HOME}:${LD_LIBRARY_PATH}
cd /opt/rssowl_1_2_3_linux_bin/
./run.sh
  • Save the edited file
su -c 'chmod +x /usr/bin/runRSSOwl.sh'
su -c 'gedit /usr/share/applications/RSSOwl.desktop'
  • Create a desktop file
[Desktop Entry]
Name=RSSOwl
Comment=RSSOwl
Exec=runRSSOwl.sh
Icon=/opt/rssowl_1_2_3_linux_bin/rssowl.xpm
Terminal=false
Type=Application
Categories=Application;Network;
  • Save the edited filed
  • Applications -> Internet -> RSSOwl

How to install Web Authoring System (bluefish)

su -c 'yum -y install bluefish'
  • Applications --> Programming --> Bluefish Editor

How to install KDE Web Development Environment (quanta plus)

su -c 'yum -y install kdewebdev'
  • Applications -> Programming -> Quanta Plus

How to install Accounting Application (GnuCash)

su -c 'yum -y install gnucash'
  • Applications -> Office -> GnuCash

How to install Partition Editor (GParted)

su -c 'yum install gparted'
  • Applications -> System Tools -> GParted

How to install Firewall (Firestarter)

su -c 'yum install firestarter'
  • Applications -> System Tools -> Firestarter

How to install Firewall (Fedora Firewall)

su -c 'yum install system-config-firewall'
  • System -> Administration - Firewall

How to configure SELinux (Fedora SELinux)

su -c 'yum install system-config-selinux'
  • Applications -> System Tools -> SELinux Management

How to install network traffic analyzer (Wireshark)

su -c 'yum install wireshark wireshark-gnome'
  • Applications -> Internet -> Wireshark

How to install Desktop Publishing Application (Scribus)

su -c 'yum install scribus'
  • Applications -> Office -> Scribus

How to install Desktop Applets (gDesklets)

su -c 'yum install gdesklets'

How to install Basic Compilers (gcc)

su -c 'yum install gcc gcc-c++'

How to set up a Development Environment

  • Add development repo
su -c 'gedit /etc/yum.repos.d/fedora-devel.repo'
  • Add the following lines to the new file
[development]
name=Fedora - Development
#baseurl=http://download.fedora.redhat.com/pub/fedora/linux/development/$basearch/os/
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=rawhide&arch=$basearch
enabled=1
gpgcheck=0
  • Save the edited file
su -c 'yum groupinstall "Development Tools"'

How to install an Integrated Development Environment (Anjuta)

su -c 'yum install anjuta
  • Applications -> Programming -> Anjuta IDE

How to install a 3D modeling tool (Blender 3D)

su -c 'yum install blender'
  • Applications -> Graphics -> Blender 3D modeller

How to install a game Frozen-Bubble

su -c 'yum install frozen-bubble

How to install virtual planetarium (Stellarium)

su -c 'yum install stellarium'
  • Applications -> Graphics -> Stellarium nightsky renderer

How to install the KDE Edutainment applications

su -c 'yum install kdeedu'
  • Applications -> Edutainment -> ...

Other Desktop Environments

  • Fedora generally comes with Gnome to install another desktop environment look below.

How to install KDE

su -c 'yum groupinstall kde'
  • Log Out
  • In sessions choose KDE
  • Log in

How to install XFCE

su -c 'yum groupinstall xfce 
  • Log out
  • In sessions choose xfce
  • Log in

Commercial Applications

How to install Windows 9x/ME/2000/XP (Win4Lin)

How to install Windows Applications (CrossOver Office)

How to install Windows Games (Cedega)

Networking

How to configure VPN client (PPTP)

Install PPTP Config

su -c 'yum install pptp'
Configure PPTP Config

Launch it beneath Internet, then input the following fields as described:

Server Tab:

  • Name - short description of this connection
  • Server - dns server name or ip address of the target PPTP server
  • Domain - domain name if using Windows or Active Directory authentication
  • Username - simply your username to login with
  • Password - the password to use with the username above

Routing Tab: For Routing Style select 'Client to LAN'. Then click Edit Network Routes then add the target network in the following format "192.168.0.0/24' for all IP Addresses in the block 192.168.0.*. Next type a short name for this network route and click Add.


DNS Tab: Checking Automatic is recommended, if this doesn't work however you can specify DNS Servers in the Server box. Also input something like "search mycompany.com" in the Options field which will make host name resolution simpler.

Encryption & Misc Tab: Defaults here should be good, but if you are troubleshooting you can uncheck everything.

Finally click Add then Start

How to configure Google Talk

How to activate/deactivate network connections

  • Read #General Notes
  • Desktop -> System Settings -> Network
  • Devices Tab
  • Activate/Deactivate

How to configure network connections

How to change computer name

hostname your_desired_computer_name

How to change computer descriptions

su -c 'cp /etc/samba/smb.conf /etc/samba/smb.conf_backup'
su -c 'gedit /etc/samba/smb.conf'
  • Find this line
...
server string = Samba Server
...
  • Replace with the following line
  server string = new_computer_descriptions
  • Save the edited file, then check for errors and restart
testparm
su -c '/etc/init.d/smb restart'
  • or
testparm
su -c 'service smb restart'

How to change computer Domain/Workgroup

su -c 'cp /etc/samba/smb.conf /etc/samba/smb.conf_backup'
su -c 'gedit /etc/samba/smb.conf'
  • Find this line
...
workgroup = MSHOME
...
  • Replace with the following line
  workgroup = new_domain_or_workgroup
  • Save the edited file
testparm
su -c '/etc/init.d/smb restart'

How to assign Hostname to local machine with dynamic IP using free DynDNS service

e.g. Assumed that internet connections have been configured properly
Register free Dynamic DNS at https://www.dyndns.org
Automatically refresh IP in DynDNS Database/DNS every hour
* * * * * means minute hour date month year
su -c 'yum install ipcheck'
su -c 'gedit /root/dyndns_update.sh'
  • Insert the following lines into the new file
USERNAME=myusername
PASSWORD=mypassword
HOSTNAME=myhostname.dyndns.org
cd ~/
if [ -f /root/ipcheck.dat ]; then
ipcheck -r checkip.dyndns.org:8245 $USERNAME $PASSWORD $HOSTNAME
else
ipcheck --makedat -r checkip.dyndns.org:8245 $USERNAME $PASSWORD $HOSTNAME
fi
  • Save the edited file
su -c 'chmod 700 ~/dyndns_update.sh'
su -c 'sh ~//dyndns_update.sh'
su -c 'export EDITOR=gedit && crontab -e'
  • Append the following line at the end of file
00 * * * * sh /home/YourUsername/dyndns_update.sh
  • Save the edited file

How to share folders the easy way

Right click on folder -> Share folder
Shared folder -> Share with: Select "SMB"
Share properties -> Name: Specify the share name

How to browse network computers

e.g. Assumed that network connections have been configured properly
If computers or network folders could not be found, try access them directly
Read #How to access network folders without mounting
  • Places -> Network Servers

How to access network folders without mounting

e.g. Assumed that network connections have been configured properly
Network computer's IP: 192.168.0.1
Shared folder's name: linux
  • Applications -> Run Application...
  • Run Application
smb://192.168.0.1/linux

How to mount/unmount network folders manually, and allow all users to read

e.g. Assumed that network connections have been configured properly
Network computer's IP: 192.168.0.1
Network computer's Username: myusername
Network computer's Password: mypassword
Shared folder's name: linux
Local mount folder: /media/sharename
  • To mount network folder
su -c 'mkdir /media/sharename'
su -c 'mount //192.168.0.1/linux /media/sharename/ -o username=myusername,password=mypassword'
  • To unmount network folder
su -c 'umount /media/sharename/'

How to mount/unmount network folders manually, and allow all users to read/write

e.g. Assumed that network connections have been configured properly
Network computer's IP: 192.168.0.1
Network computer's Username: myusername
Network computer's Password: mypassword
Shared folder's name: linux
Local mount folder: /media/sharename
  • To mount network folder
su -c 'mkdir /media/sharename'
su -c 'mount //192.168.0.1/linux /media/sharename/ -o username=myusername,password=mypassword,dmask=777,fmask=777'
  • To unmount network folder
su -c 'umount /media/sharename/'

How to mount network folders on boot-up, and allow all users to read

e.g. Assumed that network connections have been configured properly
Network computer's IP: 192.168.0.1
Network computer's Username: myusername
Network computer's Password: mypassword
Shared folder's name: linux
Local mount folder: /media/sharename
su -c 'mkdir /media/sharename'
su -c 'gedit ~/.smbcredentials'
  • Insert the following lines into the new file
username=myusername
password=mypassword
  • Save the edited file
chmod 700 ~/.smbcredentials
su -c 'cp /etc/fstab /etc/fstab_backup'
su -c 'gedit /etc/fstab'
  • Append the following line at the end of file
//192.168.0.1/linux    /media/sharename cifs  credentials=/home/yourusername/.smbcredentials    0    0

How to mount network folders on boot-up, and allow all users to read/write

e.g. Assumed that network connections have been configured properly
Network computer's IP: 192.168.0.1
Network computer's Username: myusername
Network computer's Password: mypassword
Shared folder's name: linux
Local mount folder: /media/sharename
su -c 'mkdir /media/sharename'
su -c 'gedit ~/.smbcredentials'
  • Insert the following lines into the new file
username=myusername
password=mypassword
  • Save the edited file
chmod 700 ~/.smbcredentials
su -c 'cp /etc/fstab /etc/fstab_backup'
su -c 'gedit /etc/fstab'
  • Append the following line at the end of file
//192.168.0.1/linux    /media/sharename cifs  credentials=/home/your_username/.smbcredentials,dmask=0777,fmask=0777  0    0


Remote Desktop

How to configure remote desktop (not secure)

Warning! Remote Desktop will only work if there's a GNOME login session
Leaving computer with an unattended GNOME login session is not secure
Use (System -> Lock Screen) and off the monitor when computer is left unattended
  • Desktop -> Preferences -> Remote Desktop
  • Remote Desktop Preferences
Sharing ->
Allow other users to view your desktop (Checked)
Allow other users to control your desktop (Checked)
Security ->
Ask you for confirmation (Un-Checked)
Require the user to enter this password: (Checked)
Password: Specify the password

How to connect into remote Fedora desktop

e.g. Assumed that remote Fedora machine have configured Remote Desktop
Read #How to configure remote desktop (not secure)
Remote Fedora machine: 192.168.0.1
vncviewer -fullscreen 192.168.0.1:0
  • To quit vncviewer
Press 'F8' -> Quit viewer

Remote conection Script by fedorajim

Open a teminal window and switch to root.

su -c 'gedit /usr/local/bin/remote2someone'

Add the following text to the text editor

#!/bin/bash
# Written by fedorajim
# enter the IP address ofthe remote PC
IPADDRESS="$(zenity --entry --title "Enter IP Address" --text "Enter the IP Address of the remore PC:")"
echo $IPADDRESS
#Enter the username you aregoing to login with
UserName="$(zenity --entry --title "Enter User Name" --text "Enter the User Name to connect with:")"
echo $UserName
# opens a new terminal window and connects to remote PC
function ssh_Remote_PC
{
gnome-terminal -x ssh -L 5911:$IPADDRESS:5901 $UserName@$IPADDRESS
}
function View_Remote_PC
{
gnome-terminal -x vncviewer localhost:11
}
#################################################
selection=
until [ "$selection" = "0" ]; do
echo ""
echo "######################"
echo "1 - Make Remote Connection"
echo "2 - display Remote Desktop"
echo "0 - exit program"
echo ""
echo -n "Enter selection: "
read selection
echo ""
#####################
# Commands executed #
#####################
case $selection in
1 ) $(ssh_Remote_PC) ;;
2 ) $(View_Remote_PC) ;;
0 ) exit ;;
* ) echo "Please enter 1, 2 or 0"
esac
done

Click save and close the text editor. Right click the desktop an choose create launcher add the following to the Create Launcher dialog

  • Name: remote2someone
  • Comment: ssh remote connection
  • Command: /usr/local/bin/remote2someone
  • Type: application
  • Run in Terminal: Checked
  • Icon: click the Icon button and choose a icon


Click save.

How to connect into remote Fedora desktop via Windows machine

e.g. Assumed that remote Fedora machine have configured Remote Desktop
Read #How to configure remote desktop (not secure)
Remote Fedora machine: 192.168.0.1
  • Download VNC Viewer: Here

Security

What are the basic things I need to know about securing my Fedora

  • Read #General Notes
  • Ensure hard drive is first in BIOS boot-up sequence
    • To prevent trespassers from using Linux Installation CD which allows them to gain root user access
    • To prevent trespassers from using Linux Live CD (e.g. Fedora/KNOPPIX/MEPIS) which allows them to destroy/browse/share the entire hard drive
    • To prevent trespassers from installing another Operating System
  • Ensure a password is set for BIOS
    • To prevent trespassers from changing the BIOS boot-up sequence
  • Ensure computer is located at a secured place
    • To prevent trespassers from removing computer's hard drive which allows them to destroy/browse/share the entire hard drive from a different computer
    • To prevent trespassers from removing computer's on-board battery which resets the BIOS password
  • Ensure passwords used on the system cannot be easily guessed
    • To prevent trespassers from cracking password file using brute force attacks (e.g. John the Ripper)
    • Create password with minimum length of 8 characters
    • Create password with mixture of characters/numbers, and upper/lower case
  • Ensure interactive editing control for GRUB menu is disabled
  • Ensure history listing is disabled in Console mode
  • Ensure Ctrl+Alt+Del is disabled in Console mode
  • Ensure interactive option is set for remove, copy and move of files/folders in Console mode
  • For day to day usage, login as a normal user
  • Disable root user account, use "sudo" instead
    • To reduce the amount of time spent with root privileges, and thus the risk of inadvertently executing a command as root
    • "sudo" provides a more useful audit trail (/var/log/auth.log)
    • Read #How to disable root user account
  • Install a Firewall
  • Perform vulnerability test

How to disable all interactive editing control for GRUB menu

Make sure you backup the files

grub
grub> md5crypt
Password: ****** (Fedora)
Encrypted: $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (encrypted password)
grub> quit
su -c 'cp /boot/grub/menu.lst /boot/grub/menu.lst_backup'
su -c 'gedit /boot/grub/menu.lst'
  • Find this section
...
## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret
...
  • Add the following line below it
password --md5 $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (encrypted password above)
  • Find this section
...
title Fedora, kernel 2.6.10-5-386 (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda2 ro single
initrd /boot/initrd.img-2.6.10-5-386
savedefault
boot
...
  • Replace with the following lines
#title  Fedora, kernel 2.6.10-5-386 (recovery mode)
#root (hd0,1)
#kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda2 ro single
#initrd /boot/initrd.img-2.6.10-5-386
#savedefault
#boot
  • Save the edited file

How to disable history listing in Console mode

rm -f $HOME/.bash_history
touch $HOME/.bash_history
chmod 000 $HOME/.bash_history

How to disable Ctrl+Alt+Del from restarting computer in Console mode

su -c 'cp /etc/inittab /etc/inittab_backup'
su -c 'gedit /etc/inittab'
  • Find this line
...
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
...
  • Replace with the following line
#ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
  • Save the edited file
su -c 'telinit q'

How to enable prompt before removal/overwritten of files/folders in Console mode

gedit /someuser/.bashrc
  • Find this line
#User specific aliases and functions
  • Add the following line below it
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
  • Save the edited file


SELinux (with references)

  • One of the biggest issues that new users have relates to SELinux. Here are a few links to help fix the situation with one fail safe technique that automatically builds an approval.
  • One way to modify SELinux is to use system-config-securitylevel. Install it with the following command.
su -c 'yum install system-config-securitylevel]
  • The failsafe way which fixes most issues is to use audit2allow by scanning your logs and creating a policy to allow those denials. Some light reading as well can be found with the Red Hat SELinux Guide.
  • Note: Make sure you relabel all your files prior to doing this. That may fix the problem. To relabel your files go to system-config-securitylevel and there will be a choice to relabel on next reboot. Tick that box and then restart. The other option is to run the following commands.
touch /.autorelabel
reboot
  • The other option is to try and fix the files on a live system. You can attempt this running the following command. This may make the system unstable and the reboot method is preferred and recommended.
fixfiles relabel
  • Switch to root
su --login
  • Make sure you are in your SELinux Source directory
cd $SELINUX_SRC/
  • Make sure you backup the existing local.te file
cp domains/misc/local.te domains/unused/local.te.backup
  • Set Audit2Allow to analyse your log file and generate a policy.
audit2allow -i /var/log/messages -o ./local.te
  • View the files
cat local.te
  • The output may look like this. Make sure there are no double entries and make sure that they look reasonable and correct.
allow syslogd_t bin_t:dir search;
allow syslogd_t bin_t:file { execute execute_no_trans getattr \
read };
allow syslogd_t bin_t:lnk_file read;
allow syslogd_t etc_runtime_t:file { getattr read };
allow syslogd_t proc_kmsg_t:file write;
allow syslogd_t proc_t:file { getattr read };
  • When you are happy install the policy
semodule -i local.te
  • Do the action that you were doing to generate the error and verify that it has been rectified.

Rescue Mode

How to use Fedora Installation CD, to gain root user access

  • Read #General Notes
  • Insert Fedora CD #1 into your CD-ROM and boot from it
linux rescue

How to change root user/main user password if forgotten

# passwd root
  • To change main user password
# passwd system_main_username

How to change GRUB menu password if forgotten

grub
grub> md5crypt
Password: ****** (Fedora)
Encrypted: $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (encrypted password)
grub> quit
su -c 'cp /boot/grub/menu.lst /boot/grub/menu.lst_backup'
su -c 'gedit /boot/grub/menu.lst'
  • Find this line
...
password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
...
  • Replace with the following line
password --md5 $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (encrypted password above)
  • Save the edited file

How to restore GRUB menu after Windows installation

e.g. Assumed that /dev/hda is the location of /boot partition
# su -c /sbin/grub-install /dev/hda'

How to add Windows entry into GRUB menu

e.g. Assumed that /dev/hda1 is the location of Windows partition
su -c 'cp /boot/grub/menu.lst /boot/grub/menu.lst_backup'
su -c 'gedit /boot/grub/menu.lst'
  • Append the following lines at the end of file
title  Microsoft Windows
root (hd0,0)
savedefault
makeactive
chainloader +1
  • Save the edited file

How to read Linux partitions (ext2, ext3) in Windows machine

OR

Tips & Tricks

How to add extra Wallpapers, Icons and Themes

wget -c http://easylinux.info/uploads/backgrounds.tar.gz
su -c 'tar zxvf backgrounds.tar.gz -C /usr/share'
rm -f backgrounds.tar.gz
  • Check weather you have file backgrounds.xml in your .gnome/ directory
ls $HOME/.gnome2/ | grep "backgrounds.xml"
  • If this line printed out "backgrounds.xml" then run
cp --preserve=ownership $USER_HOME/.gnome2/backgrounds.xml $USER_HOME/.gnome2/backgrounds.xml_backup
sed -n -e '1,3p' $USER_HOME/.gnome2/backgrounds.xml_backup > $USER_HOME/.gnome2/backgrounds.xml
cat /usr/share/backgrounds/frog.xml >> $USER_HOME/.gnome2/backgrounds.xml
sed -n -e '4,$p' $USER_HOME/.gnome2/backgrounds.xml_backup >> $USER_HOME/.gnome2/backgrounds.xml
  • ELSE run
su -c 'cp /usr/share/backgrounds/backgrounds.xml $USER_HOME/.gnome2/backgrounds.xml'
su -c 'chmod 777 $USER_HOME/.gnome2/backgrounds.xml'


  • To add extra Icons and Themes run
wget -c http://easylinux.info/uploads/icons.tar.gz
tar zxvf icons.tar.gz -C $USER_HOME
rm -f icons.tar.gz
wget -c http://easylinux.info/uploads/themes.tar.gz
tar zxvf themes.tar.gz -C $USER_HOME
rm -f themes.tar.gz


  • Try changing your background, and look in Applications -> Preferences -> Themes (Theme details)

How to add extra Themes (Gnome-themes-extras)

  • Fedora 9 now come swith a new package called gnome-themes-extras install it by doing:
su -c 'yum install gnome-themes-extras'
  • To change the theme go to System -> Preferences -> Look and Feel -> Appearance you will then be able to change the theme.

How to add the Open Terminal to the R-Click

su -c 'yum install nautilus-open-terminal'
  • Right Click the Desktop -> Open Terminal

How to get a shortcut to Root Terminal

su -c 'yum --enablerepo=dries install gksu'
  • Applications -> System Tools -> Root Terminal

How to enable the "Switch User" button on the GNOME screensaver

  • To do this to just for one user
gconftool-2 --type bool --set /apps/gnome-screensaver/user_switch_enabled true
  • To do this for every user
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type bool --set /apps/gnome-screensaver/user_switch_enabled true

How to restart GNOME without rebooting computer

Press 'Ctrl + Alt + Backspace'

or
su -c '/usr/sbin/gdm-restart'

How to turn on Num Lock on GNOME startup

su -c 'yum install numlockx
su -c 'cp /etc/X11/gdm/Init/Default /etc/X11/gdm/Init/Default_backup'
su -c 'gedit /etc/X11/gdm/Init/Default'
  • Find this line (the last line)
...
exit 0
  • Add the following lines above it
if [ -x /usr/bin/numlockx ]; then
/usr/bin/numlockx on
fi

How to switch to Console mode in GNOME

Press 'Ctrl + Alt + F1' (F2 - F6)
  • To switch between consles in Console mode
Press 'Alt + F1' (F2 - F6)
  • To switch back to GNOME mode
Press 'Alt + F7'

How to disable Ctrl+Alt+Backspace from restarting X in GNOME

su -c 'cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup'
su -c 'gedit /etc/X11/xorg.conf'
  • Append the following lines at the end of file
Section "ServerFlags"
Option "DontZap" "yes"
EndSection

How to enable Ctrl+Alt+Del to open System Monitor in GNOME

gconftool-2 -t str --set /apps/metacity/global_keybindings/run_command_9 "Delete"
gconftool-2 -t str --set /apps/metacity/keybinding_commands/command_9 "gnome-system-monitor"

How to refresh GNOME desktop

killall nautilus

How to refresh GNOME panel

killall gnome-panel

How bypass Keyring's Password

  • Install Pam keyring
su -c 'yum install pam_keyring'
  • Create the script which will automatically pass the password to keyring
gedit ~/.key.sh
  • Add the next section and change the word password to your password
 #! /bin/bash
echo password | /usr/libexec/pam-keyring-tool --unlock --keyring=default -s
  • Make sure it is executible
chmod +x ~/.key.sh
  • Add the script to the startup sequence so that the script is run on boot.
  • Go through the menu listed below
System -> Preferences -> Personal -> Sessions
  • Click on the startup tab
  • Click the add button
  • Enter the following details
Name: Keyring Script
Command:~/.key.sh
Comment: My automatic unlock script
  • To enable it straight away run the following command.
~/.key.sh

How to open each folder in the same window in Nautilus

  • Read #General Notes
  • Applications -> System Tools -> Configuration Editor
  • Configuration Editor
/ -> apps -> nautilus -> preferences -> always_use_browser (Checked)

How to enable autosave in Gedit and disable creation of some_file~ files

  • Read #General Notes
  • Applications -> System Tools -> Configuration Editor
  • Configuration Editor
/ -> apps -> gedit-2 -> preferences -> editor -> save -> create_backup_copy (Unchecked)
/ -> apps -> gedit-2 -> preferences -> editor -> save -> auto_save (Checked)

How to show all hidden files/folders in Nautilus

  • Read #General Notes
  • Places -> Home Folder
  • To temporary show all hidden files/folders in Nautilus
Press 'Ctrl + H'
  • To permanently show all hidden files/folders in Nautilus
Edit Menu -> Preferences
Views Tab -> Default View -> Show hidden and backup files (Checked)

How to browse files/folders as root user in Nautilus

su -c 'yum install gksu'
  • To install File Browser (Root)
su -c 'gedit /usr/share/applications/Nautilus-root.desktop'
    • Insert the following lines into the new file
[Desktop Entry]
Name=File Browser (Root)
Comment=Browse the filesystem with the file manager
Exec=gksu "nautilus --browser ."
Icon=file-manager
Terminal=false
Type=Application
Categories=Application;System;
    • Save the edited file
  • To browse files/folders as root user in Nautilus
    • Applications -> System Tools -> File Browser (Root)

How to show Desktop Icons (Computer, Home, Trash)

  • Read #General Notes
  • Applications -> System Tools -> Configuration Editor
  • Configuration Editor
/ -> apps -> nautilus -> desktop ->
computer_icon_visible (Checked)
home_icon_visible (Checked)
trash_icon_visible (Checked)

How to change default file type "Open with" program

Right click on file -> Properties 
Open With Tab -> Add
Select "Open with" program
Select "Open with" program (Checked)

How to change preferred email client to Mozilla Thunderbird

Mail Reader Tab -> Default Mail Reader -> Command: mozilla-thunderbird %s

How to open files as root user via right click

gedit $HOME/.gnome2/nautilus-scripts/Open\ as\ root
  • Insert the following lines into the new file
for uri in $NAUTILUS_SCRIPT_SELECTED_URIS; do
gnome-"gnome-open $uri" &
done
  • Save the edited file
chmod +x $HOME/.gnome2/nautilus-scripts/Open\ as\ root
Right click on file -> Scripts -> Open as root

How to disable beep sound in Terminal mode

  • Read #General Notes
  • Applications -> System Tools -> Terminal
  • Terminal
Edit Menu -> Current Profile...
General Tab -> General -> Terminal bell (Un-Checked)

How to install/uninstall .rpm files

su -c 'rpm -i package_file.rpm'
  • To uninstall .rpm file
su -c 'rpm -e package_name'

How to rename all files in directory at once

  • Read #General Notes
  • To install "mvb" file name renamer
  • Best done as root
wget -c http://easylinux.info/uploads/mvb_1.6.tgz
tar zxvf mvb_1.6.tgz -C /usr/share/
chown -R root:root /usr/share/mvb_1.6/
ln -fs /usr/share/mvb_1.6/mvb /usr/bin/mvb
  • To rename all files in directory at once
mvb NEW_NAME

How to manipulate all image files in directory at once

su -c 'yum install ImageMagick'
wget -c http://easylinux.info/uploads/bbips.0.3.2.sh
su -c 'cp bbips.0.3.2.sh /usr/bin/bbips'
su -c 'chmod 755 /usr/bin/bbips'
  • To manipulate all image files in directory at once
bbips

How to set System-wide Environment Variables

su -c 'cp /etc/bash.bashrc /etc/bash.bashrc_backup'
su -c 'gedit /etc/bash.bashrc'
  • Append the System-wide Environment Variables at the end of file
  • Save the edited file

How to save "man" outputs into files

man command | col -b > file.txt

How to show GRUB menu on boot-up

su -c 'cp /boot/grub/menu.lst /boot/grub/menu.lst_backup'
su -c 'gedit /boot/grub/menu.lst'

  • Find this line
...
hiddenmenu
...
  • Replace with the following line
#hiddenmenu
  • Save the edited file

How to change the timeout seconds for GRUB menu on boot-up

su -c 'cp /boot/grub/menu.lst /boot/grub/menu.lst_backup'
su -c 'gedit /boot/grub/menu.lst'
  • Find this line
...
timeout 3
...
  • Replace with the following line
timeout     X_seconds
  • Save the edited file

How to change default Operating System boot-up for GRUB menu

su -c 'cp /boot/grub/menu.lst /boot/grub/menu.lst_backup'
su -c 'gedit /boot/grub/menu.lst'
  • Find this line
...
default 0
...
  • Replace with the following line
default     X_sequence
  • Save the edited file

How to display Splash Image for GRUB menu on boot-up

e.g. Assumed that hd0,1 is the location of Fedora boot partition
wget -c http://easylinux.info/uploads/fedora.xpm.gz
su -c 'chmod 644 fedora.xpm.gz'
su -c 'mkdir /boot/grub/images'
su -c 'cp fedora.xpm.gz /boot/grub/images/'
su -c 'cp /boot/grub/menu.lst /boot/grub/menu.lst_backup'
su -c 'gedit /boot/grub/menu.lst'
  • Find this section
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.
...
  • Add the following line below it
splashimage (hd0,1)/boot/grub/images/fedora.xpm.gz
  • Save the edited file

How to convert Wallpaper to Splash Image for GRUB menu

e.g. Assumed that wallpaper.png is the Wallpaper to be converted to Splash Image
splashimage.xpm.gz is the Splash Image for GRUB menu
convert -resize 640x480 -colors 14 wallpaper.png splashimage.xpm && gzip splashimage.xpm

How to temporary skip boot-up services

Press 'Ctrl + C'

How to permanently disable/enable boot-up services

How to clean /tmp/ folder contents on shutdown

su -c 'cp /etc/init.d/sysklogd /etc/init.d/sysklogd_backup'
su -c 'gedit /etc/init.d/sysklogd'
  • Find this section
...
stop)
log_begin_msg "Stopping system log daemon..."
start-stop-daemon --stop --quiet --oknodo --exec $binpath --pidfile $pidfile
log_end_msg $?
...
  • Add the following line below it
  rm -fr /tmp/* /tmp/.??*
  • Save the edited file

How to scroll up and down to view previous outputs in Console mode

Press 'Shift + Page Up'
  • To scroll down to view previously outputs
Press 'Shift + Page Down'

How to forcefully empty Trash in GNOME

rm -fr $HOME/.Trash/

How to remove duplicate menu/menu items in GNOME

rm -f $HOME/.config/menus/applications.menu


Open Terminal Here in Nautilus

gedit ~/.gnome2/nautilus-scripts/"Open Terminal Here"

add the following text

#!/usr/bin/perl -w
use strict;
$_ = $ENV{'NAUTILUS_SCRIPT_CURRENT_URI'};
if ($_ and m#^file:///#) {
s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;
s#^file://##;
exec "gnome-terminal --working-directory='$_'";
}
# Added 2003-12-08 Dexter Ang
if ($_ == "x-nautilus-desktop:///") {
$_ = $ENV{'HOME'};
$_ = $_.'/Desktop';
exec "gnome-terminal --working-directory='$_'";
}

Save and close Gedit

Right click the desktop choose Scripts then "Open Terminal Here"


Open Root Terminal Here in Naultilus

gedit ~/.gnome2/nautilus-scripts/"Open Root Terminal Here"

Add the following

#!/bin/sh
cd $NAUTILUS_SCRIPT_CURRENT_URI
sudo gnome-terminal


Save and close Gedit

Right click the desktop choose Scripts then "Open Terminal Here"

Servers

File Sharing (Samba Server)

How to install Samba Server for files/folders sharing service

  • Use Desktop -> System Settings -> Add/Remove Applications
or
su -c 'yum -y install samba'
su -c 'yum -y install samba-client'
su -c 'yum -y install system-config-samba'
  • To enable file sharing on boot
su -c 'chkconfig smb on'


  • Desktop -> System Settings -> Server Settings -> Samba

How to add/edit/delete network users

  • Use *Desktop -> System Settings -> Server Settings -> Samba
or
su -c 'smbpasswd -a system_username'
su -c 'gedit /etc/samba/smbusers'
    • Insert the following line into the new file
system_username = "network username"
    • Save the edited file
  • To edit network user
su -c 'smbpasswd -a system_username'
  • To delete network user
su -c 'smbpasswd -x system_username'

How to share home folders with read/write permissions (Authentication=Yes)

su -c 'cp /etc/samba/smb.conf /etc/samba/smb.conf_backup'
su -c 'gedit /etc/samba/smb.conf'
  • Find this line
...
; security = user
...
  • Replace with the following lines
  security = user
username map = /etc/samba/smbusers
testparm
su -c '/etc/init.d/smb restart'

How to share home folders with read only permission (Authentication=Yes)

su -c 'cp /etc/samba/smb.conf /etc/samba/smb.conf_backup'
su -c 'gedit /etc/samba/smb.conf'
  • Find this line
...
; security = user
...
  • Replace with the following lines
  security = user
username map = /etc/samba/smbusers
  • Find this line
[homes]
comment = Home Directories
browseable = no
writeable = yes
  • Replace with the following lines
[homes]
comment = Home Directories
browseable = yes
writeable = no
  • Save the edited file
testparm
su -c '/etc/init.d/smb restart'

How to share group folders with read only permission (Authentication=Yes)

su -c 'mkdir /home/group'
su -c 'chmod 777 /home/group/'
su -c 'cp /etc/samba/smb.conf /etc/samba/smb.conf_backup'
su -c 'gedit /etc/samba/smb.conf'
  • Find this line
...
; security = user
...
  • Replace with the following lines
 security = user
username map = /etc/samba/smbusers
  • Append the following lines at the end of file
[Group]
comment = Group Folder
path = /home/group
public = yes
writable = no
valid users = system_username1 system_username2
create mask = 0700
directory mask = 0700
force user = nobody
force group = nogroup

testparm
su -c '/etc/init.d/smb restart'

How to share group folders with read/write permissions (Authentication=Yes)


su -c 'mkdir /home/group'
su -c 'chmod 777 /home/group/'
su -c 'cp /etc/samba/smb.conf /etc/samba/smb.conf_backup'
su -c 'gedit /etc/samba/smb.conf'
  • Find this line
...
; security = user
...
  • Replace with the following lines
  security = user
username map = /etc/samba/smbusers
  • Append the following lines at the end of file
[Group]
comment = Group Folder
path = /home/group
public = yes
writable = yes
valid users = system_username1 system_username2
create mask = 0700
directory mask = 0700
force user = nobody
force group = nogroup
testparm
su -c '/etc/init.d/smb restart'

How to share public folders with read only permission (Authentication=Yes)

su -c 'mkdir /home/public'
su -c 'chmod 777 /home/public/'
su -c 'cp /etc/samba/smb.conf /etc/samba/smb.conf_backup'
su -c 'gedit /etc/samba/smb.conf'
  • Find this line
...
; security = user
...
  • Replace with the following lines
  security = user
username map = /etc/samba/smbusers
  • Append the following lines at the end of file
[public]
comment = Public Folder
path = /home/public
public = yes
writable = no
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup
testparm
su -c '/etc/init.d/smb restart'

How to share public folders with read/write permissions (Authentication=Yes)

su -c 'mkdir /home/public'
su -c 'chmod 777 /home/public/'
su -c 'cp /etc/samba/smb.conf /etc/samba/smb.conf_backup'
su -c 'gedit /etc/samba/smb.conf'
  • Find this line
...
; security = user
...
  • Replace with the following lines
  security = user
username map = /etc/samba/smbusers
  • Append the following lines at the end of file
[public]
comment = Public Folder
path = /home/public
public = yes
writable = yes
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup
testparm
su -c '/etc/init.d/smb restart'

How to share public folders with read only permission (Authentication=No)

su -c 'mkdir /home/public'
su -c 'chmod 777 /home/public/'
su -c 'cp /etc/samba/smb.conf /etc/samba/smb.conf_backup'
su -c 'gedit /etc/samba/smb.conf'
  • Find this line
...
; security = user
...
  • Replace with the following line
  security = share
  • Append the following lines at the end of file
[public]
comment = Public Folder
path = /home/public
public = yes
writable = no
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup
  • Save the edited file
testparm
su -c '/etc/init.d/smb restart'

How to share public folders with read/write permissions (Authentication=No)

su -c 'mkdir /home/public'
su -c 'chmod 777 /home/public/'
su -c 'cp /etc/samba/smb.conf /etc/samba/smb.conf_backup'
su -c 'gedit /etc/samba/smb.conf'
  • Find this line
...
; security = user
...
  • Replace with the following line
  security = share
  • Append the following lines at the end of file
[public]
comment = Public Folder
path = /home/public
public = yes
writable = yes
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup

  • Save the edited file
testparm
su -c '/etc/init.d/smb restart'

World Wide Web Server (apache)

su -c 'yum -y install httpd'
su -c 'yum -y install mod_ssl'
su -c 'yum -y install httpd-manual'
su -c 'yum -y install mod_perl'
su -c 'yum -y install mod_auth_mysql'
su -c 'yum -y install crypto-utils'
su -c 'yum -y install mod_python'
su -c '/etc/init.d/httpd start'

Apache tips

Remove your server's signature
su -c 'cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf_original'
su -c 'gedit /etc/httpd/conf/httpd.conf '
  • find the line "ServerSignature"
  • Change "ServerSignature on" to
 ServerSignature off 
  • Underneath add this line:
ServerTokens ProductOnly
  • Save and close the text editer
  • restart apache
su -c '/etc/rc.d/init.d/httpd restart'
How to map URLs to folders outside /var/www/
su -c 'gedit /etc/httpd/conf.d/alias'
  • Insert the following lines into the new file
Alias /URL-path /location_of_folder/

Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all

  • Save the edited file
su -c '/etc/init.d/httpd restart'
How to change the default port number for Apache HTTP Server
e.g. Assumed that new port number is 78
su -c 'cp /etc/httpd/httpd.conf /etc/httpd/httpd.conf_backup'
su -c 'gedit /etc/httpd/httpd.conf'
  • Find this line
Listen 80
  • Replace with the following line
Listen 78
  • Save the edited file
/etc/init.d/httpd restart

Secure Shell (ssh)

Securing SSH better

How to SSH into remote Fedora machine

e.g. Assumed that remote Fedora machine have installed SSH Server service and firewall allows to connect to it
Remote Fedora machine: 192.168.0.1
ssh username@192.168.0.1

How to copy files/folders from remote Fedora machine into local machine (scp)

e.g. Assumed that remote Fedora machine have installed SSH Server service and firewall allows to connect to it
Remote Fedora machine: 192.168.0.1
Remote files/folders location: /home/username/remotefile.txt
Local machine save location: . (current directory)
scp -r username@192.168.0.1:/home/username/remotefile.txt .

How to copy files/folders from remote Fedora machine into local machine using Nautilus(scp)

e.g. Assumed that remote Fedora machine have installed SSH Server service and firewall allows to connect to it
Remote Fedora machine: 192.168.0.1
Remote files/folders location: /home/username/remotefile.txt
Local machine save location: . (current directory)
  • Open the following window Places -> Connect to Server
  • Add the following details when you have opened the window
Service Type:SSH
Server:192.168.0.1
Port:Leave blank
Folder:/home/username
Username:username
Name to use for connection:Remote Machine's Name
  • You will find the connection under the Places menu

How to copy files/folders from local machine into remote Fedora machine (scp)

e.g. Assumed that remote Fedora machine have installed SSH Server service and firewall allows to connect to it
Local files/folders location: localfile.txt
Remote Fedora machine: 192.168.0.1
Remote Fedora machine save location: /home/username/
scp -r localfile.txt username@192.168.0.1:/home/username/

How to copy files/folders from remote Fedora machine into local machine (rsync)

e.g. Assumed that remote Fedora machine have installed SSH Server service and firewall allows to connect to it
Remote Fedora machine: 192.168.0.1
Remote files/folders location: /home/username/remotefile.txt
Local machine save location: . (current directory)
rsync -v -u -a --delete --rsh=ssh --stats username@192.168.0.1:/home/username/remotefile.txt .

How to copy files/folders from local machine into remote Fedora machine (rsync)

e.g. Assumed that remote Fedora machine have installed SSH Server service and firewall allows to connect to it
Local files/folders location: localfile.txt
Remote Fedora machine: 192.168.0.1
Remote Fedora machine save location: /home/username/
rsync -v -u -a --delete --rsh=ssh --stats localfile.txt username@192.168.0.1:/home/username/

How to SSH into remote Fedora machine via Windows machine

e.g. Assumed that remote Fedora machine have installed SSH Server service and firewall allows to connect to it
  • Download PuTTY: Here

How to copy files/folders from/into remote Fedora machine via Windows machine

e.g. Assumed that remote Fedora machine have installed SSH Server service and firewall allows to connect to it
  • Download WinSCP: Here

File Transfer Server (proftpd)

How to install FTP Server for File Transfer service

su -c 'yum install proftpd'
su -c '/etc/init.d/proftpd start'

How to configure FTP Server to allow anonymous FTP user to read only

su -c 'cp /etc/proftpd.conf /etc/proftpd.conf_backup'
su -c 'gedit /etc/proftpd.conf'
  • Append the following lines at the end of file

User ftp
Group nogroup
UserAlias anonymous ftp
DirFakeUser on ftp
DirFakeGroup on ftp
RequireValidShell off
MaxClients 10
DisplayLogin welcome.msg
DisplayFirstChdir .message


DenyAll



  • Save the edited file
su -c '/etc/init.d/proftpd restart'

How to configure FTP Server to allow anonymous FTP user to read/write

su -c 'cp /etc/proftpd.conf /etc/proftpd.conf_backup'
su -c 'gedit /etc/proftpd.conf'
  • Append the following lines at the end of file

User ftp
Group nogroup
UserAlias anonymous ftp
DirFakeUser on ftp
DirFakeGroup on ftp
RequireValidShell off
MaxClients 10
DisplayLogin welcome.msg
DisplayFirstChdir .message

  • Save the edited file
su -c '/etc/init.d/proftpd restart'

How to map anonymous FTP user to folders outside /home/ftp/

su -c 'cp /etc/proftpd.conf /etc/proftpd.conf_backup'
su -c 'gedit /etc/proftpd.conf'
  • Append the following lines at the end of file

User ftp
Group nogroup
UserAlias anonymous ftp
DirFakeUser on ftp
DirFakeGroup on ftp
RequireValidShell off
MaxClients 10
DisplayLogin welcome.msg
DisplayFirstChdir .message


DenyAll



  • Save the edited file
su -c '/etc/init.d/proftpd restart'

How to change the default port number for FTP Server

e.g. Assumed that new port number is 77
su -c 'cp /etc/proftpd.conf /etc/proftpd.conf_backup'
su -c 'gedit /etc/proftpd.conf'
  • Find this line
Port              21
  • Replace with the following line
Port              77
  • Save the edited file
su -c '/etc/init.d/proftpd restart'

How to ftp into remote Fedora machine via Windows machine

e.g. Assumed that remote Fedora machine have installed FTP Server service
Read #How to install FTP Server for File Transfer service
  • Download FileZilla: Here

File Transfer Server (pure-ftpd)

How to install FTP Server for File Transfer service (pure-ftpd)

su -c 'yum install pure-ftpd'
su -c '/etc/init.d/pure-ftpd start'

Automatically start

chkconfig pure-ftpd on

How to configure FTP Server to allow anonymous FTP user to read only

su -c 'cp /etc/pure-ftpd/pure-ftpd.conf /etc/pure-ftpd/pure-ftpd.conf_backup'
su -c 'gedit /etc/pure-ftpd/pure-ftpd.conf'
  • Find the following line
NoAnonymous                 no
  • Make sure it says no
  • Save the edited file
  • The directory of your Anonymous ftp users will be the same as your ftp user. Usually /var/ftp
  • If you do not have an ftp user you will need to create one.
su -c '/etc/init.d/pure-ftpd restart'

How to configure FTP Server to allow anonymous FTP user to read/write

su -c 'cp /etc/pure-ftpd/pure-ftpd.conf /etc/pure-ftpd/pure-ftpd.conf_backup'
su -c 'gedit /etc/pure-ftpd/pure-ftpd.conf'
  • Change the following lines from
AnonymousCanCreateDirs      no
AnonymousCantUpload yes
  • To
AnonymousCanCreateDirs      yes
AnonymousCantUpload no
  • Save the edited file
su -c '/etc/init.d/pure-ftpd restart'

How to change the default port number for FTP Server

e.g. Assumed that new port number is 77
su -c 'cp /etc/pure-ftpd/pure-ftpd.conf /etc/pure-ftpd/pure-ftpd.conf_backup'
su -c 'gedit /etc/pure-ftpd/pure-ftpd.conf'
  • Find this line
# Bind                      127.0.0.1,21
  • Replace with the following line
Bind                      77
  • Save the edited file
su -c '/etc/init.d/pure-ftpd restart'

How to ftp into remote Fedora machine via Windows machine

e.g. Assumed that remote Fedora machine have installed FTP Server service
Read #How to install FTP Server for File Transfer service
  • Download FileZilla: Here

Virtual Private Network (VPN)

  • For gnome
su -c 'yum install NetworkManager-vpnc'
  • For KDE
su -c 'yum install knetworkmanager-vpnc'
  • Configure your connection using network manager or Knetworkmanager

OR

su -c 'yum install pptp'
  • Configure your vpn as root
pptpconfig

Proxy Server (squid)

  • Read #General Notes
  • Note this will create a transparent proxy. Associated changes will need to be made to your firewall to benefit.
su -c 'yum install squid'
  • Find the following lines and alter them to what is provided. The config line is very big so back it up.
  • Set the port and what type of proxy is required
http_port 3128 transparent
  • Allow cachemgr access
# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager
# Deny requests to unknown ports
http_access deny !Safe_ports
# Deny CONNECT to other than SSL ports
http_access deny CONNECT !SSL_ports
  • Allow the network of 'localhost' and deny the rest
http_access allow localhost
http_access deny all
  • Set the 'local_network' and allow it
acl local_network src 192.168.1.0/24
http_access allow local_network
  • You will need to redirect all outgoing port 80 traffic to be redirected through port 3128 to benefit from the proxy server an example line of my firewall script is listed below as an example.
iptables -t nat -A PREROUTING -p tcp --dport 80 -s 192.168.1.0/24 -d 192.168.1.0/24 -j REDIRECT --to 3128

Outgoing Mail server (sendmail)

  • By default sendmail is installed however if you need to install sendmail
su -c 'yum install sendmail'
  • Edit the following lines changing it to your data
su -c 'gedit /etc/mail/sendmail.mc'
  • Set your local domain
LOCAL_DOMAIN(`mail.your.domain.com)dnl
  • All emails will have yourname@your.domain.com
MASQUERADE_AS(`your.domain.com')dnl
  • If you use procmail.
MAILER(smtp)dnl
MAILER(procmail)dnl
  • Set the type of action sendmail will be
DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl
  • Edit the virtusertable
su -c 'gedit /etc/mail/virtusertable'
  • Add your usernames and email addresses at the bottom in that format.
name@your.domain.com     name
  • Close virtusertable down and sendmail.mc Compile the directory
make -C /etc/mail
  • Set up your aliases adjust the following lines at the bottom
su -c 'gedit /etc/aliases'
# Person who should get root's mail
root: youradminusername
youradminusername: youradminusername
  • Close the file down and run the following command as root. Make sure it comes up on boot
newaliases
chkconfig sendmail on
  • Restart sendmail
su -c '/etc/init.d/sendmail restart'

Mail server (dovecot)

su -c 'yum install dovecot'
  • Make sure it comes up on boot (Run the command as root)
chkconfig dovecot on

POP/IMAP settings

  • Edit the dovecot.conf file
su -c 'gedit /etc/dovecot.conf'
  • Modify the following lines
  • What type of server do you want it will set the options for imap or pop3 If you want pop remove the imap and imaps.
protocols = imap imaps pop3 pop3s
  • Dovecot should listen on the standard ports
listen = [::]
  • Set the mail location. The example below creates in your home directory a mail folder called Maildir
#   mail_location = maildir:~/Maildir
# mail_location = mbox:~/mail:INBOX=/var/mail/%u
# mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n
maildir:~/Maildir

Server Intrusion Prevention (denyhosts)

su -c 'yum install denyhosts'

How to secure your system

  • Backup your original config file
su -c 'cp /etc/denyhosts.conf /etc/denyhosts.conf_backup
  • To change the config to suit your system
su -c 'gedit /etc/denyhosts.conf'
  • Modify the following lines to match what is listed below. Remember to remove the '#' at the beginning of the lines
PURGE_DENY = 4w
BLOCK_SERVICE = ALL
DENY_THRESHOLD_INVALID = 5
DENY_THRESHOLD_VALID = 10
DENY_THRESHOLD_ROOT = 0
DENY_THRESHOLD_RESTRICTED = 1
SYSLOG_REPORT=YES
AGE_RESET_VALID=5d
AGE_RESET_ROOT=25d
SYNC_SERVER = http://xmlrpc.denyhosts.net:9911
SYNC_INTERVAL = 1h
SYNC_UPLOAD = yes
SYNC_DOWNLOAD_RESILIENCY = 5h

Domain Name Service (bind)

su -c 'yum install named'
  • Enable on boot. Run the command as root.
chkconfig named on
  • The easiest method is to follow the following howto from Redhat it is exactly the same as what I used.

How to set up a home DNS server

DHCP Server (dhcpd)

su -c 'yum install dhcpd'
  • Enable on boot. Run this command as root
chkconfig dhcpd on
  • Edit the config file
su -c 'cp /etc/dhcpd.conf /etc/dhcpd.conf_backup'
su -c 'gedit /etc/dhcpd.conf'
  • Adjust your config to have a range issued in between 192.168.1.100 -> 192.168.1.200
  • Note: Remember the curly braces {}
  • If you want to have an ip linked to a print-server named print-server you follow the host section listed below.
  default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
allow bootp;
ddns-update-style ad-hoc;

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.100 192.168.1.200;
host print-server {
hardware ethernet 00:40:c8:04:03:db; #Your specific ethernet hardware
fixed-address 192.168.1.20; #The ip that you want that print server to have always
default-lease-time -1; #the lease time of the ip -1 is forever
}
}
  • A simple host section as an example
 host strikeforce {
hardware ethernet 00:0F:EA:3E:12:58;
fixed-address 192.168.1.150;
}

Internet Time Server (ntpd)

  • Read #General Notes
  • It will have a default list of locations to update your clock on your machine.
su -c 'yum install ntpd'
  • Make sure you it is turned on when you boot. Run the command as root.
chkconfig ntpd on
  • If you would like to link to other servers around the world you will need to add a line in the following layout.
su -c 'gedit /etc/ntp.conf'
server 0.fedora.pool.ntp.org dynamic

Database Server (mysql)

  • Read #General Notes
  • Use Desktop -> System Settings -> Add/Remove Applications
or
su -c 'yum install mysql'
su -c 'yum install mysql-server'
su -c 'yum install php-mysql'
su -c 'yum install MySQL-python'
su -c '/etc/init.d/mysqld start'
mysqladmin -u root password new_db_user_password

How to install MYSQL Control Center

su -c 'yum install mysql-administrator'
  • Applications -> System Tools -> MySQL Administrator

PHP on your Web Server

su -c 'yum install php'
su -c 'yum install php-mysql'
su -c '/etc/init.d/httpd restart'
  • Insert the following line into a new file
su -c 'echo '' > /var/www/html/testphp.php'