bash completion not working on Fedora

I had bash completion installed and after that I had made huge changes to my bashrc and also installed bashstyle. After this the bash-completion stopped working.

I had to spend a lot of time to figure out that the easiest solution was to source the bash-completion again in the end. 🙂

. /etc/bash_completion

Play media files in fedora.

Found here .

Media (DVD, web content, video & audio) playback in Fedora

Note: This howto has been transferred to my blog here. (Instructions for Fedora 7+ can be found here)

Hello,
There have been many complaints about media not working in Fedora – MP3s, DVDs, etc. So, I decided to make this guide to help out – By installing a few packages, you can get the codecs for these media or media formats, and solve the problem.

Before we begin, all of these packages require the livna repo to be installed, so let\’s do that first:

Code:
rpm -Uhv http://rpm.livna.org/livna-release-VERSION.rpm

Remember to replace VERSION with your Fedora release version – eg 5, 6, 7, etc.

General Info

I\’m going to separate the sections of this howto by program name, but I recommend that you install them all as many compliment or depend on each other. If you know what each does individually, then you can install them but please don\’t post about things not playing when all programs aren\’t installed – many provide codecs that will be shared with other programs, allowing them to decode that media, too.

If you want to skip the reading and take the shortcut, installing them all at once, here\’s the commands:

Code:
su -
yum -y remove totem totem-plparser;yum -y install totem-xine totem-xine-plparser rhythmbox mplayerplug-in mplayer mplayer-gui xine-lib-extras-nonfree libdvdcss libdvdread libdvdplay libdvdnav lsdvd libdvbpsi compat-libstdc++-33

DVD playback
Just a few libraries should do it:

Code:
yum -y install libdvdcss libdvdread libdvdplay libdvdnav lsdvd libdvbpsi

totem-xine
totem-xine is a movie player that is based on xine and not gstreamer, and as a result this will let you view DVDs and more types of media from the same interface that the default Fedora Core\’s totem package provides.

Code:
su -
yum remove totem totem-plparser -y;yum install totem-xine totem-xine-plparser rhythmbox xine-lib-extras-nonfree -y

mplayer and mplayer-plugin
mplayer is also a movie player, but the graphical interface is harder to use compared to totem-xine, and there is no support for menus in movies at the moment of writing. That is why I find totem-xine superior, but mplayer does have a web media plugin for Mozilla / Firefox and contains tons of coedcs.

Code:
su -
yum -y install mplayer mplayer-gui mplayerplug-in

w32codecs ** (WMV/WMA playback!) **
Note: This package has been discontinued at ATRPMs but it doesn\’t seem to make a difference on new systems anyways.
w32codecs is plain and simply an assembled pack of Windows codecs. Here\’s how to install it:

Code:

su -
wget http://dl.atrpms.net/all/w32codec-1.0_20050412-13.at.i386.rpm
yum install compat-libstdc++-33 -y
rpm -ihv w32codec-1.0_20050412-13.at.i386.rpm
rm w32codec-1.0_20050412-13.at.i386.rpm

gstreamer and gstreamer-plugins ** (MP3 playback!) **
It\’s always a good idea to install gstreamer, both to enable mp3 playback and also for the various codecs.

Code:
su -
yum install gstreamer gstreamer-plugins gstreamer-plugins-good gstreamer-plugins-bad gstreamer-plugins-ugly

Macromedia Flash Player
Just run this:

Code:
wget http://macromedia.mplug.org/macromedia-i386.repo -O /etc/yum.repos.d/macromedia-i386.repo
yum install flash-plugin

Java & Java web plugin
Please see this howto.

RealPlayer
Please click on the \”Download RPM Package\” link from this page: RealPlayer Linux home
Save that file to your home, and then open up a terminal (Applications > Accessories > Terminal) and type:

Code:
cd ~
su
rpm -Uhv RealPlayer10GOLD.rpm
rm RealPlayer10GOLD.rpm -f
exit
exit

RealPlayer should now be installed, along with it\’s Mozilla helper so you can view media in Firefox.

Enjoy!
Firewing1

colors in bash — script to display all the possible colors.

If you wanted to have colors in the bash output (including the colors in PS1-4), don\’t you keep wondering how the color code would look on the terminal. So, I wrote this small script to show the complete color codes. This is how the output would look:

\"Bash

And here is the script:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash -
#===============================================================================
#
#          FILE:  colors.sh
#
#         USAGE:  ./colors.sh
#
#   DESCRIPTION:  Bash colors
#
#       OPTIONS:  ---
#  REQUIREMENTS:  ---
#          BUGS:  ---
#         NOTES:  ---
#        AUTHOR:  Amit Agarwal (AKA), amit.agarwal@amit-agarwal.co.in
#       COMPANY:  Individual
#       VERSION:  1.0
#       CREATED:  09/21/2009 06:12:07 PM IST
#      REVISION:  ---
#===============================================================================

for c in `seq 0 255`;
do
t=5;
[[ $c -lt 108 ]]&&t=0;
for i in `seq $t 5`;
do
#Display the codes also for easier lookup in terminal
<!--loginview start-->echo $i;${c}<!--loginview end-->
echo -e "<a class="zem_slink" title="Path (computing)" rel="wikipedia" href="http://en.wikipedia.org/wiki/Path_%28computing%29">\\</a>\e[0;48;$i;${c}m|| $i:$c `seq -s+0 $(($COLUMNS/2))|tr -d \'[0-9]\'`\\e[0m";
done;
done

# setup_colors - Adds colors to array CC for global use
# 30 - Black, 31 - Red, 32 - Green, 33 - Yellow, 34 - Blue,
# 35 - Magenta, 36 - Blue/Green, 37 - White,
# 30/42 - Black on Green \'30\\;42\'
<!--loginview start-->function setup_colors(){
declare -a CC;
for i in `seq 0 7`;
do
ii=$(($i+7));
CC[$i]="\\033[1;3${i}m";
CC[$ii]="\\033[0;3${i}m";
done;
CC[15]="\\033[30;42m";
R=$\'\\033[0;00m\';
X=$\'\\033[1;37m\';
export R X;
}
function display_colors(){
for i in $(seq 0 $((${#CC[@]} - 1))); do echo -e "${CC[$i]}[$i]\\n$R"; done
}
\"Reblog
Enhanced by Zemanta