「Xrdp」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(→‎トラブルシューティング: 英語版の最新版に差し替え)
21行目: 21行目:
 
''xrdp'' は既に同じジオメトリのセッションが開かれていないか確認して、ジオメトリ/解像度が一致しない場合は新しいセッションを起動します。
 
''xrdp'' は既に同じジオメトリのセッションが開かれていないか確認して、ジオメトリ/解像度が一致しない場合は新しいセッションを起動します。
   
  +
== ヒントとテクニック ==
== Tips and tricks ==
 
   
 
=== ブート時に自動起動 ===
 
=== ブート時に自動起動 ===
  +
 
{{AUR|xrdp}} パッケージには systemd のサービスファイルが含まれています。{{ic|xrdp.service}} を[[有効化]]してください。
 
{{AUR|xrdp}} パッケージには systemd のサービスファイルが含まれています。{{ic|xrdp.service}} を[[有効化]]してください。
   
  +
=== グラフィックアクセラレーション ===
=== Graphical acceleration ===
 
   
  +
Xorg セッションの場合、Intel および AMD GPU の場合は {{AUR|xorgxrdp-glamor}}、Nvidia GPU の場合は {{AUR|xorgxrdp-nvidia}} をインストールすることで、[[OpenGL]] および [[Vulkan]] グラフィック アクセラレーションを有効にできます。
For Xorg sessions, you can enable [[OpenGL]] and [[Vulkan]] graphical acceleration by installing {{AUR|xorgxrdp-glamor}} for Intel and AMD GPUs and {{AUR|xorgxrdp-nvidia}} for Nvidia GPUs.
 
   
=== Sound ===
+
=== サウンド ===
   
Install the necessary [[PulseAudio]] modules with {{AUR|pulseaudio-module-xrdp}}.
+
必要な [[PulseAudio]] モジュールを {{AUR|pulseaudio-module-xrdp}} でインストールします。
   
  +
[[PipeWire]] ユーザーの場合は、{{AUR|pipewire-module-xrdp-git}} をインストールしてください
=== Vino で実行 (root セッションの Gnome VNC-Server) ===
 
   
  +
=== 非 root ユーザー ===
サーバーを有効化すると vino-preferences から確認できるようになります。Vino はデフォルトでポート 5900 を使って接続するので、xrdp の設定ファイルを編集する必要があります。以下のコードを使って xrdp の設定ファイル ({{ic|/etc/xrdp/xrdp.ini}}) に vino のセッションを追加してください。
 
   
  +
{{ic|Xwrapper.config}} に次の行を含めます:
{{hc|/etc/xrdp/xrdp.ini|2=
 
  +
[xrdp8]
 
  +
{{hc|/etc/X11/Xwrapper.config|2=
name=Vino-Session
 
  +
allowed_users=anybody
lib=libvnc.so
 
  +
needs_root_rights=no
username=ask
 
password=ask
 
ip=127.0.0.1
 
port=5900
 
 
}}
 
}}
   
  +
上記の行が存在しない場合、[[Remmina]] などのアプリケーションからのリモートデスクトップ接続は空の画面で開始されます。
VNC 接続エラーが発生した場合は、{{ic|vino-server}} デフォルトで TLS 接続のみを受け入れることが原因である可能性があります。{{ic|xrdp}} 接続できるように、これを標準の VNC 認証に変更する必要があります。
 
 
$ gsettings set org.gnome.Vino require-encryption false
 
 
{{ic|vino-server}} ループバックインターフェースのみリッスンするように制限することもできます
 
 
$ gsettings set org.gnome.Vino network-interface lo
 
 
xrdp サーバを再起動することを忘れないでください。そうすれば、vino セッションに接続できるはずです(xfreerdp を使ってテスト済み)。
 
   
 
== トラブルシューティング ==
 
== トラブルシューティング ==

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

この記事あるいはセクションは翻訳の途中です。
ノート: 英語版からの記事の転載と若干の修正のみ。飜訳はまだです。 (議論: トーク: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 などのアプリケーションからのリモートデスクトップ接続は空の画面で開始されます。

トラブルシューティング

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. 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 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 or 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] を参照。