LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial 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
 
LinkBack Search this Thread
Old 03-23-2004, 09:14 AM   #1
aggiefl
LQ Newbie
 
Registered: Mar 2004
Posts: 6

Rep: Reputation: 0
Want an X server Running but Not a Desktop


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?

Thanks
 
Old 03-23-2004, 10:47 AM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96
Hi.

Try running 'xinit' instead of 'startx'.

Dave
 
Old 03-23-2004, 10:53 AM   #3
bnice
Member
 
Registered: Feb 2004
Location: Sacramento, CA
Distribution: Slack 9.1, slackware-current
Posts: 284

Rep: Reputation: 30
Quote:
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.
 
Old 03-23-2004, 11:50 AM   #4
aggiefl
LQ Newbie
 
Registered: Mar 2004
Posts: 6

Original Poster
Rep: Reputation: 0
bnice,

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.

#!/bin/sh
# (c) 1999-2002 Red Hat, Inc.

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

# 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

Last edited by aggiefl; 03-23-2004 at 11:57 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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i see which desktop is running? mattie_linux Linux - General 1 05-31-2005 05:32 PM
Running more than 2 desktop environment? johnleeryan Linux - Newbie 5 02-17-2005 05:48 PM
Split an X desktop accross 2 monitors ( so i only need 1 X server running ) ronanio Slackware 2 09-10-2004 07:53 AM
what desktop am i running? naijaguy Linux - Newbie 12 08-19-2004 11:25 AM
Running program from desktop sarasf Linux - Newbie 2 08-26-2003 09:58 PM


All times are GMT -5. The time now is 10:18 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