키오스크 kiosk

이승훈·2026년 1월 9일

Device

Raspberry Pi 4

OS

Raspberry Pi OS Lite (64-bit)

패키지 업데이트

sudo apt update
sudo apt upgrade -y

최소 그래픽(Xorg) 설치

sudo apt install -y xserver-xorg x11-xserver-utils xinit xinput fonts-noto-core

chromium 설치

sudo apt install -y chromium
chromium --version

콘솔 자동 로그인 설정

sudo raspi-config
1 System Options
└ S6 Auto Login

로그인 시 startx 자동 실행

vi ~/.bash_profile

아래 내용 전체 추가

# tty1에서만 startx 자동 실행
if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
    startx
fi

startx가 실행할 X 내용 정의

설정

vi ~/.xinitrc
#!/bin/sh

# 화면 꺼짐 방지
xset -dpms
xset s off
xset s noblank

# DPI 고정 (POSIX 방식)
echo 'Xft.dpi: 96' | xrdb -merge

# 크로미움 키오스크 (죽어도 재시작)
while :; do
	chromium \
      --kiosk \
      --window-size=1920,1080 \
      --window-position=0,0 \
      --force-device-scale-factor=1 \
      --no-first-run \
      --disable-infobars \
      --disable-features=UseOzonePlatform \
      --ozone-platform=x11 \
      https://www.google.com
  	sleep 2
done
chmod +x ~/.xinitrc

재부팅

탈출

Ctrl+Alt+F1~F6

profile
안녕하세요!

0개의 댓글