> For the complete documentation index, see [llms.txt](https://fraggin-right-github.gitbook.io/ffcp-klipper-dwc-touchscreen/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fraggin-right-github.gitbook.io/ffcp-klipper-dwc-touchscreen/setting-up-kiosk-mode.md).

# Setting up kiosk mode

First we'll set up our pi to boot into a slim window environment using X and Chrome so we can interact with [DWC2](https://github.com/chrishamm/DuetWebControl), which we're going to install later, on.

Let's install some dependencies.&#x20;

```bash
sudo apt-get install --no-install-recommends xserver-xorg x11-xserver-utils xinit xinput x11-utils openbox -y 
sudo apt-get install --no-install-recommends chromium-browser -y
```

Openbox is a window manager. It doesn't include any kind of menu or gui that you might expect with a normal desktop environment. This is good, we don't need it.

We'll need to edit ***/etc/xdg/openbox/autostart*** and replace it's contents with the snippet below.&#x20;

```bash
# Disable any form of screen saver / screen blanking / power management
xset s off
xset s noblank
xset -dpms

# Allow quitting the X server with CTRL-ATL-Backspace
setxkbmap -option terminate:ctrl_alt_bksp

# Start Chromium in kiosk mode
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' ~/.config/chromium/'Local State'
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/; s/"exit_type":"[^"]\+"/"exit_type":"Normal"/' ~/.config/chromium/Default/Preferences
chromium-browser --disable-infobars --kiosk 'http://YOUR-IP:4750'
```

{% hint style="info" %}
Please note, you need to edit it to match the IP address of your pi
{% endhint %}

Next you'll want to edit your ***\~/.bash\_profile*** to include the line below.

```bash
[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && startx -- -nocursor
```

This is going to start X automatically when we log in. That in turn, will automatically launch chrome which we configured in the previous step.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://fraggin-right-github.gitbook.io/ffcp-klipper-dwc-touchscreen/setting-up-kiosk-mode.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
