WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Boot sequence for browser kiosk based on TinyCore-current  (Read 10244 times)

Offline kzpm

  • Newbie
  • *
  • Posts: 16
Boot sequence for browser kiosk based on TinyCore-current
« on: July 26, 2013, 10:45:43 AM »
Dear tc_people,


I'm fairly stuck trying to remaster a kiosk browser based on TinyCore-current.iso. I used the remastering guide and silvolli's remaster script in TinyCore wiki
to accomplish this task.

My goal is to deploy a (kiosk)browser only image, for primary education in The Netherlands.
Maybe you know that Dutch education heavily depends on Microsoft solutions..


I'm trying to build the remaster script on a Crunchbang system (Debian). This is the system we currently use in our pc-room at school.

While building I made some assumptions, that maybe incorrect. I really need a guiding hand to understand what is going on..

According to the boot_process wiki, all X programs should be executed at runtime in home-tc-.xsession ( -> Xvesa, wbar and a window manager).
Other programs should be executed from bootlocal.sh (like opera and wicd).


When testing the resulting iso in qemu or virtual box I receive messages about invalid arguments while mounting programs to loop(x).
Finally the Xsystem fails to start. When typing 'startx' it results in "-sh startx not found".

The Tinycore forum pointed out that this error could be caused by a dependency issue.
So I checked all *tcz.dep files in distro ibiblio org and downloaded all dependencies in a seperate repository on my hard disk.
Every time I run the script, all *.tcz(l) files and *tcz.md5.txt are now loaded into -etc-sysconfig-tcedir-optional.

In .xsession I use the following startup-sequence for X programs:
- sudo -u tc tce-run Xvesa
- sudo -u tc tce-run Xprogs
- sudo -u tc tce-run evilwm


In bootlocal.sh the start up sequence is as following:

- sudo -tc tce-run wicd (wireless set) #results in "cannot mount libglade: invalid argument"
while true; do

    #rsync -qr --delete --exclude='.Xauthority' -home-tc #executing rsync returns syntax error
    sudo -u tc tce-run opera --kioskmode "somewebsite" #Results in mount error on loopx and invalid argument

done


The contents of the onboot.lst, copy2fs.lst and xbase.lst in cde directory, are al the same, the sequence in all these files is:

Xvesa.tcz
Xprogs.tcz
openssl-1.0.0.tcz
evilwm.tcz
opera.tcz
wicd.tcz


As bootoptions I've included showapps dhcp desktop=evilwm xsetup.
While booting the xsetup flag is not executed.

Has anyone suggestions how to proceed?

Thanks very much in advance!

Kind regards,
Kees Epema









Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: Boot sequence for browser kiosk based on TinyCore-current
« Reply #1 on: July 26, 2013, 11:26:49 AM »
Maybe instead of
 sudo -u tc "..."
try
 su "$USER" -c "..."

as in tc-config
Download a copy and keep it handy: Core book ;)

Offline Lee

  • Hero Member
  • *****
  • Posts: 645
    • My Core wiki user page
Re: Boot sequence for browser kiosk based on TinyCore-current
« Reply #2 on: July 26, 2013, 02:37:31 PM »
I'm not sure if any of this will help, but some observations that won't hurt:

If startx is not found, it implies that Xlibs.tcz is not loaded.  Check to see that the extensions listed in onboot.lst (and all of their dependencies) are really loaded - not just that they are present in /etc/sysconfig/tcedir/optional, but are they listed in /tmp/tcloop (mounts) and /usr/local/tce.installed ?

I don't think there is a "dhcp" boot code - if "nodhcp" is not specified, the default is to use dhcp.  Extraneous unknown boot codes don't hurt anything but probably won't have the effect you expect unless you explicitly code for them.

You can start X programs from .xsession but I think the accepted method is to have a start script in ~/.X.d.  Scripts there are sourced (no need for a shebang) after X starts.

The desktop=evilwm boot code should not be necessary if evilwm is the only window manager loaded.

Also, I've never tried it but I believe that to run a browser-only kiosk you can simply run the browser -instead of- the window manager.


32 bit core4.7.7, Xprogs, Xorg-7.6, wbar, jwm  |  - Testing -
PPR, data persistence through filetool.sh          |  32 bit core 8.0 alpha 1
USB Flash drive, one partition, ext2, grub4dos  | Otherwise similar

Offline kzpm

  • Newbie
  • *
  • Posts: 16
Re: Boot sequence for browser kiosk based on TinyCore-current
« Reply #3 on: July 28, 2013, 07:34:49 AM »
Dear misalf and Lee,

Thanks very much for your suggestions in the first place!

To Lee:
I checked /tmp/tcloop
Within this directory the following directories exists:

tmp/tcloop/Xprogs (contains subdir usr)
tmp/tcloop/Xlibs (contains subdirs /etc /usr and /var)
tmp/tcloop/Xvesa (contains nothing, no subdirs)
tmp/tcloop/opera (contains nothing, no subdirs)
tmp/tcloop/fltk-1.1.10 (contains subdir usr)

It seems interesting to me that both Xvesa and opera directories are empty. Especially these programs are causing the mount errors ("could not mount ....: Invalid argument") during boot.

As a matter of fact /usr/local/tce.installed only contains Xprogs, fltk-1.1.10 and Xlibs. So, no Xvesa and no opera.

Do you still think this could be caused by missing dependencies?

It is also very interesting to leave out the window manager and to run the browser without a window manager! I'll try to find more info about that issue.

Regards, Kees



 


Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11624
Re: Boot sequence for browser kiosk based on TinyCore-current
« Reply #4 on: July 28, 2013, 09:04:29 AM »
Hi kzpm
I suspect you might have run out of RAM. Try deleting the  copy2fs.lst  file and see if it works any better.

Offline kzpm

  • Newbie
  • *
  • Posts: 16
Re: Boot sequence for browser kiosk based on TinyCore-current
« Reply #5 on: July 29, 2013, 07:10:15 PM »
Thanks again for your help!

Finally the "working"solution to avoid the "mount ...: invalid argument" error, was to replace Xvesa and opera with a new download of these two files from the tcz repo from distro.ibiblio.org.
Just that simple...:)

Thanks very much anyway!

Kind regards
Kees


Offline Zendrael

  • Sr. Member
  • ****
  • Posts: 363
    • Zendrael's home of projects
Re: Boot sequence for browser kiosk based on TinyCore-current
« Reply #6 on: August 05, 2013, 05:34:59 PM »
Hello kzpm!

Are looking for something like this? http://www.youtube.com/watch?v=C7JTW-ZeIT8

The project is built up with CorePlus and Firefox.

Offline kzpm

  • Newbie
  • *
  • Posts: 16
Re: Boot sequence for browser kiosk based on TinyCore-current
« Reply #7 on: August 06, 2013, 02:11:47 PM »
Hello Zendrael!

Thanks for posting your video link! Real cool OS!!
It looks like that your setup with xcore86 and firefox is exactly what I am trying to reach at this moment. As a matter of fact, my kiosk browser is now operational. The only things I need to do is to include wireless support and lock the system down (ctrl-alt-backsp and ctrl-alt-F1).
Did you wrote a script for your kiosk setup?

Kind regards, Kees

Offline Zendrael

  • Sr. Member
  • ****
  • Posts: 363
    • Zendrael's home of projects
Re: Boot sequence for browser kiosk based on TinyCore-current
« Reply #8 on: August 06, 2013, 03:04:25 PM »
Hello Kzpm!

I wrote a firefox add-on/extension and two scripts but I'm waiting for the Core 5 release to do a remaster of the OS, so anyone could benefit from it.

The browser runs without the caption of the window manager, but a window manager (openbox) is used to handle messages or other windows. I set it up to everytime ignore new windows and try to open them in new tabs.

There are no other stuff running together, only the browser. I also added a menu item to call exittc and shutdown or restart the system.

Nice to hear that your project is operational!

Offline kzpm

  • Newbie
  • *
  • Posts: 16
Re: Boot sequence for browser kiosk based on TinyCore-current
« Reply #9 on: August 17, 2013, 08:55:33 AM »
Hi Zendrael,

Do you mean you only use Xvesa or Xorg without wm to fire up the browser?
I managed to get this working also. I have no wm installed at all.

Due to variety in specs of hardware, I had to load a bunch of extensions (samba for printing in windows environments, wicd for wireless scanning dropbear for remote adminstration,..) so the webkiosk is not that tiny anymore (about 111 mb).

What is the size of your iso? Did you include some remote administration tools or other extensions to get your kiosk working on unknown hardware specs?

Offline godzilla8nj

  • Newbie
  • *
  • Posts: 1
Re: Boot sequence for browser kiosk based on TinyCore-current
« Reply #10 on: December 31, 2013, 06:41:00 PM »
Would you consider posting your build details? I've never used Tiny Core but am investigating it for use in a web kiosk generating website I want to build for non-technical users (info here: http://www.reddit.com/r/linux/comments/1iclud/help_with_linuxbased_web_kiosk/.)

Offline Zendrael

  • Sr. Member
  • ****
  • Posts: 363
    • Zendrael's home of projects
Re: Boot sequence for browser kiosk based on TinyCore-current
« Reply #11 on: January 02, 2014, 05:13:27 AM »
Hi all!

@kzpm: As much as you try to let things simple and pretty to the end user, the size of the iso and the applications will grow more and more... And for some reasons you will end up using a wm too. The more simple way to do what I do in LeafWeb is the how-to described in the CoreBook pdf avaiable here in the forum. I reccomend you to check it out.

@godzilla8nj: you can read the CoreBook chapter about webKiosk, I think it will be helpful to you as a starting point.