Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
04-05-2002, 09:41 AM
|
#1
|
|
Member
Registered: Feb 2002
Location: MI
Distribution: Slackware 9.1
Posts: 83
Rep:
|
desktops
I'm using RedHat 7.2. I switched the desktop to TWM using the desktop switching tool. Now TWM won't start up and I don't know how to switch back to KDE or Gnome from the command prompt. Any suggestions?
|
|
|
|
04-05-2002, 09:53 AM
|
#2
|
|
Member
Registered: Nov 2001
Location: Hi Hat KY USA
Distribution: RedHat, Mandrake
Posts: 63
Rep:
|
$ more /etc/sysconfig/desktop
and tell me what you get. K
- or -
# vi /etc/sysconfig/desktop
DESKTOP="KDE"
Last edited by dewcansam; 04-05-2002 at 09:54 AM.
|
|
|
|
04-05-2002, 10:08 AM
|
#3
|
|
Member
Registered: Feb 2002
Location: MI
Distribution: Slackware 9.1
Posts: 83
Original Poster
Rep:
|
DESKTOP="KDE"
|
|
|
|
04-05-2002, 11:07 AM
|
#4
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,691
|
check what ~/.xinitrc or ~/.Xclients say, and wehter they exist or not. that will define what WM you load if you've got them. the /etc... file is only a very last resort generaly
|
|
|
|
04-05-2002, 12:05 PM
|
#5
|
|
Guru
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280
Rep:
|
I did the /etc/sysconfig/desktop and i got
DESKTOP = "" does this have anything to do with the fact that when i reboot Linux...it defaults to the console?
|
|
|
|
04-05-2002, 12:11 PM
|
#6
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,691
|
Quote:
Originally posted by Robert0380
I did the /etc/sysconfig/desktop and i got
DESKTOP = "" does this have anything to do with the fact that when i reboot Linux...it defaults to the console?
|
no, it means you're on runlevel 3 and not runlevel 5. edit /etc/inittab and make the logical changes.
|
|
|
|
04-05-2002, 02:04 PM
|
#7
|
|
Member
Registered: Feb 2002
Location: MI
Distribution: Slackware 9.1
Posts: 83
Original Poster
Rep:
|
I think in RedHat I rely on Xclients. Is this correct?
Anyway, here are the contents of Xclients and xinitrc.
BTW, thanks for the help, guys.
Contents of Xclients:
#!/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
if [ -n "`grep -i GNOME /etc/sysconfig/desktop`" ]; then
PREFERRED=gnome-session
elif [ -n "`grep -i KDE /etc/sysconfig/desktop`" ]; then
PREFERRED=startkde
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
# 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/netscape -a -f /usr/share/doc/HTML/index.html ]; then
netscape /usr/share/doc/HTML/index.html &
fi
if [ -f /usr/X11R6/bin/fvwm ]; then
exec fvwm
else
exec twm
fi
}
Contents of xinitrc:
#!/bin/sh
# (c) 1999, 2000 Red Hat, Inc.
# Hack to symlink Glide3 lib to point to proper lib for either Voodoo 3 or 4/5
# This hack will go away in the future in XFree86 4.2.0 likely.
[ -x /usr/sbin/glidelink ] && /usr/sbin/glidelink
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
userxkbmap=$HOME/.Xkbmap
sysresources=/etc/X11/Xresources
sysmodmap=/etc/X11/Xmodmap
sysxkbmap=/etc/X11/Xkbmap
# merge in defaults
if [ -f "$sysresources" ]; then
xrdb -merge "$sysresources"
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
# merge in keymaps
if [ -f "$sysxkbmap" ]; then
setxkbmap `cat "$sysxkbmap"`
XKB_IN_USE=yes
fi
if [ -f "$userxkbmap" ]; then
setxkbmap `cat "$userxkbmap"`
XKB_IN_USE=yes
fi
if [ -z "$XKB_IN_USE" -a ! -L /etc/X11/X ]; then
if grep '^exec.*/Xsun' /etc/X11/X > /dev/null 2>&1 && [ -f /etc/X11/XF86Config ]; then
xkbsymbols=`sed -n -e 's/^[ ]*XkbSymbols[ ]*"\(.*\)".*$/\1/p' /etc/X11/XF86Config`
if [ -n "$xkbsymbols" ]; then
setxkbmap -symbols "$xkbsymbols"
XKB_IN_USE=yes
fi
fi
fi
# xkb and xmodmap don't play nice together
if [ -z "$XKB_IN_USE" ]; then
if [ -f "$sysmodmap" ]; then
xmodmap "$sysmodmap"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
fi
unset XKB_IN_USE
# The user may have their own clients they want to run. If they don't,
# fall back to system defaults.
# run all system xinitrc shell scripts.
for i in /etc/X11/xinit/xinitrc.d/* ; do
if [ -x "$i" ]; then
. "$i"
fi
done
if [ -f $HOME/.Xclients ]; then
exec $HOME/.Xclients
elif [ -f /etc/X11/xinit/Xclients ]; then
exec /etc/X11/xinit/Xclients
else
# failsafe settings. Although we should never get here
# (we provide fallbacks in Xclients as well) it can't hurt.
xclock -geometry 100x100-5+5 &
xterm -geometry 80x50-50+150 &
if [ -x /usr/bin/netscape -a -f /usr/share/doc/HTML/index.html ]; then
netscape /usr/share/doc/HTML/index.html &
fi
if [ -x /usr/X11R6/bin/fvwm2 ]; then
exec fvwm2
else
exec twm
fi
fi
|
|
|
|
04-05-2002, 02:32 PM
|
#8
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,691
|
wrong files. you want to look at your personal ones
/home/username/.xinitrc
/home/username/.Xclients
xinitrc will be looked for before Xclients btw, and yes programs like switchdesk do use .Xclients
|
|
|
|
04-05-2002, 02:58 PM
|
#9
|
|
Member
Registered: Feb 2002
Location: MI
Distribution: Slackware 9.1
Posts: 83
Original Poster
Rep:
|
Let's try that again. I have no .xinitrc. It looks to me like I have to find "startkde" and substitute its path after "exec".
listing of .Xclients-default
#!/bin/bash
# (c) 2000 Red Hat, Inc.
exec /usr/X11R6/bin/twm
listing of .Xclients
#!/bin/bash
# Created by Red Hat Desktop Switcher
if [ -e "$HOME/.Xclients-$HOSTNAME$DISPLAY" ]; then
exec $HOME/.Xclients-$HOSTNAME$DISPLAY
else
exec $HOME/.Xclients-default
fi
|
|
|
|
04-05-2002, 03:03 PM
|
#10
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,691
|
yeah so.. that's where it's running twm, startkde should be on your path already.
|
|
|
|
04-05-2002, 03:23 PM
|
#11
|
|
Member
Registered: Feb 2002
Location: MI
Distribution: Slackware 9.1
Posts: 83
Original Poster
Rep:
|
Thanks, acid_kewpie. I changed .Xclients-default to exec startkde and everything is cool.
|
|
|
|
04-10-2002, 11:04 AM
|
#12
|
|
Member
Registered: Nov 2001
Location: Hi Hat KY USA
Distribution: RedHat, Mandrake
Posts: 63
Rep:
|
Sorry so late in getting back to this topic. Glad that you got it resolved. One other tip for you. The easiest way to have gotten your RH box back to K is:
$ /usr/bin/switchdesk kde
-- or for gnome --
$ /usr/bin/switchdesk gnome
how's that for easy
then do a CTRL+ALT+BACKSPACE to restart Xwindows
Last edited by dewcansam; 04-10-2002 at 11:05 AM.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 07:06 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|