Click to See Complete Forum and Search --> : window manager in X window
herry
09-12-2003, 03:58 AM
Hi,
I am trying to install the GUI on Linux (ie. XFree86) by installing the RPM packages one by one (I am using RH 9.0). Right now I think I have completed the installation of the XFree86 and I have run the redhat-config-xfree86 and created the /etc/X11/XF86Config file. Then I run startx, the screen becomes blank and the X cursor shown briefly and then it backs to the text based screen.
The error message I see is:
WARNING: You selected Fvwm2 as your window manager, but your installation does not appear to be functional. The executable /usr/X11R6/bin/fvwm2 was not found on your system.
RESUMING with TWM...
Waiting for X server to shutdown
I certainly has not installed the fvm2 since it is not part of the standard redhat 9.0 and I am not sure what TWM is may be another window manager, but I certainly also do not install it.
So now I am thinking that may be the XFree86 needs a window manager to work (I know that it did not need that on the previous redhat like 7.2. The Xfree86 can run there without any window manager. But hey, this is a new redhat, right ?)
So I install the sawfish window manager, after installing it and all the supporting RPMs, I again run the startx. But again I got the same message as above.
So my question is how do I tell XFree86 to run the sawfish that I just install instead of the fvwm2 that the Xfree86 trying to run ?
Or is there any more serious and deeper problem here then just simply the Xfree86 cannot find its window manager ? (because, like I said it should run without it, right ?)
Thanks
BTW may box is a ECS 929 Desknote. With Athlon processor and sis 315 graphic chip. I configure the XF86config with vesa frame buffer.
deathadder
09-12-2003, 05:03 AM
have you tried startx sawfish? also i believe there is a file in /etc/X11 that names the default w/m but i cant remember it and cant check it at the moment, bloody college doesnt have linux workstations :(
EDIT: have a look at the error logs in /var/log/XFree<something>
herry
09-12-2003, 05:43 AM
Tried startx sawfish, it comes back to me saying:
/usr/X11R6/bin/xterm: bad command line option "sawfish"
cannot find anything useful on the /var/log/Xfree86 logs though. Looking through it, I don't find any line that says error or fail at all. All just saying loading this and loading that and a few successfull comments. It is kind a long so I don't want to post it here.
I look at the /etc/X11 directory, I think I know why the X window try to load the fvwm2, it is on the /etc/X11/xinit/Xclients file. It tried to look whether there is KDE or gnome installed if not then it tried to load fvwm2.
I put this line after it checks for the desktop environmet:
exec /usr/bin/sawfish
and then do startx, my screen get blank, I can see my cursor (the arrow head, one not the X) and I can move it around now, but nothing else the back ground is black. I think may be my Xf86Config is wrong.
Thanks for your help. May be I need to upgrade my XFree86 to the latest one.
mrBen
09-12-2003, 06:10 AM
OK - let's start at the beginning:
1. X always needs a Window Manager to work. Even in RedHat 7.2.
2. If you have an arrow, rather than a cross, then your window manager is working. Sawfish, IIRC, is very minimal in what it provides, which is probably why you see nothing else on the screen. You might get a menu if you right/left click, but you might not ;)
3. TWM is a very old and basic WM that most Linux distros use as a backup in case another WM b0rks on you.
micio
09-12-2003, 06:59 AM
Check $HOME/.Xclients-defaults, usually it contains the wm that is called by X on RH (> 6.0). In RH distribution this replaces the .xinitrc, at least from 6.0.
You'd better man xinit ... anyway try to use a .Xclient-defaults such as:
xterm &
exec twm
note: all calls before the wm in background and the call to the wm with "exec" in this way terminating the wm you shut down the X server too.
Of course you are free to use the wm you prefer (my preferred wm are blackbox and ICEWM.), watch out that desktop environment have particolar calls, for example, to run gnome:
exec gnone-session
to run KDE:
startkde
(if I remember well the exec is not necessary ... ?).
herry
09-13-2003, 08:38 AM
OK. So I was wrong. The X window even in RH 7.2 apparently also uses an window manager to run. I didn't know this, since I thought I only install the XFree86 without installing any window manager and then I can run startx and the X window appears, then I thought that X window can run without any window manager. So the TWM is the window manager by default if you just install the XFree86. (Hey learn something new everyday...:))
I have since upgraded my XFree86 to the latest stable release that I got from xfree86.org. Now my X window appear when I type startx, and I can move the mouse etc. But the window manager is still TWM. I know this since when I click the left button, I get a drop down menu that says TWM on top.
I have tried to modify my /etc/X11/Xclients file so that it will run the sawfish after it checks the availaibility of the desktop environment. Here is what the file looks like:
#!/bin/bash
# Copyright 1999 - 2001 Red Hat, Inc.
# License: GNU General Public License v2
# check to see if the user has a preferred desktop
PREFERRED=
if [ -f /etc/sysconfig/desktop ]; then
. /etc/sysconfig/desktop
if [ "$DESKTOP" = "GNOME" ]; then
PREFERRED=gnome-session
elif [ "$DESKTOP" = "KDE" ]; then
PREFERRED=startkde
elif [ "$DESKTOP" = "WINDOWMAKER" ]; then
PREFERRED=wmaker
fi
fi
if [ -n "$PREFERRED" ] && which $PREFERRED >/dev/null 2>&1; then
PREFERRED=`which $PREFERRED`
exec $PREFERRED
fi
# now if we can reach here, either no desktop file was present,
# or the desktop requested is not installed.
if [ -z "$PREFERRED" ]; then
GSESSION=gnome-session
STARTKDE=startkde
# by default, we run GNOME.
if which $GSESSION >/dev/null 2>&1; then
exec `which $GSESSION`
fi
# if GNOME isn't installed, try KDE.
if which $STARTKDE >/dev/null 2>&1; then
exec `which $STARTKDE`
fi
fi
exec /usr/bin/sawfish
# Failsafe.
# these files are left sitting around by TheNextLevel.
rm -f $HOME/Xrootenv.0
rm -f /tmp/fvwmrc* 2>/dev/null
# First thing - check the user preferences
if [ -f $HOME/.wm_style ] ; then
WMSTYLE=`cat $HOME/.wm_style |tr A-Z a-z`
case "$WMSTYLE" in
afterstep|windowmaker|mmaker)
exec /usr/X11R6/bin/RunWM --WindowMaker
;;
fvwm95|fvwm|fvwm2)
exec /usr/X11R6/bin/RunWM --Fvwm95
;;
mwm|lesstif)
exec /usr/X11R6/bin/RunWM --FvwmMWM
;;
esac
fi
# Argh! Nothing good is installed. Fall back to fvwm2 (win95-style) or twm
/usr/X11R6/bin/RunWM --Fvwm95 || {
# gosh, neither fvwm95 nor fvwm2 is available;
# fall back to failsafe settings
xclock -geometry 100x100-5+5 &
xterm -geometry 80x50-50+150 &
if [ -f /usr/bin/mozilla -a -f /usr/share/doc/HTML/index.html ]; then
mozilla /usr/share/doc/HTML/index.html &
fi
if [ -f /usr/bin/sawfish ]; then
exec sawfish
else
exec twm
fi
}
Please note that I have put exec /usr/bin/sawfish right after it finish with the desktop environment thing, and also as a fail safe measure, I put the command to run the sawfish again if it cannot find any Fvwm window manager.
But when I startx, I still get the TWM window manager. Any idea why ? Or do I modify a wrong file ? That actually X window doesn't look at this Xclient file at all ?
To micio:
I cannot find the .Xclients-defaults under the /etc/X11/xinit directory, what is the absoloute path of your $HOME.
Thanks
micio
09-15-2003, 05:48 AM
Originally posted by herry
But when I startx, I still get the TWM window manager. Any idea why ? Or do I modify a wrong file ? That actually X window doesn't look at this Xclient file at all ?
To micio:
I cannot find the .Xclients-defaults under the /etc/X11/xinit directory, what is the absoloute path of your $HOME.
Thanks
.Xclients-defaults should be under your home directory, so, look for something like
/home/yourname/.Xclients-default.
To be sure that the right configuration file is .Xclients-default try to look at startx: it is a script located somewhere (find / -name startx -print 2> /dev/null). I found this "anomalous" behaviour (i.e. RH does not use .xinitrc) by looking at it. I'm not a Linux guru but if you want a good advice: *do not* modify system wide scripts or config files, usually there is always a user specific config file to hack.
I'm sorry if I'm vague but currently I don't have a linux system and my memory is lacking.
micio
herry
09-15-2003, 03:59 PM
Actually my startx script has no word "Xclients" at all, not to mention Xclients-defaults. It has a lot of reference to $HOME/.xinitrc though and I guess for the last resot /etc/X11/xinit/xinitrc.
Well in any case I have changed my XFree86 installation. Reinstall everything from scratch and install the XFree86 that comes off RH 9. Now I used KDE that I download from KDE and the graphics come out and everything seems nice. The only thing is that I cannot play mp3 songs., eventhough the sound card seems to be working. But I guess another story...:)
Thanks for your help.
micio
09-16-2003, 03:26 AM
for mp3 search for xmms-mpg123-1.2.7-21.i386.rpm, RH distribution does not include mp3 deconding.
You should have either .Xclient or .Xclient-defaults or .xinitrc in your home, you can try in this way:
$grep kde .*
and see which file contains "startkde".
herry
09-16-2003, 04:30 AM
Actually I am using noatun instead of the xmms. By reading the help at noatun it says that it should be able to run mp3 music, but it didn't. When I try to play it, the slide bar indicating the progress of the music just won't budge, and obviously no music come out.
I know that the sound work because I can play all kind sounds for the kde themes, but no mp3. I haven't try it with the real audio cd though that is why I am not 100% sure that the sound works.
I know that RH begining release 9 takes out mp3 playing capability from xmms, I know this because when I try to play mp3 file from that player, it comes back to me saying that. But what I am not sure whether it also takes out the mp3 playing capability of the other players (eg. noatun).
But thanks for the tip though, I have downloaded the xmms-mpg123, and I'll install it on my box when I get home and let you know what the result is.
As for the Xclient stuff. I am not sure that it on my /home/username directory it has .Xclient file or .Xclient-defaults file, but it sure does has a whole of hidden file in it like .kde, .Xauthority etc.
The way I undertsand it, the .Xclient is there if you want to customize window manager/desktop environment amongst different users. For example user A like to use kde, then you create a .Xclient on his/her home directory and has one line in it saying startkde. And other user probably would have exec gnome-session or something. But if the .Xclient is not there than startx will search for the default /etc/X11/xinit/xinitrc and run the script there and hence the guy is using the default wm/de.
And in my case everybody would be using the same wm/de because no user has .Xclient in his/her home directory.