Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: emninger on November 04, 2015, 09:09:52 AM

Title: How is fluxbox started by TCL
Post by: emninger on November 04, 2015, 09:09:52 AM
Since there is no .xinitrc it's not really clear to me, how tinycorelinux starts fluxbox (which is my preferred window manager)? IOW, what's the chain that ends up with
Code: [Select]
startfluxbox?

From the console,
Code: [Select]
startx works ... ?
Title: Re: How is fluxbox started by TCL
Post by: hiro on November 04, 2015, 09:40:26 AM
.xsession
Title: Re: How is fluxbox started by TCL
Post by: emninger on November 17, 2015, 09:26:11 AM
.xsession

It's a bit late, but i'm coming back to the question (startup sequence) now: IIRC - in linux - the startx command presumes the existence of ~/.xinitrc (?)

Moreover, sorry, but i'm not really familiar with scripting, i do not see precisely where in *MY* .xsession fluxbox is called.I presume it might be this:
Code: [Select]
"$DESKTOP" 2>/tmp/wm_errors &
export WM_PID=$!

If so, where is the "$DESKTOP" defined?

Thanks a lot for your patience.
Title: Re: How is fluxbox started by TCL
Post by: Rich on November 17, 2015, 09:33:42 AM
Hi emninger
Desktop is defined in  /etc/sysconfig/desktop. The  /etc/init.d/tc-config  sets the  DESKTOP  environmental variable
which is then used by  .xsession  to start it.
Title: Re: How is fluxbox started by TCL
Post by: Misalf on November 17, 2015, 09:40:21 AM
Some extensions have a startup script located at  /usr/local/tce.installed/  and executed upon loading the extension.
In case of Fluxbox it is  /usr/local/tce.installed/fluxbox  which writes to  /etc/sysconfig/desktop .
startx  reads  /etc/sysconfig/desktop  and exports its value as variable before executing  ~/.xsession .

If you load any other window manager,  /etc/sysconfig/desktop  gets rewritten with the respective value (e.g. openbox).
Title: Re: How is fluxbox started by TCL
Post by: emninger on November 17, 2015, 12:21:35 PM
Thanks a lot to you both! You're good teachers! :D
Title: Re: How is fluxbox started by TCL
Post by: hiro on November 18, 2015, 12:45:47 AM
startx doesn't read /etc/sysconfig/desktop, it happens before startx.
Title: Re: How is fluxbox started by TCL
Post by: Misalf on November 18, 2015, 01:11:25 AM
Both,  tc-config  as well as  startx  read  /etc/sysconfig/desktop .
Where  /etc/sysconfig/desktop  doesn't exist until created by an extension (f.e. flwm_topside.tcz).

from  /etc/init.d/tc-config  (core.gz)
Code: [Select]
# If desktop is specified use that
if [ -n "$DESKTOP" ]; then
echo "$DESKTOP" > /etc/sysconfig/desktop
else
[ -s /etc/sysconfig/desktop ] && DESKTOP=`cat /etc/sysconfig/desktop`
fi

from  /usr/bin/startx  (Xlibs.tcz)
Code: [Select]
if [ -s /etc/sysconfig/desktop ]; then
export DESKTOP=`cat /etc/sysconfig/desktop`
[ `which "$DESKTOP"` ] || tce-load -i "$DESKTOP".tcz 2>&1 >/dev/null
if [ "$?" != 0 ]; then
[ -f /etc/sysconfig/cde ] && tce-load -i $(cat /etc/sysconfig/cde)/"$DESKTOP".tcz 2>&1 >/dev/null
if [ "$?" != 0 ]; then
echo Requested "$DESKTOP" could not be loaded.
exit 1
fi
fi
setupdesktop
fi
Title: Re: How is fluxbox started by TCL
Post by: hiro on November 18, 2015, 02:08:34 AM
oops