Saturday, May 06, 2006

Problems with mplayer

1. Whenever I play a movie, I get this error:

vo: X11 running at 1280x1024 with depth 24 and 32 bpp (":0.0" => local display)
It seems there is no Xvideo support for your video card available.
Run 'xvinfo' to verify its Xv support and read DOCS/en/video.html#xv!
See 'mplayer -vo help' for other (non-xv) video out drivers. Try -vo x11
Error opening/initializing the selected video_out (-vo) device.

2. xvinfo shows:

X-Video Extension version 2.2
screen #0
no adaptors present

3. Dri, 3D acceleration, drm and all are running fine.

If I change the video output to 'x11' instead of 'xv', video can be played. But the video is lagging under fullscreen. To fixed that, run 'gmplayer -vo x11 -zoom'. However, I read somewhere that if you have to use "-vo x11", it means that the hardware acceleration is not working. Quote from the gentoo forum: ## xv uses hardware accelerated video overlays. x11 is the slowest possible way to do video. ##

4. *** To get xv working I have to insert this line in xorg.conf: *** (IMPORTANT - this is the actual solution to my problem)

Option "VideoOverlay" "on"
## Also, if you have this in xorg.conf, the option should be set to "off"
Option "PseudoColorVisuals" "off"


Tuesday, May 02, 2006

CD-Audio XMMS

Ach, ich bin ein Idiot! I've been trying for ages to get XMMS to play audio CDs, and everytime the program just refused to do anything. Today I just realised that I don't have the cdaudio plugin for xmms. Duh!!!! Emerge xmms-cdaudio and I'm listening to CDs!

Monday, May 01, 2006

Scripts in /etc/init.d/

A useful command to see which scripts are no longer used and can be safely deleted from /etc/init.d and /etc/conf.d

I got this command from the Gentoo Linux Wiki - Rc-update:

for each in /etc/{conf,init}.d/* ; do \

echo -n "$each " ; \
equery belongs -e "$each" | fgrep / || \
echo '!!! ORPHAN !!!' ; \
done

Thursday, April 20, 2006

Black Screen after logout from Fluxbox

I use kdm and frequently (though not every time, almost) when I exit fluxbox into kdm, I get a black screen and the whole system hangs and pressing all sort of buttons (Ctrl-Alt Backspace / F1 / whatever) produces nothing. Apparently the workaround is to add to this file "/usr/kde//share/config/kdm/kdmrc)" this line:
TerminateServer=true

Or for gdm, this line:

AlwaysRestartServer=true

Got this from this website:
http://thinkwiki.org/wiki/Problems_with_fglrx#Hardlock_on_X_logout

Unicode and Locale

Running "locale" shows that my system is using something called POSIX. Changing my system locale to Unicode:
1. Compile NLS UTF8 into the kernel.
2. Check that the locale I want (en_US.UTF-8) is availaibe in "/etc/locales.build".
3. Enter this line
###
LC_ALL="en_US.UTF-8"
###

into this file: /etc/env.d/02locale

- Note that running "locale -a" will show "en_US.utf8" (Note lowercase and absence of hyphen. And I quote the sentences from the Gentoo Forums:

locale -a lists the encoding part of the locale in lower case without any hyphens but these instructions always use UTF-8. The reason is that while glibc understands both forms of the name many other programs don't. The most common example of which is X. So it is best to always use UTF-8 in preference to utf8.

4. Make sure that in /etc/rc.conf the line UNICODE="yes" is uncommented.
5. Run "env-update && source /etc/profile"
6. Sometimes certain error messages may appear when running certain programmes:
a.
Gdk-WARNING **: locale not supported by Xlib (GTK/Gnome app)
b. Qt: Locales not supported on X server
(Qt/KDE app)
- Make sure the current system locale is listed in "
/usr/X11R6/lib/X11/locale/locale.dir"

The Gentoo Forum mentioned this: (But I still don't understand it, therefore have not done anything about it yet)

Where to set the environment variables is the next problem. Ideally every user on the whole system should use the same encoding i.e. UTF-8. However using a locale other than the "C" or "POSIX" locale for root is asking for trouble on Gentoo. The reason is that it can break emerges as the semantics of scripts etc can change.

The Gentoo way to set environment variables is to set it in /etc/env.d. The Desktop Configuration Guide suggests setting the locale there. But this doesn't support setting a different locale for root. Some suggest suggest changing the locale in /etc/profile. It is possible to set the locale differently in /etc/profile for root and other users as is done with the PATH environment variable. Otherwise you can set them in $HOME/.bashrc or $HOME/.xinitrc if you only want the locale set under X.



Wednesday, April 19, 2006

Ipod works under gentoo

Ipod works! Gtkpod and castpodder both work. Remember to "emerge eject" so that the command can be used to eject /mnt/ipod after unmounting.

Did a "chmod 4755 /usr/bin/eject" because normal user cannot eject.

Programmes on Gentoo

Programmes that I've installed on Gentoo so far: (after I've got xorg working)
1. kdm
2. Fluxbox (a must!!)
3. Firefox
4. xmms - for some reason Audio CD cannot be played
5. mplayer - must emerge with use flags: dvd dvdread dts
6. gtkpod
7. Compiling castpodder at the moment - hopefully it'll be ok

Others:
Installed some nice fonts and mouse themes

Gentoo!!

Finally got Gentoo working!! Yippee!

1. Got everything working and kernel booted nicely after half a day staring at Kernel Panic.
Note:
- Need SCSI emulation to get usb drive working
- Need to build in the network card in the kernel. Yes, I know ... Du-uhhh! I missed it during the first few times compiling the kernel.
2. Installed xorg
3. 3D-Acceleration, dri, drm glxgears whatever did NOT work with the radeon module although they did say that it should work with ATI RADEON 9200.
- Took many MANY times of configuring and compiling the kernel before it finally got into my thick skull that the open source driver just did not work.
- Finally installed the ati-driver. Voila... worked beautifully. Yes, I never learn...
- Remember to add :
###
Section "dri"
Mode 066
EndSection
###

so that normal users can use 3D acceleration also.

Saturday, February 18, 2006

Ipod and MP2

Have been wondering for some time why an mp3 file that I have wouldn't play on my Ipod. A quick check with xmms shows that the file is actually MPEG1, Layer 2 aka mp2 file. So encode it back to MPEG1, Layer 3 by using this command:

lame --mp2input --alt-preset extreme filename.mp3 anothername.mp3
- Not too sure about the mp2input command. Couldn't find a tutorial on converting mp2 to mp3 using lame. Saw the --mp2input option by running lame --longhelp. I guess it worked as the file is now playing properly on Ipod.

Encoding MP3s

Software used: lame

command:

lame -h -b 128 --tt "Song Title" --ta"Artist" --ty "Year" --tc "Ripp and encoded by Me" --tg "Genre"audio.wav audio.mp3

## Encoding mp3 at constant bitrate of 128 kbits. To encode mp3 at VBR, use this command:
lame --alt-preset extreme audio.wav audio.mp3

## there are other --al-preset options. See 'lame --help'. Still not really sure if I should encode using VBR or CBR. Haven't read enough. Read one person's view who likes VBR and the next who said that VBR sucks.... go figure. I can't hear the difference. As long as my dear Ipod can play the song.

Ripping CD

##To rip entire CD into wav files:
cdda2wav -D /dev/hdc -B
## The device /dev/???  can be determined by running this command: wodim --devices




## To rip individual tracks, eg: track 1
cdda2wav -D /dev/hdc -t 1

## To rip a range of tracks, eg: track 1 -7
cdda2wav -D /dev/hdc -t 1+7

Haven't figure out how to rip a range of tracks, for example track 1, 3, 7, 9 ...

Saturday, February 11, 2006

AntiVirus for Linux

Paranoia today. So downloaded an antivirus for Linux. There are a few around such as BitDefender and Panda. I downloaded bitdefender. Command line is 'bdc'

Sunday, January 22, 2006

Desktop makeover

Finally did a new makeover for my desktop. Changed the wallpaper and skins for xmms and gkrellm. Installed adesklets!!! Ich bin so ein Dummkopf! To run the desklets:

./nameofdesklets.py NOT python nameofdesklets.py!!!!! To think that I've been making this mistake for the past one year and never realised what was wrong.

Background of kdm login manager

To change the background picture:

Edit: /etc/opt/kde3/share/config/kdm/backgroundrc

Other configuration: /etc/opt/kde3/share/config/kdm/kdmrc

Edit: Damn... I just realised that I've noted this down before., but didn't put the heading there. So edited the previous post and put a nice big heading 'KDM background'.

XNTP

To adjust the clock:

1. Make sure xntp is installed
2. Add the address of the server in /etc/ntp.conf
- Addresses of servers from this website: http://www.pool.ntp.org/zone/
3. As root: $rcxntpd start


Taking Screenshot

I keep forgetting this... the name is ksnapshot!! I kept typing kscreenshot and was cursing away when it refused to work.

Saturday, December 17, 2005

CastPodder

Upgrade to CastPodder 4.0 today but couldn't run it because it needs python-wxGTK 2.6 . Unfortunately SuSE 9.3 doesn't ship with version 2.6. So had to uninstall my existing python packages and install these packages in this order:

wxGTK
wxGTK-compat
wxGTK-gl
python-wxGTK

from this website: http://www.vislab.uq.edu.au/research/accessgrid/software/suse/wxWindows/RPMS

After that my aMule didn't work because it needed the wxGTK version 2.5. Sigh. Trying to see if I can build aMule instead of installing the rpms.

Saturday, October 15, 2005

AMSN

Got AMSN working. Needed an extra module called tls to enable SSl connection...

Was zum Teufel mach' ich da?? Ich muss nächste Woche die verflixte Prüfung machen, und da spiel' ich gerade mit MSN herum.... Ich bin verrückt!!

Saturday, September 24, 2005

Got rid of the annoying beep!

Finally my computer is back! Nearly 2 months for the shop to send the motherboard for RMA and get it back. Sheesh!

Anyway, had a very irritating problem where the darn system speaker would beep every time I hit backspace in the terminal or if I hit the apostrophe key and then backspace. (I'm using international us keyboard layout with deadkeys) The solution is to add this in ~/.inputrc or /etc/inputrc:

set bell-style none

## I added this into ~/.inputrc instead of /etc/inputrc in case anything goes wrong I don't screw up my whole system.

Tuesday, July 26, 2005

Got Ipod and gtkpod working. Found X-Fools on the net. Now getting NVU.