WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How is fluxbox started by TCL  (Read 2642 times)

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
How is fluxbox started by TCL
« on: November 04, 2015, 12:09:52 PM »
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 ... ?

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: How is fluxbox started by TCL
« Reply #1 on: November 04, 2015, 12:40:26 PM »
.xsession

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
Re: How is fluxbox started by TCL
« Reply #2 on: November 17, 2015, 12:26:11 PM »
.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.

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11622
Re: How is fluxbox started by TCL
« Reply #3 on: November 17, 2015, 12:33:42 PM »
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.

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: How is fluxbox started by TCL
« Reply #4 on: November 17, 2015, 12:40:21 PM »
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).
Download a copy and keep it handy: Core book ;)

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
Re: How is fluxbox started by TCL
« Reply #5 on: November 17, 2015, 03:21:35 PM »
Thanks a lot to you both! You're good teachers! :D

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: How is fluxbox started by TCL
« Reply #6 on: November 18, 2015, 03:45:47 AM »
startx doesn't read /etc/sysconfig/desktop, it happens before startx.

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: How is fluxbox started by TCL
« Reply #7 on: November 18, 2015, 04: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
Download a copy and keep it handy: Core book ;)

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: How is fluxbox started by TCL
« Reply #8 on: November 18, 2015, 05:08:34 AM »
oops