LINUX, FOSS AND LIBRARY TECHNOLOGY ENTHUSIAST

Saturday, January 25, 2025

Setting Up Firefox in Kiosk Mode on Xubuntu

0 comments
In this tutorial, I'll guide you through enabling automatic login for your user on Xubuntu 24.04 LTS (minimal installation), configuring Firefox to start in kiosk mode, and setting a specific homepage for automatic loading when Firefox starts.

Step 1: Enable Automatic Login

Open a terminal and edit the lightdm configuration file:

sudo vim /etc/lightdm/lightdm.conf

Replace the content of the file with the following:

[SeatDefaults]
autologin-user=user

Replace user with your actual username and save the file and reboot your system:

sudo reboot

This will enable your system to automatically log in to your user account.

Step 2: Configure Firefox to Clear History on Exit

  • Open Firefox and go to Settings.
  • Navigate to Privacy & Security.
  • Under the History section, select Use custom settings for history.
  • Check the box that says Clear history when Firefox closes.

This will ensure your browsing history is cleared every time Firefox is closed, which is useful for kiosk setups.

Step 3: Set a Custom Homepage for Firefox

In the Settings, scroll to the Home section.
Under Homepage and new windows, select Custom URLs and paste the URL you want Firefox to open when it starts automatically.

Step 4: Run Firefox in Kiosk Mode

To run Firefox in kiosk mode, open a terminal and execute the following command:

firefox --kiosk

If you're using Firefox ESR (Extended Support Release), use this command instead:

firefox-esr --kiosk

This will launch Firefox in full-screen mode without any user interface, which is ideal for kiosk setups.

Step 5: Set Firefox to Auto-Start in Kiosk Mode

  • Go to Application Menu > Session & Startup.
  • Under the Application Autostart tab, click Add.
  • Name the entry something like Firefox Kiosk and set the command to:
  • firefox --kiosk (For standard Firefox)
  • firefox-esr --kiosk (For Firefox ESR)
  • Save the entry.

Step 6: Configure Firefox to Open a Homepage on Startup

To ensure Firefox opens the homepage directly, even after an unclean shutdown:

1. Disable the Session Restore Prompt

Open Firefox.

  • Type about:config in the address bar and press Enter.
  • Click Accept the Risk and Continue.
  • In the search bar, type:
  • browser.sessionstore.resume_from_crash
  • Double-click the setting to change its value to false.

2. Set Your Homepage or Default New Tab

  • Open Firefox Settings:
  • Click the menu button (three horizontal lines) in the top-right corner.
  • Select Settings (or Preferences on macOS).
  • Under Home, choose one of these:

For Homepage and new windows, set it to Custom URLs... and enter your desired homepage URL.
Alternatively, select Firefox Home (Default) for the default new tab page.

3. Always Start with a New Session

  • In Settings → General:
  • Under Startup, uncheck "Open previous windows and tabs".
  • Expected Behavior
  • After these changes, when you restart the system and open Firefox:
  • Firefox will skip the "Restore Session" prompt.
  • It will load your homepage or new tab as configured.

Now, every time your system starts, Firefox will launch automatically in kiosk mode, displaying the desired homepage.

No comments:

Post a Comment