0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

VPSのリモートデスクトップが黒い画面で落ちる問題

Posted at

VPSにリモートデスクトップでアクセスしようとすると、黒画面になり、落ちてアクセスできない問題が発生しました。

動作環境
・ConoHa VPS
・Ubuntu 22.04
・xrdp・xfce

試したこと

1. GUI パッケージを再インストール

sudo apt update
sudo apt install --reinstall xrdp xfce4 xfce4-goodies xorgxrdp

2. セッション設定をリフレッシュ

rm -rf ~/.Xauthority ~/.xsession-errors ~/.cache/sessions/*
echo "startxfce4" > ~/.xsession
chmod +x ~/.xsession

3. xrdp 設定ファイルを標準に戻す

sudo cp /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.bak

4. サービス再起動

sudo systemctl restart xrdp
sudo systemctl restart xrdp-sesman

5. VPS を再起動

sudo reboot

再起動後、少し待って再度ログインにトライし、リモートデスクトップにアクセスできました!

なぜ「再インストール+キャッシュクリア」で直ったのか?

1: パッケージ再インストール で xrdp と xorgxrdp の適切な組み合わせに戻した

2:.Xauthority, .xsession-errors, ~/.cache/sessions/ を削除して「真っ新な状態」にした

3: ~/.xsession を startxfce4 だけのシンプルなファイルに置き換えたことで、セッションの起動フローが安定した

「一度壊れた GUI セッションのキャッシュや設定ファイルをクリーンアップし、xrdp/xorgxrdp を正しい組み合わせに戻した」 から、また普通にリモートデスクトップが使えるようになった、ということですね。

もしまた同じ症状が出たときは、この流れを思い出して

  1. キャッシュ&設定ファイルのクリーン
  2. パッケージ再インストール
  3. セッション設定の再構築

を試してみてください。これだけでほとんどの「黒画面 xrdp 問題」は解決するはずです!

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?