How to boot directly to firefox –kiosk

Forum Forums New users New Users and General Questions How to boot directly to firefox –kiosk

  • This topic has 12 replies, 6 voices, and was last updated Mar 10-5:21 pm by RJP.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #101640
    Member
    synchron

      Hi,

      i installed AntiX on an 20 years old 32bit netbook and it works great.
      Now i try to change this little laptop into a kiosk for my little daughter.

      Therefore i only want her to play around with only one, locally served website i create for her.
      I managed to get an apache up and running at startup so the website is there.
      And if i execute “startx firefox_startscript.sh” from a console (which only makes a “firefox –kiosk http://localhost”) i end up with what i want.

      But here is my problem.
      I cant suppress the displaymanager on startup to direktly start this script.
      The best i can do is to start it after the desktop is loaded via the “./desktop-session/startup” file. But this would show the desktop for nearly 15 seconds and enables the closing of firefox with alt+f4. so this is not a solution i can take.

      I hope someone has an idea how to achive this.

      Adding my own firefox.dektop file to /usr/share/xsession was a failure and didnt work.
      Directly changing /usr/local/bin/desktop-session broke my systemlogin 😀

      So what i want at the end:
      – autologin
      – immediate execution of “firefox –kiosk http://localhost”

      Thanks

      #101641
      Member
      PPC
        Helpful
        Up
        0
        ::

        Hi and welcome to antiX
        What you want is easily acheived:

        * Autologin can be set up during installation. If you did not select that option, you can do it any time, if I recall corecctly via: antiX Menu > Control Centre > “Maintenence” tab > Manage Users > …

        * To add any command to the startup of antiX: antiX Menu > Control Centre > “Session” tab > Click the green icon with the white rocket > in the “startup” tab, add the command you want to be run at startup, on the bottom of the file, ex: firefox –kiosk http://localhost&#8221 , adding a space and and & at the end. Save the file. That command should run automatically the next time you start antiX.

        #101642
        Member
        RJP
          Helpful
          Up
          0
          ::

          How about if you enable autostart and make autostart file for firefox?

          mkdir -p /home/username/.config/autostart
          
          geany /home/username/.config/autostart/firefox.desktop

          …. a contents

          [Desktop Entry]
          Type=Application
          Name=Firefox
          Comment=Surf internet
          Exec=firefox -kiosk -private-window "http://localhost/" &
          • This reply was modified 2 months ago by RJP.
          • This reply was modified 2 months ago by RJP.
          #101645
          Member
          synchron
            Helpful
            Up
            0
            ::

            Thanks @PPC for your suggestion. But like i described i tried this solution via the “./desktop-session/startup” file and it ends up showing round about 15 seconds the Desktop until the firefox-kiosk came up. So this is no solution.

            Thanks @RJP for your answer. I tried it but did not get it running. I changed the LOAD_XDG_AUTOSTART option in ~/.desktop-session/desktop-session.conf to true, but my firefox.desktop file seems not to be loaded. Firefox does not open on startup.

            Maybe my goal was not precise enough.
            I dont want to start rox-icewm or any other desktop. I want to direktly start firefox. This is possible by passing the openningscript directly to “startx”. I tried this from another console-screen via ctrl+alt+f6.

            To make it clearer:
            My goal is to autologin to console without starting a desktop and executing the firefoxstartupscript.

            Thanks

            #101647
            Member
            RJP
              Helpful
              Up
              0
              ::

              Just googling.

              https://raspberrypi.stackexchange.com/questions/107148/how-to-open-firefox-in-kiosk-mode-and-point-to-a-webpage

              Then you’ll need to install xdotool, which is a tool to do fake keyboard input, among others.

              sudo apt install xdotool
              Then, in your autostart file you add the following:

              firefox -kiosk -private-window “http://localhost/” &
              sleep 10

              xdotool search –sync –onlyvisible –name firefox key F11

              • This reply was modified 2 months ago by RJP.
              #101649
              Member
              Xunzi_23
                Helpful
                Up
                0
                ::

                Firefox needs an environment, ie a display manager.
                You can start for example ICEWM without taskbar, menu and
                having a plain background until Firefox comes up.

                #101650
                Member
                RJP
                  Helpful
                  Up
                  0
                  ::

                  Actually F

                  Firefox needs an environment, ie a display manager.
                  You can start for example ICEWM without taskbar, menu and
                  having a plain background until Firefox comes up.

                  Actually Firefox can be started into xinit after console user setup.

                  An example
                  xinit firefox -- :1

                  • This reply was modified 2 months ago by RJP.
                  #101652
                  Member
                  synchron
                    Helpful
                    Up
                    0
                    ::

                    Hi, thanks for your answers.
                    But sadly they dont help me much.

                    I know how to start firefox in kioskmode pointing to a website.
                    Like i said and you can try it.

                    press ctrl+alt+F6 to go to a console
                    login with a user
                    execute the following two commands:

                    
                    echo "firefox --kiosk http://antixforum.com" > /tmp/firefoxkiosk.sh
                    startx /tmp/firefoxkiosk.sh
                    

                    And there it is. A Fullscreen Firefox showing the Forum.

                    @Xunzi_23 So you can see that i dont need a running Desktop to start firefox
                    @RJP I dont need to fake keyboardinput

                    • This reply was modified 2 months ago by synchron.
                    #101656
                    Forum Admin
                    anticapitalista
                      Helpful
                      Up
                      0
                      ::

                      Try removing the login manager (slimski)

                      Philosophers have interpreted the world in many ways; the point is to change it.

                      antiX with runit - leaner and meaner.

                      #101659
                      Member
                      zblsv
                        Helpful
                        Up
                        0
                        ::

                        So, you want to start only X-server and Firefox as X-client. Out of the box, antiX starts Display Manager (slim or slimski, for instance) and the Display Manager starts X-server and Window Manager (IceWM or Fluxbox). The Window Manager starts Firefox. You can drop Display Manager and replace it with custom script that will start X-server and Firefox. Or you can drop Window Manager and replace it with script that will start Firefox. The difference is of what must happen when Firefox will exit. If you replace Window Manager then login widget will be shown by slimski. If you replace Display Manager then your custom script will be responsible for that.

                        Words are carried away by the wind...

                        #101661
                        Member
                        synchron
                          Helpful
                          Up
                          0
                          ::

                          Yes! That was a great idea @anticapitalista

                          I removed the packages slimski and slimsky-themes-extra-antix
                          After that, the pc boots into console, but without autologin.
                          So i changed the /etc/inittab at this line inserting the autologin:
                          c1:2345:respawn:/sbin/agetty --autologin <username> --noclear 38400 tty1 linux
                          Now the login worked and the only thing was to start firefox.
                          For that i choosed a dirty way with the .bashrc
                          i added:

                          ffrunning="${ps -ef | grep firefox | wc -l}"
                          if [ $ffrunning -eq 1 ]; then
                              startx ~/bin/startfirefox.sh
                          fi
                          

                          The if is needed in case of logging into a second shell. I dont want firefox to start twice.

                          Thanks for the help.

                          @zblsv Do you know a way to “quit” an application that is started this way? alt+f4 is not working. So the only way to escape is to log into another console and kill the firefox. If my daughter manages this way, she is old enough to play with the unlocked system 😀

                          #101663
                          Member
                          zblsv
                            Helpful
                            Up
                            0
                            ::

                            alt+f4 is not working

                            It’s window manager hotkey. CTRL-Q is a Firefox command. After Firefox quits you must shutdown the system yourself. Alternatively, you can setup autologin in slimski and shutdown by it.

                            Words are carried away by the wind...

                            #101665
                            Member
                            RJP
                              Helpful
                              Up
                              0
                              ::

                              An alternative way is to strip down all menu items but not log out, remove desktop icons and panel objects. Firefox to the startup applications and for panel autohide on.

                            Viewing 13 posts - 1 through 13 (of 13 total)
                            • You must be logged in to reply to this topic.