← 전체로 돌아가기
스킬 linux

TightVNC 서버 설정 가이드

리눅스에서 TightVNC 서버를 설치하고 설정하는 방법

tightvncvnc-serverlinuxremote-desktopxfce4

리눅스에서 TightVNC 서버를 설정하는 방법이야.

  • 설치: tightvncserver 패키지를 설치해줘. bash sudo apt install tightvncserver
  • 비밀번호 설정: vncpasswd 명령으로 접속 비밀번호를 설정하면 됨. bash vncpasswd
  • 서버 시작/종료: vncserver :1로 시작하고, -kill 옵션으로 종료해. bash vncserver :1 vncserver -kill :1
  • 방화벽: 5901 포트를 열어줘야 외부에서 접속 가능해. bash sudo ufw allow 5901/tcp
  • 데스크탑 환경: xfce4를 설치해서 GUI를 사용할 수 있게 해. bash bash sudo apt-get update sudo apt-get install xfce4 xfce4-goodies
  • xstartup 설정: ~/.vnc/xstartup 파일을 수정해서 xfce4가 실행되도록 해. ```bash

!/bin/sh

unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS startxfce4 & 수정 후 실행 권한을 줘.bash chmod +x ~/.vnc/xstartup `` 클라이언트에서는서버IP:1`로 접속하면 돼.

여기서 배울 것

  1. TightVNC 서버 설치 및 접속 비밀번호 설정 방법
  2. VNC 서버 시작, 종료 및 방화벽 포트 개방 명령어
  3. VNC 접속 시 사용할 데스크탑 환경(XFCE4) 설치
  4. `~/.vnc/xstartup` 파일을 통한 VNC 세션 환경 설정
원본 파일 보기 (.claude/skills/tn-tightvnc-setup/SKILL.md)
---
name: TightVNC 서버 설정
description: This skill should be used when the user asks to set up, configure, or manage a TightVNC server on a Linux system, including installing the server, setting passwords, starting/stopping the service, and configuring the display environment. For example, 'TightVNC 서버 설치해줘', 'VNC 원격 데스크탑 세팅', 'TightVNC 방화벽 열기'.
version: 1.0.0
source: /home/son/prj/resume/backup_notes_260317/notion/Tech Note/TightVNC 26ed7efd824b8053ab58eb58c9316b4d.md
---

# TightVNC

## Client

[https://www.tightvnc.com/download.php](https://www.tightvnc.com/download.php)

보면

[https://remoteripple.com/download/](https://remoteripple.com/download/)

remote ripple으로 보라고 함.

서버IP주소:디스플레이번호 (서버 ip :5901 (1번기준) (lsof로 알수있음)

## Server

설치

sudo apt install tightvncserver

비밀번호 설정

```python
vncpasswd
```

켜고 끄기

켜기 : vncserver :1

끄기 : vncserver -kill :1

**방화벽 설정**

sudo ufw allow 5901/tcp

**우분투 화면 보여주도록 세팅**

sudo apt-get update
sudo apt-get install xfce4 xfce4-goodies

**셋업 변경**

nano ~/.vnc/xstartup

위쪽 내용 다지우고 이거 추가

#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
startxfce4 &

**권한 추가**

chmod +x ~/.vnc/xstartup