Linux - GeneralThis 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.
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.
I am running RedHat 9, with Ximian desktop. I have a multi-monitor setup and am trying to run a GTK program I built for Meteorological Displays on each monitor. I want to run in level 3 (multiuser mode) with and x server running but I do not want to load a desktop. When I telinit 3 I can't run my program because there is no X server running, so I "startx", and it automatically loads the desktop. I've hunted through various files and can't quite determine where to prevent the desktop from loading when I run startx, at least I am hesitant to start commenting out stuff that I don't fully understand.
To sum up I want init level 3, X server, but no desktop, eventually I will add the "startx" to a boot time script that starts X with level 3, but again I do not want the desktop to load, how can I accomplish this?
To sum up I want init level 3, X server, but no desktop, eventually I will add the "startx" to a boot time script that starts X with level 3, but again I do not want the desktop to load, how can I accomplish this?
To start in runlevel 3 edit /etc/inittab, the first uncommented line should look like this. Yours probably has a 4 in it now:
Code:
# Default runlevel. (Do not set to 0 or 6)
id:3:initdefault:
To start X with no WD/Desktop, find your xinitrc file- usually /etc/X11/xinit/xinitrc- the last line starts your WM/Desktop. Comment it out and call the program you want to run instaed.
Check for a hidden file in your home directory called .xinitrc (do ls -a) if it's there, it will override /etc/X11/xinit/xinitrc so make your changes there.
Sorry, but which line in the xinitrc file do I comment out? Here's the file:
I have no .xinitrc so it's grabbing the system xinitrc, this calls Xclients that loads the desktop? The last elif statement in the below file right? I don't know this scripting language stuff but I can kind of gather what it's doing.
# 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
# run all system xinitrc shell scripts.
for i in /etc/X11/xinit/xinitrc.d/* ; do
if [ -x "$i" ]; then
. "$i"
fi
done
# The user may have their own clients they want to run. If they don't,
# fall back to system defaults.
# set up ssh agent environment if available.
if [ -f $HOME/.Xclients ]; then
[ -x /usr/bin/ssh-agent -a -z "$SSH_AGENT_PID" ] && \
exec ssh-agent $HOME/.Xclients || \
exec $HOME/.Xclients
elif [ -f /etc/X11/xinit/Xclients ]; then
[ -x /usr/bin/ssh-agent -a -z "$SSH_AGENT_PID" ] && \
exec ssh-agent /etc/X11/xinit/Xclients || \
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.