「Xrdp」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
67行目: 67行目:
 
{{ic|~/.xinitrc}} を {{ic|~/.xrdpinitrc}} にコピーし、{{ic|--exit-with-session}} を削除して、{{ic|~/.xinitrc}} の代わりに {{ic|~/.xrdpinitrc}} を呼び出すように {{ic|/etc/xrdp/startwm.sh}} を更新してみてください。{{ic|~/.xinitrc}} で説明されているように、{{ic|~/.xrdpinitrc}} への呼び出しにデスクトップ環境を追加する必要がある場合があります。 例えば {{ic|~/.xrdpinitrc xfce}}
 
{{ic|~/.xinitrc}} を {{ic|~/.xrdpinitrc}} にコピーし、{{ic|--exit-with-session}} を削除して、{{ic|~/.xinitrc}} の代わりに {{ic|~/.xrdpinitrc}} を呼び出すように {{ic|/etc/xrdp/startwm.sh}} を更新してみてください。{{ic|~/.xinitrc}} で説明されているように、{{ic|~/.xrdpinitrc}} への呼び出しにデスクトップ環境を追加する必要がある場合があります。 例えば {{ic|~/.xrdpinitrc xfce}}
   
  +
=== デスクトップ環境で黒い画面が表示される ===
=== Black screen with a desktop environment ===
 
   
  +
デスクトップ環境を使用しているときに黒い画面が表示される場合は、[[D-Bus]] が適切に初期化されていないことが原因である可能性があります。一部の DE (KDE Plasma など) は、以前のセッションから完全に動作するアプリケーション/ウィンドウを復元できる場合もあります。これにより、''Plasmashell だけ'' が欠落しているように見えます。
If you get a black screen and you use a desktop environment, it may be a result of [[D-Bus]] not being properly initialized. Some DEs (like KDE Plasma) might also be able to restore fully working applications/windows from a previous session, which makes it seem that "only plasmashell" is missing.
 
   
Try running the desktop environment with {{ic|dbus-launch --exit-with-session}} in your {{ic|~/.xinitrc}} file. For KDE Plasma, you can use the command {{ic|/usr/lib/plasma-dbus-run-session-if-needed startplasma-x11}} or {{ic|dbus-launch --exit-with-session startplasma-x11}}.
+
{{ic|~/.xinitrc}} ファイルで {{ic|dbus-launch --exit-with-session}} を使用してデスクトップ環境を実行してみてください。 KDE Plasma の場合、コマンド {{ic|/usr/lib/plasma-dbus-run-session-if-needed startplasma-x11}} または dbus-launch {{ic|dbus-launch --exit-with-session startplasma-x11}} を使用できます。
   
 
=== Green screen ===
 
=== Green screen ===

2024年1月10日 (水) 18:20時点における版

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

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

インストール

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

Xorg バックエンド

バックエンドの代わりに xorgxrdp を使用するには、xorgxrdpAUR パッケージを インストール して下さい。

使用方法

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

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

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

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

ヒントとテクニック

ブート時に自動起動

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

グラフィックアクセラレーション

Xorg セッションの場合、Intel および AMD GPU の場合は xorgxrdp-glamorAUR、Nvidia GPU の場合は xorgxrdp-nvidiaAUR をインストールすることで、OpenGL および Vulkan グラフィック アクセラレーションを有効にできます。

サウンド

必要な PulseAudio モジュールを pulseaudio-module-xrdpAUR でインストールします。

PipeWire ユーザーの場合は、pipewire-module-xrdp-gitAUR をインストールしてください

非 root ユーザー

Xwrapper.config に次の行を含めます:

/etc/X11/Xwrapper.config
allowed_users=anybody
needs_root_rights=no

上記の行が存在しない場合、Remmina などのアプリケーションからのリモートデスクトップ接続は空の画面で開始されます。

トラブルシューティング

カーソルの周りの黒いボックス

マウスポインタの周りに黒いボックスがある場合は、Xcursor.core:1 行を含む ~/.Xresources-xrdp を作成し、次のように ~/.xinitrc にロードします。

xrdb ~/.Xresources-xrdp
exec startlxde

xorg-xrdb のインストールが必要になる場合があります。

黒いスクリーン

~/.xinitrc--exit-with-sessiondbus_args に設定されている場合、セッションマネージャーにログインした後に黒い画面が表示されることがあります。

~/.xinitrc~/.xrdpinitrc にコピーし、--exit-with-session を削除して、~/.xinitrc の代わりに ~/.xrdpinitrc を呼び出すように /etc/xrdp/startwm.sh を更新してみてください。~/.xinitrc で説明されているように、~/.xrdpinitrc への呼び出しにデスクトップ環境を追加する必要がある場合があります。 例えば ~/.xrdpinitrc xfce

デスクトップ環境で黒い画面が表示される

デスクトップ環境を使用しているときに黒い画面が表示される場合は、D-Bus が適切に初期化されていないことが原因である可能性があります。一部の DE (KDE Plasma など) は、以前のセッションから完全に動作するアプリケーション/ウィンドウを復元できる場合もあります。これにより、Plasmashell だけ が欠落しているように見えます。

~/.xinitrc ファイルで dbus-launch --exit-with-session を使用してデスクトップ環境を実行してみてください。 KDE Plasma の場合、コマンド /usr/lib/plasma-dbus-run-session-if-needed startplasma-x11 または dbus-launch dbus-launch --exit-with-session startplasma-x11 を使用できます。

Green screen

If the login dialog appears, but no desktop environment starts when you click OK, change param=Xorg to param=/usr/lib/Xorg in /etc/xrdp/sesman.ini.

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     include     system-remote-login
-session    optional    pam_gnome_keyring.so    auto_start
-session    optional    pam_kwallet5.so         auto_start

Then, add etc/pam.d/xrdp-sesman (no leading slash) to NoUpgrade in /etc/pacman.conf. 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 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.

Two-finger scrolling is too fast

Use the xorg backend, make sure xorgxrdp is 0.9.19 or newer. Then add XRDP_XORG_TOUCHPAD_SCROLL_HACK=yes to the [SessionVariables] section of /etc/xrdp/sesman.ini.

See upstream issue #150 for details.

Restricted functionality within remote system

A user may not have the same access permissions when logged into a system remotely as the same user does when logged in locally. Additional configuration may be required of the polkit permissions policies to grant access, including to mounted drives or to control network connections.

Mounted drives

For remote access permissions to mounted drives see udisks#Permissions.

NetworkManager

For remote access permissions to NetworkManager see NetworkManager#Set up PolicyKit permissions.

参照

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