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.
-
AuthorPosts
-
March 10, 2023 at 10:35 am #101640Member
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
March 10, 2023 at 10:57 am #101641MemberPPC
::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” , adding a space and and & at the end. Save the file. That command should run automatically the next time you start antiX.
March 10, 2023 at 10:58 am #101642MemberRJP
::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 1 month, 4 weeks ago by RJP.
- This reply was modified 1 month, 4 weeks ago by RJP.
March 10, 2023 at 11:56 am #101645Membersynchron
::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
March 10, 2023 at 12:12 pm #101647MemberRJP
::Just googling.
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 10xdotool search –sync –onlyvisible –name firefox key F11
- This reply was modified 1 month, 4 weeks ago by RJP.
March 10, 2023 at 12:15 pm #101649MemberXunzi_23
::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.March 10, 2023 at 12:18 pm #101650MemberRJP
::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 1 month, 4 weeks ago by RJP.
March 10, 2023 at 12:30 pm #101652Membersynchron
::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.shAnd 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 1 month, 4 weeks ago by synchron.
March 10, 2023 at 1:34 pm #101656Forum Admin
anticapitalista
::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.
March 10, 2023 at 4:19 pm #101659Member
zblsv
::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...
March 10, 2023 at 4:35 pm #101661Membersynchron
::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 fiThe 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 đ
March 10, 2023 at 5:07 pm #101663Member
zblsv
::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...
March 10, 2023 at 5:21 pm #101665MemberRJP
::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.
-
AuthorPosts
- You must be logged in to reply to this topic.