LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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

Reply
 
Search this Thread
Old 04-05-2002, 09:41 AM   #1
thanko
Member
 
Registered: Feb 2002
Location: MI
Distribution: Slackware 9.1
Posts: 83

Rep: Reputation: 15
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?
 
Old 04-05-2002, 09:53 AM   #2
dewcansam
Member
 
Registered: Nov 2001
Location: Hi Hat KY USA
Distribution: RedHat, Mandrake
Posts: 63

Rep: Reputation: 15
$ 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.
 
Old 04-05-2002, 10:08 AM   #3
thanko
Member
 
Registered: Feb 2002
Location: MI
Distribution: Slackware 9.1
Posts: 83

Original Poster
Rep: Reputation: 15
DESKTOP="KDE"
 
Old 04-05-2002, 11:07 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,378

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
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
 
Old 04-05-2002, 12:05 PM   #5
Robert0380
Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
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?
 
Old 04-05-2002, 12:11 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,378

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
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.
 
Old 04-05-2002, 02:04 PM   #7
thanko
Member
 
Registered: Feb 2002
Location: MI
Distribution: Slackware 9.1
Posts: 83

Original Poster
Rep: Reputation: 15
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
 
Old 04-05-2002, 02:32 PM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,378

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
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
 
Old 04-05-2002, 02:58 PM   #9
thanko
Member
 
Registered: Feb 2002
Location: MI
Distribution: Slackware 9.1
Posts: 83

Original Poster
Rep: Reputation: 15
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
 
Old 04-05-2002, 03:03 PM   #10
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,378

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
yeah so.. that's where it's running twm, startkde should be on your path already.
 
Old 04-05-2002, 03:23 PM   #11
thanko
Member
 
Registered: Feb 2002
Location: MI
Distribution: Slackware 9.1
Posts: 83

Original Poster
Rep: Reputation: 15
Thanks, acid_kewpie. I changed .Xclients-default to exec startkde and everything is cool.
 
Old 04-10-2002, 11:04 AM   #12
dewcansam
Member
 
Registered: Nov 2001
Location: Hi Hat KY USA
Distribution: RedHat, Mandrake
Posts: 63

Rep: Reputation: 15
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
desktops daven1 Slackware 2 01-10-2005 08:17 PM
desktops? kalleanka Mandriva 1 03-15-2004 06:12 AM
What are all the different desktops? SuSE_Surfer Linux - General 14 10-22-2003 11:21 PM
Do we really need desktops? softgun Linux - Software 21 07-14-2003 02:57 AM
4 desktops?? murshed Linux - Newbie 5 01-25-2003 09:42 AM


All times are GMT -5. The time now is 03:24 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration