SlackwareThis Forum is for the discussion of Slackware Linux.
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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
My custom Slackware install crashes whenever I leave init 4 and I can't quite figure out what is causing it. I was able to ignore the problem for awhile, but now I am working on a project that requires me to keep entering and exiting xwindows, and having to reboot (uncleanly) is getting increasingly annoying.
I am pretty sure the problem is with the init process and not X11 because it doesn't happen when I initiate startx from init 3. If however, I go strait into init 4, my screen blanks whenever I try to exit the xsession and it will not accept any further input. It will even stop in the middle of an 'init 6' run from an xterm.
Initially I was using XDM and fluxbox, and I would only experience this when I had to exit X uncleanly (VT switching or a call to init 3 from xterm). Now I have KDM with fluxbox, and I get the results no matter how I try to exit. This is another reason why I belive it is being cause by an incorrect desktop manager setup.
Unfortunately, I am still haven't completely figured out how all this xsession stuff works so I'm not sure what to post.
Here is some general info about my install.
xwindows packages (the K's mean it is not a standard Slackware pkg):
#! /bin/sh
# Xsession - run as user
# Merged in parts of the old Xsession to load defaults from
# Xresources and Xmodmap files, 2006-02-09 volkerdi
session=$1
# This section is borrowed from the old X11 Xsession file:
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/usr/X11R6/lib/X11/xinit/.Xresources
sysmodmap=/usr/X11R6/lib/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -r $sysresources ]; then
/usr/X11R6/bin/xrdb -merge $sysresources
fi
if [ -r $sysmodmap ]; then
/usr/X11R6/bin/xmodmap $sysmodmap
fi
if [ -r $userresources ]; then
/usr/X11R6/bin/xrdb -merge $userresources
fi
if [ -r $usermodmap ]; then
/usr/X11R6/bin/xmodmap $usermodmap
fi
# Note that the respective logout scripts are not sourced.
case $SHELL in
*/bash)
[ -z "$BASH" ] && exec $SHELL $0 "$@"
set +o posix
[ -f /etc/profile ] && . /etc/profile
if [ -f $HOME/.bash_profile ]; then
. $HOME/.bash_profile
elif [ -f $HOME/.bash_login ]; then
. $HOME/.bash_login
elif [ -f $HOME/.profile ]; then
. $HOME/.profile
fi
;;
*/zsh)
[ -z "$ZSH_NAME" ] && exec $SHELL $0 "$@"
emulate -R zsh
[ -d /etc/zsh ] && zdir=/etc/zsh || zdir=/etc
zhome=${ZDOTDIR:-$HOME}
# zshenv is always sourced automatically.
[ -f $zdir/zprofile ] && . $zdir/zprofile
[ -f $zhome/.zprofile ] && . $zhome/.zprofile
[ -f $zdir/zlogin ] && . $zdir/zlogin
[ -f $zhome/.zlogin ] && . $zhome/.zlogin
;;
*/csh|*/tcsh)
# [t]cshrc is always sourced automatically.
# Note that sourcing csh.login after .cshrc is non-standard.
xsess_tmp=`mktemp`
$SHELL -c "if (-f /etc/csh.login) source /etc/csh.login; if (-f ~/.login) source ~/.login; /bin/sh -c export > $xsess_tmp"
. $xsess_tmp
rm -f $xsess_tmp
;;
*) # Plain sh, ksh, and anything we don't know.
[ -f /etc/profile ] && . /etc/profile
[ -f $HOME/.profile ] && . $HOME/.profile
;;
esac
[ -f /etc/xprofile ] && . /etc/xprofile
[ -f $HOME/.xprofile ] && . $HOME/.xprofile
case $session in
"")
exec xmessage -center -buttons OK:0 -default OK "Sorry, $DESKTOP_SESSION is no valid session."
;;
failsafe)
exec xterm -geometry 80x24-0-0
;;
custom)
exec $HOME/.xsession
;;
default)
exec /usr/X11/bin/startfluxbox
;;
*)
eval exec "$session"
;;
esac
exec xmessage -center -buttons OK:0 -default OK "Sorry, cannot execute $session. Check $DESKTOP_SESSION.desktop."
/etc/inittab
Code:
# These are the default runlevels in Slackware:
# 0 = halt
# 1 = single user mode
# 2 = unused (but configured the same as runlevel 3)
# 3 = multiuser mode (default Slackware runlevel)
# 4 = X11 with KDM (requires password at boot)
# 5 = X11 loaded at system init with no password
# 6 = reboot
# Default runlevel. (Do not set to 0 or 6)
id:4:initdefault:
...<SNIPED SLACKWARE DEFAULT>...
# Runlevel 4
x1:4:respawn:/etc/rc.d/rc.4
# Runlevel 5
x2:5:respawn:/etc/rc.d/rc.5
Nothing interesting in X.org log, but not sure what this was in the kdm.log:
Code:
X Window System Version 6.9.0
Release Date: 21 December 2005
X Protocol Version 11, Revision 0, Release 6.9
Build Operating System: Linux 2.4.33.3 i686 [ELF]
Current Operating System: Linux webclient 2.6.15 #1 SMP Sat Dec 30 20:15:36 Local time zone must be set--see zic i686
Build Date: 16 September 2006
Before reporting problems, check http://wiki.X.Org
to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sun Dec 31 01:59:45 2006
(==) Using config file: "/etc/X11/xorg.conf"
Could not init font path element /usr/X11R6/lib/X11/fonts/CID/, removing from list!
QImage::convertDepth: Image is a null image
QImage::smoothScale: Image is a null image
Sorry if this was all useless info, but I'm not sure where to even begin. Any guidance will be greatly appreciated.
Thanks!
...aaron
**edit**
one last thing, all packages from l/ are installed.
**edit again**
Also, if anyone is interested in browsing the current directory tree for this project, it can be found at:
#! /bin/sh
#
# rc.5 This file switches to the webuser and loads X11
# with no password. Use rc.4 for a passworded login.
# If the default username of "webuser" is not used,
# you will need to update this file.
#
#
# Made for Kiox Linux by Aaron Miller (amiller@splashlabs.com)
#
# change this to the user you want to automaticly login when system boots
# (requires default run level 5 in /etc/inittab)
WEBUSER="webuser"
HOME="/home/$WEBUSER"
PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin:/opt/kde/bin"
sudo -u $WEBUSER /bin/bash /usr/X11R6/bin/startx
My problem is with init 4.
This is for a custom kiosk system my company will be using for POS software so I will not be able to release something with such a huge bug. Otherwise I would have just worked around it as you suggested
Thanks!
...aaron
**edit**
By the way, Kiox Linux is essentially a custom Slackware build, but Pat's License prevents me from calling it so.
Good suggestion! I didn't think to try that. Unfortunatly, I got the same results. Logged in as root, opened xterm and ran 'init 3'. Screen blanks with no chance of recovery.
My hard disks are starting to hate me, I had to grab a boot CD and rerun lilo to recover this time.
Next time I will not mount all my other partitions (including my primary install partition) in my test system.
I've played quite a bit with WDM using init 4. I found I could safely exit runlevel 4 by just running 'init 5' from an xterm. Should dump you CLI login.
To try out gnashley's suggestion, I replaced my custom inittab with the stalk Slackware inittab. After that, I could cleanly exit any way I chose. I didn't realize the inittab was the problem, because it was working fine with XDM. I could use runlevel 4 for password login, and my custom implemented runlevel 5 for an auto login.
So this asks the question, why does KDM not like runlevel 5 to be implemented? Did I perhaps do it incorrectly and XDM just didn't really care as much?
I don't really know how to set up a custom runlevel 5, so I just guessed and it appeared to be working (until now obviously).
I guess it's not to important since I was planning to eventually phase this out and use KDM's auto login feature. But I am still curious to know how one would correctly implement their own runlevel.
Thanks again for all the help and suggestions!
...aaron
I've used 5 the same way you show, except for use with WDM, which is similar to XDM. I currently boot using init 4, but rc.4 is modified with an entry before XDM to use WDM instead. I use a standard inittab with default init 3 and pass the init 4 as a boot option.
After login I can run an xterm as root or with su and from there run 'init 5'. It dumps you back to the CLI login, as if rc.4 had not run and no login had occurred. If you really need to be in runlevel 3 you can run 'init 3' after 'init 5'. If you have runlevel 5 setup as you do, this might not work. But I get the same behaviour of locking up when trying to go directly from runlevel 4 to 3.
You might find some useful stuff here: http://distro.ibiblio.org/pub/linux/...jects/AFX-wdm/
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.