WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: PiCore-12 64-bit kiosk mode Firefox  (Read 11141 times)

Offline audiophilelistener

  • Newbie
  • *
  • Posts: 16
PiCore-12 64-bit kiosk mode Firefox
« on: January 21, 2021, 12:39:02 PM »
I'm a beginner with piCore, but it looks great and fast.
I'm trying to make a piCoreplayer with a kiosk-mode browser
The latest piCoreplayer (7.0.0) is based on piCore-12 64-bit
It is a very dismantled version of piCore to keep it fast

As far as I tried, I can get Firefox working in full GUI-mode, by installing xorg, xprogs, flwm, war and firefox
But I don't want the full GUI.
I just want Firefox to start a specific webpage on a touchscreen
I think I don't need xprogs, flwm and war. Am I right?
I only cannot get firefox to start this way.
Can onyone help me out, please?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11696
Re: PiCore-12 64-bit kiosk mode Firefox
« Reply #1 on: January 21, 2021, 03:16:14 PM »
Hi audiophilelistener
Welcome to the forum.

... I think I don't need xprogs, flwm and war. Am I right? ...
I don't think you need them either.

Try this. Create a file (pick any name you like) containing the following:
Code: [Select]
DISPLAY=:0 firefox &Place that file in  ~/.X.d
When you start X, the  ~/.xsession  file should execute that command after Xorg starts.

Offline audiophilelistener

  • Newbie
  • *
  • Posts: 16
Re: PiCore-12 64-bit kiosk mode Firefox
« Reply #2 on: January 21, 2021, 03:52:07 PM »
Hi Rich,

Thx for your kind reply.
I’m going to try that.

How can I start that automatically?
And how can I prevent the screen-sleep?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11696
Re: PiCore-12 64-bit kiosk mode Firefox
« Reply #3 on: January 21, 2021, 04:06:48 PM »
Hi audiophilelistener
If you create the file I described above and install Xorg, It should all start automatically every time you boot. Make sure
you run a backup after creating the file.

There are some things in Firefox that won't work without a window manager. The drop downs from the
menu (File Edit View History .... ) will flash and disappear. The same holds true for the address bar.

Offline audiophilelistener

  • Newbie
  • *
  • Posts: 16
Re: PiCore-12 64-bit kiosk mode Firefox
« Reply #4 on: January 21, 2021, 04:19:33 PM »
That should no be a problem. Even in fact, just what I want.
I only need to put the desired webpage somewhere.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11696
Re: PiCore-12 64-bit kiosk mode Firefox
« Reply #5 on: January 21, 2021, 10:57:56 PM »
Hi audiophilelistener
... There are some things in Firefox that won't work without a window manager. The drop downs from the
menu (File Edit View History .... ) will flash and disappear. The same holds true for the address bar.
I take that back. They do work. I left out the trailing ampersand when I first tried it. Once I included it all of
the drop downs worked.

If you start it like this:
Code: [Select]
DISPLAY=:0 firefox --kiosk &then Firefox will start with no menus. I don't think it will support multiple tabs in this mode either.

Offline audiophilelistener

  • Newbie
  • *
  • Posts: 16
Re: PiCore-12 64-bit kiosk mode Firefox
« Reply #6 on: January 22, 2021, 03:46:47 AM »
Ah, that's nice.
Thx for trying.

Where should I place the webpage to visit?

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 722
Re: PiCore-12 64-bit kiosk mode Firefox
« Reply #7 on: January 22, 2021, 04:16:57 AM »
Just add the url to your command.


Code: (bash) [Select]
firefox --kiosk https://www.google.com &

Look at the help for more command line args.

Code: (bash) [Select]
firefox --help

Offline audiophilelistener

  • Newbie
  • *
  • Posts: 16
Re: PiCore-12 64-bit kiosk mode Firefox
« Reply #8 on: January 22, 2021, 05:21:26 AM »
Working great so far.

Couple of things left:
- disable screen-sleep
- remove mouse pointer (while keeping touch-input, which is still a kind of mouse I think)
- how to start firefox full-screen
- can I skip the tinycore screen just before starting firefox

You're a great help
Thx
« Last Edit: January 22, 2021, 05:24:39 AM by audiophilelistener »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11696
Re: PiCore-12 64-bit kiosk mode Firefox
« Reply #9 on: January 22, 2021, 09:34:19 AM »
Hi audiophilelistener
... - remove mouse pointer (while keeping touch-input, which is still a kind of mouse I think) ...
So you don't want that little arrow obstructing your view when using the touch screen? I may have what you are looking for.
A while back I wrote a little program called HideMouse that will do that for you:
http://forum.tinycorelinux.net/index.php/topic,23615.0.html

The second post in that thread has instructions on building it in 4 easy steps. A script does all of the work for you.

Offline audiophilelistener

  • Newbie
  • *
  • Posts: 16
Re: PiCore-12 64-bit kiosk mode Firefox
« Reply #10 on: January 22, 2021, 11:17:25 AM »
Hi Rich,

The HideMouse is not working yet.
I downloaded everyting from 11.x/X86_64/
But I don't think it works under piCore-12 (64)
Otherwise I'm doing something wrong

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11696
Re: PiCore-12 64-bit kiosk mode Firefox
« Reply #11 on: January 22, 2021, 02:31:49 PM »
Hi audiophilelistener
... The HideMouse is not working yet.
I downloaded everyting from 11.x/X86_64/ ...
What do you mean by everything? The only thing you needed to download was  HideMouse-source-v0.1.tar.gz. That's
what that  wget  command does. Did you read the instructions in reply #1 in that thread?

Offline audiophilelistener

  • Newbie
  • *
  • Posts: 16
Re: PiCore-12 64-bit kiosk mode Firefox
« Reply #12 on: January 23, 2021, 08:06:14 AM »
Hi Rich,

At first I downloaded the files HideMouse.tcz, HideMouse.tcz.dep, and HideMouse.tcz.md5.txt from the v11.x repo, to see if they worked out of the box.
But they didn't.
Now I have compiled it like you described.

Tar didn't make a HideMouse directory. But I could work around that, by making it myself and copying everything in there.

Upon loading "HideMouse &", I got an error (see below)
After executing "startx" I still have a mousepointer visible.

Am I doing something wrong, or what?
Hope you can help.

Code: [Select]
tc@pCP:/mnt/mmcblk0p2/tce/HideMouse$ ls -al
total 116
drwxr-xr-x    3 tc       staff         4096 Jan 23 13:41 ./
drwxrwxr-x    6 tc       staff         4096 Jan 23 13:36 ../
-rwxr-xr-x    1 tc       staff         5163 Jan 22 09:36 CompileHideMouse
-rwxr-xr-x    1 tc       staff         8360 Jan 23 13:41 HideMouse
-rw-r--r--    1 tc       staff         1821 Mar 12  2020 HideMouse-License.txt
-rw-r--r--    1 tc       staff         9222 Jan 23 13:41 HideMouse-aarch64.tar.gz.bfe
-rw-r--r--    1 tc       staff         4295 Jan 23 13:41 HideMouse-source-v0.1.tar.gz
-rw-r--r--    1 tc       staff         6329 Mar  6  2020 HideMouse.c
-rw-r--r--    1 tc       staff        20152 Jan 23 13:41 HideMouse.o
-rw-r--r--    1 tc       staff         4624 Jan 23 13:41 HideMouse.tar.gz
-rw-r--r--    1 tc       staff         4096 Jan 23 13:41 HideMouse.tcz
-rw-r--r--    1 tc       staff           14 Jan 23 13:41 HideMouse.tcz.dep
-rw-r--r--    1 tc       staff         1106 Jan 23 13:41 HideMouse.tcz.info
-rw-r--r--    1 tc       staff           78 Jan 23 13:41 HideMouse.tcz.list
-rw-r--r--    1 tc       staff           48 Jan 23 13:41 HideMouse.tcz.md5.txt
drwxr-xr-x    3 tc       staff         4096 Jan 23 13:41 pkg/
-rw-r--r--    1 tc       staff           59 Jan 23 13:41 submitqc.txt
tc@pCP:/mnt/mmcblk0p2/tce/HideMouse$ cp HideMouse.tcz /mnt/mmcblk0p2/tce/optional/
tc@pCP:/mnt/mmcblk0p2/tce/HideMouse$ cp HideMouse.tcz.dep /mnt/mmcblk0p2/tce/optional/
tc@pCP:/mnt/mmcblk0p2/tce/HideMouse$ cp HideMouse.tcz.md5.txt /mnt/mmcblk0p2/tce/optional/
tc@pCP:/mnt/mmcblk0p2/tce/HideMouse$ tce-load -i HideMouse
HideMouse.tcz: OK
tc@pCP:/mnt/mmcblk0p2/tce/HideMouse$ HideMouse &
tc@pCP:/mnt/mmcblk0p2/tce/HideMouse$ Error line: 88
Success

[1]+  Done(1)                    HideMouse

    [EDIT]: Replaced  tt  tags with  code  tags.  Rich
« Last Edit: January 23, 2021, 09:25:52 AM by Rich »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11696
Re: PiCore-12 64-bit kiosk mode Firefox
« Reply #13 on: January 23, 2021, 09:37:12 AM »
Hi audiophilelistener
Please use  Code Tags  when posting commands and responses seen in a terminal. To use  Code Tags  click on the  #  icon
above the reply box and paste your text between the  Code Tags  as shown in this example:

Quote
[code][   36.176529] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[   36.176536] pcm512x 1-004d: Failed to get supplies: -517
[   36.191753] pcm512x 1-004d: Failed to get supply 'AVDD': -517[/code]

It will appear like this in your post:
Code: [Select]
[   36.176529] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[   36.176536] pcm512x 1-004d: Failed to get supplies: -517
[   36.191753] pcm512x 1-004d: Failed to get supply 'AVDD': -517

Code Tags  serve as visual markers between what you are trying to say and the information you are posting. They also preserve
spacing so column aligned data displays properly. Code tags also automatically add horizontal and or vertical scrollbars
to accommodate long lines and listings.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11696
Re: PiCore-12 64-bit kiosk mode Firefox
« Reply #14 on: January 23, 2021, 09:51:07 AM »
Hi audiophilelistener
... Upon loading "HideMouse &", I got an error (see below)
After executing "startx" I still have a mousepointer visible.

Am I doing something wrong, or what? ...
Yes. You can't hide the cursor because it doesn't exist. You need to run  startx  first.

Create a file in ~/.X.d called  Hide  with the following contents:
Code: [Select]
HideMouse &
sleep 1
echo h > /tmp/HideMouse
Then run  startx  and see if the cursor is still visible.