LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-29-2004, 06:55 PM   #1
Jonescity
Member
 
Registered: Jul 2004
Location: Jacksonville
Distribution: Slackware Current - (Using Slapt-get!)
Posts: 51

Rep: Reputation: 15
Unhappy How to start KDE automaticlly without typing "startx" then "startkde"


How to start kde automaticlly without typing "startkde"? First I have to type "startx" first then type "startkde" to get KDE to start. I want to be able to start KDE automaticly when I type "startx". I googled about it and went to x.org and KDE websites I did not get a clear answer. I did a base install of slackware linux (when I say base install I did not install KDE or Gnome) then I downloaded and installed KDE 3.3.1 and all of it's dependencies with "installpkg" command (they were packages in .tgz format).

When I did some reading on it called for a .xinitrc file and I DONT EVEN HAVE ONE! I looked in the home directory as suggested I had un-hide my hidden files I even searched the X11 directory and entire hard drive and nothing! I don't even know how to create one! I took a look at the xorg.conf file for some kind of an answer to no avail. When I do get into KDE it has a annoying login terminal window open and when I close it KDE and X shuts down! Can any help me! You are the smartest people I know!
 
Old 10-29-2004, 07:34 PM   #2
rotvogel
Member
 
Registered: Oct 2003
Posts: 534

Rep: Reputation: 30
xwmconfig will solve this I think
 
Old 10-29-2004, 07:35 PM   #3
hrp2171
Member
 
Registered: Aug 2004
Location: California, USA
Distribution: Ubuntu
Posts: 243
Blog Entries: 3

Rep: Reputation: 30
run xwmconfig then choose KDE to be default. then edit /etc/rc.local and add startx in there.
 
Old 10-29-2004, 07:40 PM   #4
hrp2171
Member
 
Registered: Aug 2004
Location: California, USA
Distribution: Ubuntu
Posts: 243
Blog Entries: 3

Rep: Reputation: 30
Or look at this thread:

http://www.linuxquestions.org/questi...threadid=53677
 
Old 10-29-2004, 07:53 PM   #5
Jonescity
Member
 
Registered: Jul 2004
Location: Jacksonville
Distribution: Slackware Current - (Using Slapt-get!)
Posts: 51

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by hrp2171
run xwmconfig then choose KDE to be default. then edit /etc/rc.local and add startx in there.
How do I do that? This is the xwmconfig file I see where it says"SELECT DEFAULT WINDOW MANAGER FOR X" but how DO I add KDE or make it default without messing anything up?
or what do I type? I am tryin real hard to figure this out. :




Code:
 #!/bin/sh
# Copyright 1999, 2002  Patrick Volkerding, Moorhead, Minnesota USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
#  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
#  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
#  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
#  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
#  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

# First, let's bail if our being here doesn't make sense:
if [ ! -d /etc/X11/xinit ]; then
  exit
fi
if [ "`cd /etc/X11/xinit ; echo *.*`" = '*.*' ]; then
  exit
fi

if [ "$USER" = "root" ]; then
  TMP=/var/log/setup/tmp
else
  TMP=$HOME/.xwmconfig
fi

if [ ! -d $TMP ]; then
 mkdir -p $TMP
 chmod 700 $TMP
fi

# Do we already have an existing default?
unset PRESELECT
if [ -L /etc/X11/xinit/xinitrc ]; then
  CURRENT="`/bin/ls -l /etc/X11/xinit/xinitrc | cut -f 2 -d '>' | cut -b2-`"
  PRESELECT=" --default-item $CURRENT "
fi

# Figure out who we are and set up some background information:
if [ "$USER" = "root" ]; then
  BACKTITLE="--backtitle \"Setting system-wide default window manager in /etc/X11/xinit/\""
else
  BACKTITLE="--backtitle \"Setting default window manager in $HOME/.xinitrc\""
fi

# This stops --backtitle from cluttering the initial install:
if [ ! -r /proc/kcore ]; then
  BACKTITLE=""
fi

# Remove any previous script:
rm -f $TMP/tmpscript.sh

# Add the top of the script:
if [ -r /etc/X11/xinit/xinitrc.gnome -a -r /etc/X11/xinit/xinitrc.kde ]; then
cat << EOF > $TMP/tmpscript.sh
#!/bin/sh
dialog $BACKTITLE --title "SELECT DEFAULT WINDOW MANAGER FOR X" $PRESELECT --menu \\
"Please select the default window manager to use with the X Window \\
System.  This will define the style of graphical user interface \\
the computer uses.  KDE and GNOME provide the most features. People \\
with Windows or MacOS experience will find either one easy to use.  \\
Other window managers are easier on system \\
resources, or provide other unique features." 0 0 0 \\
EOF
elif [ -r /etc/X11/xinit/xinitrc.kde ]; then 
cat << EOF > $TMP/tmpscript.sh
#!/bin/sh
dialog $BACKTITLE --title "SELECT DEFAULT WINDOW MANAGER FOR X" $PRESELECT --menu \\
"Please select the default window manager to use with the X Window \\
System.  This will define the style of graphical user interface \\
the computer uses.  KDE provides the most features, and people \\
with Windows or MacOS experience will find it easy to use.  \\
Other window managers are easier on system \\
resources, or provide other unique features." 0 0 0 \\
EOF
else # we'll assume GNOME is there.  If not, tough.
cat << EOF > $TMP/tmpscript.sh
dialog $BACKTITLE --title "SELECT DEFAULT WINDOW MANAGER FOR X" $PRESELECT --menu \\
"Please select the default window manager to use with the X Window \\
System.  This will define the style of graphical user interface \\
the computer uses.  GNOME provides the most features, and people \\
with Windows or MacOS experience will find it easy to use.  \\
Other window managers are easier on system \\
resources, or provide other unique features." 0 0 0 \\
EOF
fi

# Add KDE as the first and default entry:
if [ -r /etc/X11/xinit/xinitrc.kde ]; then
  echo "\"xinitrc.kde\" \"KDE: K Desktop Environment\" \\" >> $TMP/tmpscript.sh
fi

# Then, we add GNOME:
if [ -r /etc/X11/xinit/xinitrc.gnome ]; then
  if [ ! -r /etc/X11/xinit/xinitrc.kde ]; then
    echo "\"xinitrc.gnome\" \"GNU Network Object Model Environment\" \\" >> $TMP/tmpscript.sh
  else
    echo "\"xinitrc.gnome\" \"GNU Network Object Model Environment\" \\" >> $TMP/tmpscript.sh
  fi
fi

# Add XFce:
if [ -r /etc/X11/xinit/xinitrc.xfce ]; then
  echo "\"xinitrc.xfce\" \"The Cholesterol Free Desktop Environment\" \\" >> $TMP/tmpscript.sh
fi

# Add Blackbox:
if [ -r /etc/X11/xinit/xinitrc.blackbox ]; then
  echo "\"xinitrc.blackbox\" \"The blackbox window manager\" \\" >> $TMP/tmpscript.sh
fi

# Add Fluxbox:
if [ -r /etc/X11/xinit/xinitrc.fluxbox ]; then
  echo "\"xinitrc.fluxbox\" \"The fluxbox window manager\" \\" >> $TMP/tmpscript.sh
fi

# Add Enlightenment:
if [ -r /etc/X11/xinit/xinitrc.e ]; then
  echo "\"xinitrc.e\" \"Enlightenment\" \\" >> $TMP/tmpscript.sh
fi

# Add WindowMaker:
if [ -r /etc/X11/xinit/xinitrc.wmaker ]; then
  echo "\"xinitrc.wmaker\" \"WindowMaker\" \\" >> $TMP/tmpscript.sh
fi

# Add FVWM2:
if [ -r /etc/X11/xinit/xinitrc.fvwm2 ]; then
  echo "\"xinitrc.fvwm2\" \"F(?) Virtual Window Manager (version 2.xx)\" \\" >> $TMP/tmpscript.sh
fi

# Add FVWM95:
if [ -r /etc/X11/xinit/xinitrc.fvwm95 ]; then
  echo "\"xinitrc.fvwm95\" \"FVWM2 with a Windows look and feel\" \\" >> $TMP/tmpscript.sh
fi

# Add icewm:
if [ -r /etc/X11/xinit/xinitrc.icewm ]; then
  echo "\"xinitrc.icewm\" \"ICE Window Manager\" \\" >> $TMP/tmpscript.sh
fi

# Add sawfish:
if [ -r /etc/X11/xinit/xinitrc.sawfish ]; then
  echo "\"xinitrc.sawfish\" \"Sawfish without GNOME\" \\" >> $TMP/tmpscript.sh
fi

# Add twm:
if [ -r /etc/X11/xinit/xinitrc.twm ]; then
  echo "\"xinitrc.twm\" \"Tab Window Manager (very basic)\" \\" >> $TMP/tmpscript.sh
fi

# Add mwm:
if [ -r /etc/X11/xinit/xinitrc.mwm ]; then
  echo "\"xinitrc.mwm\" \"Motif WM\" \\" >> $TMP/tmpscript.sh
fi

# Now, add support for the other window managers:
( cd /etc/X11/xinit
  for file in xinitrc.* ; do
    if [ ! "$file" = "xinitrc.kde" -a ! "$file" = "xinitrc.gnome" \
      -a ! "$file" = "xinitrc.e" -a ! "$file" = "xinitrc.wmaker" \
      -a ! "$file" = "xinitrc.fvwm2" -a ! "$file" = "xinitrc.fvwm95" \
      -a ! "$file" = "xinitrc.icewm" -a ! "$file" = "xinitrc.twm" \
      -a ! "$file" = "xinitrc.mwm" -a ! "$file" = "xinitrc.xfce" \
      -a ! "$file" = "xinitrc.blackbox" -a ! "$file" = "xinitrc.fluxbox" \
      -a ! "$file" = "xinitrc.sawfish" ]; then
      echo "\"$file\" \"$file\" \\" >> $TMP/tmpscript.sh
    fi
  done
)

# Then, the tail end:
cat << EOF >> $TMP/tmpscript.sh
2> $TMP/output
if [ ! \$? = 0 ]; then
  rm -f $TMP/output
  echo "Canceled."
  exit
fi
EOF

sh $TMP/tmpscript.sh

if [ ! -r $TMP/output ]; then
  rm -f $TMP/tmpscript.sh
  exit
fi

OUTPUT=`cat $TMP/output`

# If xwmconfig is run by root, it changes the system-wide default for users
# that do not have a $HOME/.xinitrc:
if [ "$USER" = "root" ]; then
  if [ -r /etc/X11/xinit/$OUTPUT ]; then
    ( cd /etc/X11/xinit ; rm -f xinitrc ; ln -sf $OUTPUT xinitrc )
  fi
fi

# Also set up a new $HOME/.xinitrc:
if [ -r /etc/X11/xinit/$OUTPUT -a ! "$HOME" = "/" ]; then
  if [ -r $HOME/.xinitrc ]; then
    rm -f $HOME/.xinitrc-backup
    mv $HOME/.xinitrc $HOME/.xinitrc-backup
  fi
  cat /etc/X11/xinit/$OUTPUT > $HOME/.xinitrc
fi

rm -f $TMP/tmpscript.sh $TMP/output

Last edited by Jonescity; 10-29-2004 at 07:55 PM.
 
Old 10-29-2004, 08:05 PM   #6
rotvogel
Member
 
Registered: Oct 2003
Posts: 534

Rep: Reputation: 30
Normal people run this script to setup their default window manager. No need to edit this
 
Old 10-29-2004, 08:26 PM   #7
Jonescity
Member
 
Registered: Jul 2004
Location: Jacksonville
Distribution: Slackware Current - (Using Slapt-get!)
Posts: 51

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by rotvogel
Normal people run this script to setup their default window manager. No need to edit this
The above link involved changing default login managers not starting KDE from typing startx .

Thanks for helping tho.

BUT,

I still confussed exactly which file or files DO I edit.

I have x.org by the way.
 
Old 10-29-2004, 08:40 PM   #8
rotvogel
Member
 
Registered: Oct 2003
Posts: 534

Rep: Reputation: 30
I don't know what KDE packages you used to install KDE. The way it works in Slackware is as follows.

Slackware uses a script (xwmconfig) to configure your default window manager in X. If you are using runlevel 3 it wil read the possibilities in /etc/X11/xinit and displays the choices in a menu. Choosing the option you want will result in a system wide setting (running xwmconfig as root) and that will create a symlink xinitrc to xinitrc.kde for example. If you run xwmconfig as a user it will create a file .xinitrc in your $HOME. When starting X(Free/Org) it will read the file in your $HOME and if that does not exists it will read the file in /etc/X11/xinit/ .

So there is nothing to edit manually. But if your system lacks /etc/X11/xinit/xinitrc.kde then this will not work and KDE will not appear as an option in your xwmconfig menu. If so, you will need the files kde.csh and kde.sh in /etc/profile.d as well. That could be caused by a packages which are not complete and poorly built.

Last edited by rotvogel; 10-29-2004 at 08:41 PM.
 
Old 10-29-2004, 09:32 PM   #9
Jonescity
Member
 
Registered: Jul 2004
Location: Jacksonville
Distribution: Slackware Current - (Using Slapt-get!)
Posts: 51

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by rotvogel
I don't know what KDE packages you used to install KDE. The way it works in Slackware is as follows.

Slackware uses a script (xwmconfig) to configure your default window manager in X. If you are using runlevel 3 it wil read the possibilities in /etc/X11/xinit and displays the choices in a menu. Choosing the option you want will result in a system wide setting (running xwmconfig as root) and that will create a symlink xinitrc to xinitrc.kde for example. If you run xwmconfig as a user it will create a file .xinitrc in your $HOME. When starting X(Free/Org) it will read the file in your $HOME and if that does not exists it will read the file in /etc/X11/xinit/ .

So there is nothing to edit manually. But if your system lacks /etc/X11/xinit/xinitrc.kde then this will not work and KDE will not appear as an option in your xwmconfig menu. If so, you will need the files kde.csh and kde.sh in /etc/profile.d as well. That could be caused by a packages which are not complete and poorly built.
I DID IT!!! I made a link to the xinitrc.kde in the home folder Thank You all so much!!!


Last edited by Jonescity; 10-30-2004 at 01:33 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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Telling people to use "Google," to "RTFM," or "Use the search feature" Ausar General 77 03-21-2010 11:26 AM
"Xlib: extension "XFree86-DRI" missing on display ":0.0"." zaps Linux - Games 9 05-14-2007 03:07 PM
KDE "Logout" and "Lock Session" menu restoration powah Linux - Software 3 03-29-2005 08:02 PM
KDE "Lock Session" and "Logout" menu restoration tcma Linux - Software 0 01-29-2005 11:12 AM
i just finished typing "./configure" and "make" in mplayer directory... kublador Linux - General 4 02-22-2003 03:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:17 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration