WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: .xsession bypassed in remaster script  (Read 2364 times)

Offline kzpm

  • WikiUser
  • *
  • Posts: 16
.xsession bypassed in remaster script
« on: August 02, 2013, 04:27:05 AM »
Dear tc users,

I'm still working on een tiny core -webkiosk remaster script, that is supposed to be executed on a debian based system (at this moment Crunchbang).

After reading the http://wiki.tinycorelinux.net/wiki:the_boot_process wiki boot manual, it is still not clear to me how to overcome startup problems:

In my script I first unpacked the core
Code: [Select]
zcat -q core.gz | cpio -i -H newc -d[/core]. I'm using Xvesa, not Xorg..
After that I created .xsession. Why? Well the .xsession file was not created at runtime, so I decided to force the creation of .xsession file. This is how I did it:


[code]#Create .xsession (Startup X)
cd $HOME/initrd/home/tc/                                       
sudo touch .xsession && sudo chmod 0777 .xsession
cat >> .xsession <<EOF
#!/bin/sh
echo "Start X.."
startx
sudo -u tc sh /home/tc/.X.d/startkiosk
EOF
sudo chmod a+x .xsession

After this piece of scripting I created a startup script for the opera kiosk in /home/tc/.X.d ( The wiki and forum tought me that is the place to execute programs that have to be started on boot.

Code: [Select]
cd $HOME/initrd/home/tc/.X.d/
sudo touch startkiosk && sudo chmod 0777 startkiosk
sudo cat >> startkiosk <<EOF
#!/bin/sh
echo "startkiosk.."
tce-load -i $TCZS

while true; do

    #rsync -qr --delete --exclude='.Xauthority' /opt/ $HOME/
   tce-run opera-next -fullscreen "website"

done

EOF
sudo chmod a+x startkiosk

Unfortunally my script ends up at the boot prompt. At that point I have to load all tcz's manually by entering
Code: [Select]
tce-load -i Xprogs (Xlibs and fltk-XX are installed with Xprogs) Xvesa openssl fontconfig expat2 opera-next
After that I have to enter "startx" manually. Then the desktop loads without wbar (that's okay for a webkiosk I think) but opera-next is not fired. I have to push CTRL+ALT+ENTER to invoke a terminal and type the opera-next startup comment.

It seems to me my script does not parse onboot.lst, .xsession and my custom "startkiosk" script.

What measures can I take, to ensure opera-next is being executed without manually entering commands at the boot prompt?

Thanks very much for your effort in advance!

Kind regards,

Kees Epema



Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10225
Re: .xsession bypassed in remaster script
« Reply #1 on: August 02, 2013, 05:38:48 AM »
.X.d is called from out shipped .xsetup, so since you overwrote it with your own, and your version doesn't call .X.d scripts, it's expected your startkiosk script is not called.

Also, startx calls .xsession, so you have an inifinite loop set up there. Startx in turn is only called if the X extensions have been loaded by the boot process.

Please start with getting a normal boot with all your extensions loaded, without touching any scripts. Once you have that working, edit .xsetup or add an .X.d script.
« Last Edit: August 02, 2013, 05:40:34 AM by curaga »
The only barriers that can stop you are the ones you create yourself.

Offline kzpm

  • WikiUser
  • *
  • Posts: 16
Re: .xsession bypassed in remaster script
« Reply #2 on: August 03, 2013, 01:20:02 AM »
Thanks very much Curaga!

Your suggestion to strip down the script snippets and concentrate on correctly loading extensions worked very well!
The problem has been solved. I can go on now, thanks again.

Kind regards,
Kees Epema