「Xrdp」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(add Translateme)
1行目: 1行目:
{{Translateme|記事の転載と若干の修正はしたが飜訳まではできなかった。}}
+
{{Translateme|記事の転載と若干の修正はしたが飜訳。}}
 
[[Category:リモートデスクトップ]]
 
[[Category:リモートデスクトップ]]
 
[[en:Xrdp]]
 
[[en:Xrdp]]

2021年10月7日 (木) 14:17時点における版

この記事あるいはセクションは翻訳の途中です。
ノート: 記事の転載と若干の修正はしたが飜訳はまだです。 (議論: トーク:Xrdp#)

xrdp は Microsoft の Remote Desktop Protocol (RDP) をサポートするデーモンです。Xvnc, X11rdp, xorgxrdp をバックエンドとして使用します。

インストール

xrdpAUR パッケージ (または開発版を使いたい場合は xrdp-gitAUR) をインストールしてください。これはバックエンドとして、Xvnc のみサポートします。

Xorg backend

To use xorgxrdp instead for the backend, install the xorgxrdpAUR package.

Add allowed_users=anybody to /etc/X11/Xwrapper.config to allow anybody to start an X server.

使用方法

xrdp を起動したら RDP クライアントからローカルホストに接続できます (標準の RDP ポートは 3389)。xrdp は小さなメッセージウィンドウを表示します。

sessman-Xvnc を選択した場合、ホストのアカウントのユーザー名とパスワードを指定することができ、xrdp は新しい Xvnc インスタンスを起動します。/etc/xrdp/startwm.sh にある SESSION リストからウィンドウマネージャが開きます。

セッションウィンドウを閉じて RDP 接続を終了すると、次回 RDP で接続したときは同じセッションにアクセスすることができます。セッションウィンドウからウィンドウマネージャやデスクトップ環境を終了した場合、セッションが終了され、次回は新しいセッションが開きます。

xrdp は既に同じジオメトリのセッションが開かれていないか確認して、ジオメトリ/解像度が一致しない場合は新しいセッションを起動します。

Tips and tricks

ブート時に自動起動

xrdpAUR パッケージには systemd のサービスファイルが含まれています。xrdp.service有効化してください。

Graphical acceleration

For Xorg sessions, you can enable OpenGL and Vulkan graphical acceleration by installing xorgxrdp-glamorAUR for Intel and AMD GPUs and xorgxrdp-nvidiaAUR for Nvidia GPUs.

Sound

Install the necessary PulseAudio modules with pulseaudio-module-xrdpAUR.

Vino で実行 (root セッションの Gnome VNC-Server)

サーバーを有効化すると vino-preferences から確認できるようになります。Vino はデフォルトでポート 5900 を使って接続するので、xrdp の設定ファイルを編集する必要があります。以下のコードを使って xrdp の設定ファイル (/etc/xrdp/xrdp.ini) に vino のセッションを追加してください。

/etc/xrdp/xrdp.ini
[xrdp8]
name=Vino-Session
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=5900

VNC 接続エラーが発生した場合は、vino-server デフォルトで TLS 接続のみを受け入れることが原因である可能性があります。xrdp 接続できるように、これを標準の VNC 認証に変更する必要があります。

$ gsettings set org.gnome.Vino require-encryption false

vino-server ループバックインターフェースのみリッスンするように制限することもできます

$ gsettings set org.gnome.Vino network-interface lo

xrdp サーバを再起動することを忘れないでください。そうすれば、vino セッションに接続できるはずです(xfreerdp を使ってテスト済み)。

トラブルシューティング

Black box around cursor

If you encounter black box around mouse pointer create ~/.Xresources-xrdp with line Xcursor.core:1 and load it in ~/.xinitrc like

xrdb ~/.Xresources-xrdp
exec startlxde

You may need to install xorg-xrdb.

Black screen

You may get a black screen after logging into the session manager if your ~/.xinitrc has --exit-with-session set in the dbus_args.

Try copying ~/.xinitrc to ~/.xrdpinitrc, removing --exit-with-session, and updating /etc/xrdp/startwm.sh to call ~/.xrdpinitrc instead of ~/.xinitrc. You might need to append your desktop environment to the call to .xrdpinitrc, as is mentioned in ~/.xinitrc; eg. . ~/.xrdpinitrc xfce.

Black screen with a desktop environment

If you get a black screen and you use a desktop environment, it may be a result of D-Bus not being properly initialized. Try running the desktop environment with dbus-launch --exit-with-session in your ~/.xinitrc file. For KDE Plasma, you can use the command /usr/lib/plasma-dbus-run-session-if-needed startplasma-x11.

loginctl or systemctl --user not working

Try commenting out all the references to systemd-home in /etc/pam.d/system-auth. See this issue.

Prompts for gnome-keyring or KDE Wallet

If you are prompted to login to gnome-keyring or [KDE Wallet] when your session starts, modify the file /etc/pam.d/xrdp-sesman as follows:

/etc/pam.d/xrdp-sesman
#%PAM-1.0

auth            include         system-remote-login
-auth           optional        pam_gnome_keyring.so
-auth   optional  pam_kwallet5.so

account         include         system-remote-login

password        include         system-remote-login
-password       optional        pam_gnome_keyring.so use_authtok

session         optional        pam_keyinit.so force revoke
session         include         system-remote-login
-session                optional        pam_gnome_keyring.so auto_start
-session  optional  pam_kwallet5.so auto_start

If you only use gnome-keyring it is not necessary to include the kwallet5 lines, and vice versa.

Prevent autostart items from starting

To prevent user defined ~/.config/autostart items for a from starting you can set the autostart directory param on the session in the ~/.xinitrc to use only the global /etc/xdg/autostart directory.

get_session(){
    local dbus_args=(--sh-syntax)
    case "$SESSION" in
        awesome) dbus_args+=(awesome) ;;
        bspwm) dbus_args+=(bspwm-session) ;;
        budgie) dbus_args+=(budgie-desktop) ;;
        cinnamon) dbus_args+=(cinnamon-session -a /etc/xdg/autostart) ;;

No sound

This could be a symptom of an issue with loginctl, so try that fix above. The following error may be encountered in the system journal:

Failed to load module "module-x11-publish" (argument: "display=:10.0 xauthority="): initialization failed.

This is the result of systemd improperly starting PulseAudio. One workaround is to disable the user unit files pulseaudio.service and pulseaudio.socket either for your own user or for all users, and make PulseAudio start when needed by setting autospawn to yes in /etc/pulse/client.conf.

If sound still does not work, try manually starting PulseAudio with pulseaudio & in your ~/.xinitrc.

参照

  • TigerVNC - RDP の代替としてバックエンドで使われる VNC
  • freerdp - ネットワークレベル認証 (NLA) などの RDP 7.1 の機能をサポートしている rdesktop フォーク。[1] を参照。