Today I cannot access websites like google, yahoo and lycos with firefox. However when I ping www.google.com, there is 0% packet loss. I did notice though that the website being pinged is www.l.google.com. (notice the extra 'l'?) So I entered this web address in firefox, and I can access google again. Strange, isn't it? The same with yahoo. Address entered is www.yahoo.com, but address being pinged is www.yahoo-ht2.akadns.net. And again, I can use yahoo by entering the second address in firefox.
Thursday, September 07, 2006
Wednesday, September 06, 2006
Eject works only with root
Had a strange problem. Couldn't eject my Ipod. Got this error:
$ eject /mnt/ipod
$ eject: unable to open `/dev/ipod'
The same thing happened with my usb flash drive. I know, some people say that we don't have to eject a flash drive; umount will do. But ejecting a flash drive makes the LED light switch off. I like seeing that... hehe
Anyway, this has never happened before and I don't know why I suddenly cannot eject as a normal user. With root, I get this message:
$ eject -v /mnt/ipod
eject: device name is `/mnt/ipod'
eject: expanded name is `/mnt/ipod'
eject: `/mnt/ipod' is not mounted
eject: `/dev/ipod' can be mounted at `/mnt/ipod'
eject: `/dev/ipod' is not a multipartition device
eject: trying to eject `/dev/ipod' using CD-ROM eject command
eject: CD-ROM eject command failed
eject: trying to eject `/dev/ipod' using SCSI commands
eject: SCSI eject succeeded
I solved the problem temporarily by doing chmod +s /usr/bin/eject
I read this in this bug website:
That's an eject bug because it opens for read-only.
From "strace eject -s /dev/sdb1":
open("/dev/sdb1", O_RDONLY|O_NONBLOCK) = 3
EDIT: I searched through my old posts, and found the post titled 'Ipod Works Under Gentoo' where I have already encountered this problem with eject! Why do I even note down these things if I'm not going to look through them first?!
$ eject /mnt/ipod
$ eject: unable to open `/dev/ipod'
The same thing happened with my usb flash drive. I know, some people say that we don't have to eject a flash drive; umount will do. But ejecting a flash drive makes the LED light switch off. I like seeing that... hehe
Anyway, this has never happened before and I don't know why I suddenly cannot eject as a normal user. With root, I get this message:
$ eject -v /mnt/ipod
eject: device name is `/mnt/ipod'
eject: expanded name is `/mnt/ipod'
eject: `/mnt/ipod' is not mounted
eject: `/dev/ipod' can be mounted at `/mnt/ipod'
eject: `/dev/ipod' is not a multipartition device
eject: trying to eject `/dev/ipod' using CD-ROM eject command
eject: CD-ROM eject command failed
eject: trying to eject `/dev/ipod' using SCSI commands
eject: SCSI eject succeeded
I solved the problem temporarily by doing chmod +s /usr/bin/eject
I read this in this bug website:
That's an eject bug because it opens for read-only.
From "strace eject -s /dev/sdb1":
open("/dev/sdb1", O_RDONLY|O_NONBLOCK) = 3
EDIT: I searched through my old posts, and found the post titled 'Ipod Works Under Gentoo' where I have already encountered this problem with eject! Why do I even note down these things if I'm not going to look through them first?!
Monday, August 21, 2006
Another day ...
This blog is not meant for this., maybe I'll delete this post some day... but I just have to let it out: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARRRRRRRRRRGHHHHHHHHHHHHHHH!!!
Yet another discouraging and disappointing day. *@!! Puh-leasee remind me again why I chose to do this and why the heck am I still doing it?! Yargh!
I think I'll go and have a haircut. Nah, I'm not shaving the head bald, have a punk haircut or anything like that. I'm not that traumatised ... yet. Will just have the fringes and the back part trimmed slightly. Not at all adventurous ... Maybe if someone were to pop out of a bank and hand me a wad of cash, I might have my hair dyed. Hmmm... then again, I think I'll probably take the cash and buy either another set of graphic novels or another ipod! 'Hair' is not on top of my priority list at all!
Yet another discouraging and disappointing day. *@!! Puh-leasee remind me again why I chose to do this and why the heck am I still doing it?! Yargh!
I think I'll go and have a haircut. Nah, I'm not shaving the head bald, have a punk haircut or anything like that. I'm not that traumatised ... yet. Will just have the fringes and the back part trimmed slightly. Not at all adventurous ... Maybe if someone were to pop out of a bank and hand me a wad of cash, I might have my hair dyed. Hmmm... then again, I think I'll probably take the cash and buy either another set of graphic novels or another ipod! 'Hair' is not on top of my priority list at all!
Sunday, August 20, 2006
Kernel compile and kernel sources
I didn't know that everytime the package gentoo-sources is updated, the symlink of /usr/src/linux still points to the first original sources, from which the kernel was compiled. Therefore, although I compile a new kernel everytime there is an updated version of the source, it is actually not compiled using the updated version but rather the old version. I found this out while trying to compile the new ATI-drivers and found that there were errors because they were using the old kernel source. Am I making any sense? Ah well, as long as I know what I'm saying... Anyway, I got this from the Gentoo Linux Documentation regarding kernel upgrade:
Three ways in order to make the /usr/src/linux symbolic link point to the sources of the kernel you are running.
1. Portage can update the symlink automatically when you emerge new kernel sources. All you have to do is add the symlink flag to the USE variable in /etc/make.conf
(Add the symlink keyword)
USE="symlink x86 3dnow 3dnowex X aac aalib adns alsa apache2"
2. Use app-admin/eselect to modify the symlink.
Install eselect if you don't have it)
#emerge eselect
(See the list of available kernels)
#eselect kernel list
Available kernel symlink targets:
[1] linux-2.6.9-gentoo-r1
[2] linux-2.6.9-gentoo-r2
(Select the correct kernel)
#eselect kernel set 1
3. Manually update the symlink
# cd /usr/src
# ln -sfn linux-latest-version linux
Three ways in order to make the /usr/src/linux symbolic link point to the sources of the kernel you are running.
1. Portage can update the symlink automatically when you emerge new kernel sources. All you have to do is add the symlink flag to the USE variable in /etc/make.conf
(Add the symlink keyword)
USE="symlink x86 3dnow 3dnowex X aac aalib adns alsa apache2"
2. Use app-admin/eselect to modify the symlink.
Install eselect if you don't have it)
#emerge eselect
(See the list of available kernels)
#eselect kernel list
Available kernel symlink targets:
[1] linux-2.6.9-gentoo-r1
[2] linux-2.6.9-gentoo-r2
(Select the correct kernel)
#eselect kernel set 1
3. Manually update the symlink
# cd /usr/src
# ln -sfn linux-latest-version linux
Thursday, August 10, 2006
Firefox and Mouse 2
Another thing I noticed about Firefox: Scrolling up and down a page very quickly with the mouse wheel will trigger the command 'Go Back' and 'Go Forward' respectively.
After reading some websites, I've found out that this is not a Firefox bug (therefore the title of this post is actually not justified) but rather a problem with xorg or something like that. Apparently this will occur in all applications with a horizontal scroll bar.
To prevent this from occuring in Firefox alone:
set mousewheel.horizscroll.withnokey.action to 0 in about:config
Or edit the xorg.conf:
For my case, I edited this line:
Option "ZAxisMapping" "4 5 6 7"
into
Option "ZAxisMapping" "4 5"
## Note the absence of 6 and 7. Why they were there in the first place, I don't know. I only have one mouse wheel. At least, I think that 6 and 7 represent the second wheel (for horizontal scrolling?)
After reading some websites, I've found out that this is not a Firefox bug (therefore the title of this post is actually not justified) but rather a problem with xorg or something like that. Apparently this will occur in all applications with a horizontal scroll bar.
To prevent this from occuring in Firefox alone:
set mousewheel.horizscroll.withnokey.action to 0 in about:config
Or edit the xorg.conf:
For my case, I edited this line:
Option "ZAxisMapping" "4 5 6 7"
into
Option "ZAxisMapping" "4 5"
## Note the absence of 6 and 7. Why they were there in the first place, I don't know. I only have one mouse wheel. At least, I think that 6 and 7 represent the second wheel (for horizontal scrolling?)
Sunday, July 30, 2006
Firefox and Mouse
Well, I'll be! I can be so dense sometimes. I've just discovered some enlightening stuff about my mouse. I've been using a Microsoft mouse for more than a year now and only today(!) I've noticed that the scroll wheel can actually be depressed and it can act as a middle mouse button! (My current mouse setting is '3 Button Emulate' or something like that.) No wonder sometimes other webpages load when I'm scrolling through a page. That was reeeeeeeally annoying! The discoveries that I've made:
1. Scroll wheel can act as 3rd button. If it is pressed, firefox will search for the term currently in the clipboard and display a page based on that. To prevent that from happening, go to 'about:config' and change the value for 'middlemouse.loadContentURL' to false. I'm so glad I've finally solved this mystery!
2. Recently, ever since I've installed Firefox 1.5.0.4, I've been having trouble with copy and paste. Everytime I try to paste some text using the 'middle button' (pressing left and right buttons together), this little weird sphere would appear with little arrows and the whole page would move up and down when I move the mouse, and I couldn't paste the text!! It was so annoying and I was cursing away at Firefox. The poor thing didn't deserve all that. Hehe. It was actually my own ignorance. Autoscrolling was enabled by default in the new version. Du-uh... yes I know! As I've never used autoscrolling before, I didn't know what was going on until today. So, I disabled it and can now cut and paste in peace with another new bit of information tucked safely away.
1. Scroll wheel can act as 3rd button. If it is pressed, firefox will search for the term currently in the clipboard and display a page based on that. To prevent that from happening, go to 'about:config' and change the value for 'middlemouse.loadContentURL' to false. I'm so glad I've finally solved this mystery!
2. Recently, ever since I've installed Firefox 1.5.0.4, I've been having trouble with copy and paste. Everytime I try to paste some text using the 'middle button' (pressing left and right buttons together), this little weird sphere would appear with little arrows and the whole page would move up and down when I move the mouse, and I couldn't paste the text!! It was so annoying and I was cursing away at Firefox. The poor thing didn't deserve all that. Hehe. It was actually my own ignorance. Autoscrolling was enabled by default in the new version. Du-uh... yes I know! As I've never used autoscrolling before, I didn't know what was going on until today. So, I disabled it and can now cut and paste in peace with another new bit of information tucked safely away.
Thursday, July 27, 2006
Nimbus Roman No 9 L
OpenOffice Writer: The characters of this font will be displayed overlapping each other when the text is in bold. Weird. The printed text is normal though. Anyway, I installed 'urw-fonts' and the problem was rectified.
Saturday, July 22, 2006
Great song!
I first heard this song while listening to the podcast 'Filme und So'. The song is called 'Tom Cruise scares me' by David Ippolito. I'm not sure if I will be offending anyone / breaking some rules / doing something wrong by posting the direct link here, (These things are soooo sensitive nowadays - sheesh!) so I'll just post the link to the main website. It's a great song and I love it!
http://www.thatguitarman.com/
EDIT: Just as well, that I didn't post the direct link. I read through the 'Legal, Terms of Service and Usage' part of the website, and apparently they don't allow direct link to 'images, sounds or executable applications'.
http://www.thatguitarman.com/
EDIT: Just as well, that I didn't post the direct link. I read through the 'Legal, Terms of Service and Usage' part of the website, and apparently they don't allow direct link to 'images, sounds or executable applications'.
Monday, July 17, 2006
Users and Groups
I hate searching for this every time I have to add a user to a group. I keep forgetting the commands!
1. To view the list of groups and their users: $ cat /etc/group
2. Create new user: $ useradd
3. Create new group: $ groupadd.
4. To list all groups to which the user is a member: $ groups <user id> ## This is the one I keep forgetting!!!!
5. Add user to group z.B. cdrom: $ usermod -G <comma separated group list> <user id>
### Be sure to list all groups as this is an absolute list and not an addition. THIS IS IMPORTANT. Use the 'groups' command and then enter all the groups in addition to the new one under usermod.
EDIT: No need to list all the groups. I just found out that you can append the user to a supplementary group by using the -a option. Meaning:
usermod -a -G wireshark user
This will add 'wireshark' to the user's groups in addition to the other groups that the user already belongs to.
or
gpasswd -a username group
This is a usefule website.
1. To view the list of groups and their users: $ cat /etc/group
2. Create new user: $ useradd
3. Create new group: $ groupadd.
4. To list all groups to which the user is a member: $ groups <user id> ## This is the one I keep forgetting!!!!
5. Add user to group z.B. cdrom: $ usermod -G <comma separated group list> <user id>
### Be sure to list all groups as this is an absolute list and not an addition. THIS IS IMPORTANT. Use the 'groups' command and then enter all the groups in addition to the new one under usermod.
EDIT: No need to list all the groups. I just found out that you can append the user to a supplementary group by using the -a option. Meaning:
usermod -a -G wireshark user
This will add 'wireshark' to the user's groups in addition to the other groups that the user already belongs to.
or
gpasswd -a username group
This is a usefule website.
/etc/conf.d/net
My network connection = Modem --> Router --> Computers
At first, I set my Gentoo system to automatically use DHCP and obtain the IP address. However this resulted in a very slow startup for the computer if the router is switched off. Hence I edited the file /etc/conf.d/net and added this:
###
config_eth0=( "my-ip-address-allocated-by-router netmask 255.255.255.0" )
routes_eth0=( "default gw router's-ip-address" )
###
At first, I set my Gentoo system to automatically use DHCP and obtain the IP address. However this resulted in a very slow startup for the computer if the router is switched off. Hence I edited the file /etc/conf.d/net and added this:
###
config_eth0=( "my-ip-address-allocated-by-router netmask 255.255.255.0" )
routes_eth0=( "default gw router's-ip-address" )
###
Friday, July 14, 2006
SCIM
The commands to start scim:
$ export XMODIFIER="@im=SCIM"
$ export GTK_IM_MODULE="scim"
$ scim -d
I used to put these 3 commands in bash_profile but that did something to my keyboard, whose layout is set to us international, and I couldn't type umlauts and eszett, or something like that. I can't really remember. Maybe I'll try again. Anyway, because of whatever that went wrong, I just type these commands in a terminal everytime I need to use scim, which is not very often. But it is still troublesome to enter all those words. I wonder if it will work if I create an alias for them. Will try later
EDIT: The alias works: alias chinese='export XMODIFIER=@im=SCIM && export GTK_IM_MODULE=scim && scim -d'
Hmmm... the Trebuchet '&' (&) looks ugly.
To use scim with eg. openoffice:
$ LC_ALL=zh_CN.utf8 oowriter2
$ export XMODIFIER="@im=SCIM"
$ export GTK_IM_MODULE="scim"
$ scim -d
I used to put these 3 commands in bash_profile but that did something to my keyboard, whose layout is set to us international, and I couldn't type umlauts and eszett, or something like that. I can't really remember. Maybe I'll try again. Anyway, because of whatever that went wrong, I just type these commands in a terminal everytime I need to use scim, which is not very often. But it is still troublesome to enter all those words. I wonder if it will work if I create an alias for them. Will try later
EDIT: The alias works: alias chinese='export XMODIFIER=@im=SCIM && export GTK_IM_MODULE=scim && scim -d'
Hmmm... the Trebuchet '&' (&) looks ugly.
To use scim with eg. openoffice:
$ LC_ALL=zh_CN.utf8 oowriter2
bashrc vs bash_profile
I was looking for a place to put my aliases and some suggested ~/.bashrc, others suggested ~/.bash_profile. By the way, my aliases are in ~/.bashrc and they are as follows:
# My Personal Alias
alias ipin='mount /mnt/ipod'
alias ipout='umount /mnt/ipod'
alias ipej='eject /mnt/ipod'
Anyway, 'man bash' turned up a mouthful of words which have been nicely summarised by someone from linuxquestions.org:
In other words, /etc/profile is run when a user logs in. ~/.bashrc is run for other shells (Ie opening an xterm)
/etc/profile contains environment variables and startup programs. Environ. var. are persistent - only need to read once. Startup programs are launched once - no need to start them again.
/etc/bashrc is included by ~/.bashrc, and read every time a shell starts up, people use it to include shell aliases and functions. Aliases and functions do not behave like environment variables; they are not passed to other processes.
There - that's why I put my aliases into bashrc ... I think ...
# My Personal Alias
alias ipin='mount /mnt/ipod'
alias ipout='umount /mnt/ipod'
alias ipej='eject /mnt/ipod'
Anyway, 'man bash' turned up a mouthful of words which have been nicely summarised by someone from linuxquestions.org:
In other words, /etc/profile is run when a user logs in. ~/.bashrc is run for other shells (Ie opening an xterm)
/etc/profile contains environment variables and startup programs. Environ. var. are persistent - only need to read once. Startup programs are launched once - no need to start them again.
/etc/bashrc is included by ~/.bashrc, and read every time a shell starts up, people use it to include shell aliases and functions. Aliases and functions do not behave like environment variables; they are not passed to other processes.
There - that's why I put my aliases into bashrc ... I think ...
Thursday, July 13, 2006
cdda2wav
When I was using SuSE, I used this command to rip CDs
$ cdda2wav -D 0,0,0 andwhateverotheroptioniwant
In order to find out the numerical figures after -D, I ran "cdda2wav -scanbus"
However, on a Gentoo machine, "cdda2wav -scanbus" gives this output:
###
cdda2wav: No such file or directory. Cannot open '/dev/pg*'. Cannot open SCSI driver.
cdda2wav: For possible targets try 'cdda2wav -scanbus'.
Use the script scan_scsi.linux to find out more.
Probably you did not define your SCSI device.
Set the CDDA_DEVICE environment variable or use the -D option.
You can also define the default device in the Makefile.
For possible transport specifiers try 'cdda2wav dev=help'.
###
What in the world does that mean? Anyway, now I use the command "cdda2wav -D /dev/hdb andtherestoftheoptions"
Problems I still have with cdda2wav:
1. I don't know why the -scanbus doesn't work on Gentoo. Not a serious problem, since I can replace the device with /dev/hdb. But why??? And that question is bugging the hell out of me! But I'm too lazy to look it up now.
2. I can't run cdda2wav as a normal user. I get this error:
cdda2wav: Operation not permitted. cannot set posix realtime scheduling policy
percent_done:
0%cdda2wav: Operation not permitted. Cannot send SCSI cmd via ioctl
And it just hangs there until I press CTRL-C. I read this in the linuxquestion.org:
cdrecord and cdda2wav require their controlling user to have access privileges to the scsi bus which are not granted to normal users by default within any sane setup.
3. I still haven't figured out how to rip multiple but not consecutive tracks from a CD.
$ cdda2wav -D 0,0,0 andwhateverotheroptioniwant
In order to find out the numerical figures after -D, I ran "cdda2wav -scanbus"
However, on a Gentoo machine, "cdda2wav -scanbus" gives this output:
###
cdda2wav: No such file or directory. Cannot open '/dev/pg*'. Cannot open SCSI driver.
cdda2wav: For possible targets try 'cdda2wav -scanbus'.
Use the script scan_scsi.linux to find out more.
Probably you did not define your SCSI device.
Set the CDDA_DEVICE environment variable or use the -D option.
You can also define the default device in the Makefile.
For possible transport specifiers try 'cdda2wav dev=help'.
###
What in the world does that mean? Anyway, now I use the command "cdda2wav -D /dev/hdb andtherestoftheoptions"
Problems I still have with cdda2wav:
1. I don't know why the -scanbus doesn't work on Gentoo. Not a serious problem, since I can replace the device with /dev/hdb. But why??? And that question is bugging the hell out of me! But I'm too lazy to look it up now.
2. I can't run cdda2wav as a normal user. I get this error:
cdda2wav: Operation not permitted. cannot set posix realtime scheduling policy
percent_done:
0%cdda2wav: Operation not permitted. Cannot send SCSI cmd via ioctl
And it just hangs there until I press CTRL-C. I read this in the linuxquestion.org:
cdrecord and cdda2wav require their controlling user to have access privileges to the scsi bus which are not granted to normal users by default within any sane setup.
3. I still haven't figured out how to rip multiple but not consecutive tracks from a CD.
Sunday, July 02, 2006
Die WM
Haha. Es ist unglaublich. Bei jeder WM hat England immer ein Idiot, der etwas Dummes tun muss. Und wie gewöhnlich können ihre Spieler gar keinen Elfmeter verwandeln. Es ist wirklich lächerlich.
Tuesday, June 27, 2006
Change mouse theme
Edit: /usr/share/cursors/xorg-x11/default/index.theme
OR
1. emerge x11-themes/silver-xcursors
2. vim ~/.Xdefaults and place this entry:
Xcursor.theme: Silver
OR
1. emerge x11-themes/silver-xcursors
2. vim ~/.Xdefaults and place this entry:
Xcursor.theme: Silver
Sunday, June 04, 2006
Flashblock and Firefox
Flashblock is a nifty little extension that prevents flash objects from being displayed.
Gentoo finally has an update on firefox. Now I can finally upgrade to Firefox 1.5 and use the Extreme Noia theme.
Gentoo finally has an update on firefox. Now I can finally upgrade to Firefox 1.5 and use the Extreme Noia theme.
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"
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
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