Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

desktop-lite feature: The desktop-lite feature is not enabling VNC password authentication

オープン
#1,168 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 5 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
docker, docker-compose, shell

調査の方向性

示されている devcontainer.json と compose.yaml で問題を再現し、その後 install.sh と生成された /usr/local/share/desktop-init.sh を調べます。VNC_PASSWORD の条件と /usr/local/etc/vscode-dev-containers/vnc-passwd の存在を比較します。追加の環境変数を必要とせず、ポート 6080 を開いたときに設定したパスワードが適用されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

I've found that VNC password authentication is not being enforced in the desktop-lite feature. Here's a reproducible scenario:

Directory Structure

dvc-desktop-lite/
├── .devcontainer
│   └── devcontainer.json
└── compose.yaml

devcontainer.json

{
    "name": "dvc-desktop-lite",
    "dockerComposeFile": "../compose.yaml",
    "features": {
        "ghcr.io/devcontainers/features/desktop-lite:1.2.5": {
            "version": "latest",
            "password": "vscode11"
        }
    },
    "service": "dvc-desktop-lite",
    "runServices": [
        "dvc-desktop-lite"
    ],
    "remoteUser": "node",
    "shutdownAction": "stopCompose",
    "workspaceFolder": "/home/node",
    "forwardPorts": [
        6080,
        5901
    ],
    "portsAttributes": {
        "6080": {
            "label": "novnc"
        },
        "5901": {
            "label": "tigervnc"
        }
    }
}

compose.yaml

name: dvc-desktop-lite
services:
  dvc-desktop-lite:
    image: mcr.microsoft.com/devcontainers/typescript-node:22-bookworm
    init: true
    tty: true
    user: node
    working_dir: /home/node

With the above files prepared, start the development container by Dev Containers: open Folder in Container

Then, open http://localhost:6080 in a web browser. The VNC screen will be displayed without authentication.

To enable VNC password authentication, modify the compose.yaml file as follows:

name: dvc-desktop-lite
services:
  dvc-desktop-lite:
    image: mcr.microsoft.com/devcontainers/typescript-node:22-bookworm
    init: true
    tty: true
    user: node
    working_dir: /home/node
    environment:
      VNC_PASSWORD: enable

This is caused by the following process in /usr/local/share/desktop-init.sh, which is generated by install.sh.

if [ -n "${VNC_PASSWORD+x}" ]; then
    startInBackgroundIfNotRunning "Xtigervnc" sudoUserIf "${common_options} -passwd /usr/local/etc/vscode-dev-containers/vnc-passwd"
    # (snip)
fi

By modifying the configuration as shown below, I was able to achieve the desired behavior and enable VNC password authentication. The password used for authentication in this case was "vscode11", which was specified in the devcontainer.json file.

if [ -e "/usr/local/etc/vscode-dev-containers/vnc-passwd" ]; then
    startInBackgroundIfNotRunning "Xtigervnc" sudoUserIf "${common_options} -passwd /usr/local/etc/vscode-dev-containers/vnc-passwd"
    # (snip)
fi

Previously, VNC password authentication was enabled without specifying any environment variables, but now it requires the VNC_PASSWORD environment variable to be set.

If this is the intended behavior, I would appreciate it if you could document this change.

主要言語
Shell
スター
1.5k
フォーク
624
平均マージ
4日 8時間
マージ済み PR(30日)
7

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

devcontainers/features のほかの issue

devcontainers/features の issue をすべて見る

似ている issue

Shell/Bash の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。