linux:vnc

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
linux:vnc [2023/03/04 16:43] – [インストール] ともやんlinux:vnc [2023/09/01 12:54] (現在) – [インストール] ともやん
行 12: 行 12:
  
 ==== インストール ==== ==== インストール ====
 +tigervnc-server パッケージをインストールする🤔\\
 <WRAP color_term> <WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
-<b class=GRN>$</b> <b class=HIY>sudo</b> yum install tigervnc-server+<b class=GRN>$</b> <b class=HIY>sudo</b> dnf install tigervnc-server
 </pre></html></WRAP> </pre></html></WRAP>
 <WRAP color_result_long><html><pre> <WRAP color_result_long><html><pre>
行 60: 行 61:
 </WRAP> </WRAP>
  
 +現在のファイヤウォールの内容を確認する🤔\\
 +[[linux:commands:network:firewall-cmd|firewalld (Linux)]]\\
 <WRAP color_term> <WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
行 67: 行 70:
 dhcpv6-client mdns samba-client ssh dhcpv6-client mdns samba-client ssh
 </pre></html></WRAP> </pre></html></WRAP>
 +</WRAP>
 +
 +vnc-server のファイヤウォール定義は以下のようになっている🤔\\
 +<WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
 <b class=GRN>$</b> <b class=HIY>cat</b> /usr/lib/firewalld/services/vnc-server.xml  <b class=GRN>$</b> <b class=HIY>cat</b> /usr/lib/firewalld/services/vnc-server.xml 
行 78: 行 85:
 </service> </service>
 </code></WRAP> </code></WRAP>
 +</WRAP>
 +
 +ファイヤウォールに vnc-server の設定を行う🤔\\
 +<WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
 <b class=GRN>$</b> <b class=HIY>sudo</b> firewall-cmd --permanent --add-service=vnc-server <b class=GRN>$</b> <b class=HIY>sudo</b> firewall-cmd --permanent --add-service=vnc-server
行 84: 行 95:
 success success
 </pre></html></WRAP> </pre></html></WRAP>
 +</WRAP>
 +
 +ファイヤウォール設定を有効化するためにリロードする🤔\\
 +<WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
 <b class=GRN>$</b> <b class=HIY>sudo</b> firewall-cmd --reload <b class=GRN>$</b> <b class=HIY>sudo</b> firewall-cmd --reload
行 90: 行 105:
 success success
 </pre></html></WRAP> </pre></html></WRAP>
 +</WRAP>
 +
 +設定が適用されていることを確認する🤔\\
 +<WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
 <b class=GRN>$</b> <b class=HIY>firewall-cmd</b> --list-services <b class=GRN>$</b> <b class=HIY>firewall-cmd</b> --list-services
行 96: 行 115:
 dhcpv6-client mdns samba-client ssh vnc-server dhcpv6-client mdns samba-client ssh vnc-server
 </pre></html></WRAP> </pre></html></WRAP>
 +</WRAP>
  
 +VNC 接続時に適用されるデフォルト設定を行う(例: GNOME セッション、解像度 1366x768)\\
 +<WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
-<b class=GRN>$</b> <b class=HIY>cat</b> << "EOF" | sudo tee -a /etc/tigervnc/vncserver-config-defaults+<b class=GRN>$</b> <b class=HIY>cat</b> &lt;&lt; "EOF" | sudo tee -a /etc/tigervnc/vncserver-config-defaults
 session=gnome session=gnome
 geometry=1366x768 geometry=1366x768
行 107: 行 129:
 geometry=1366x768 geometry=1366x768
 </pre></html></WRAP> </pre></html></WRAP>
 +</WRAP>
  
 +画面番号 :1 のログインユーザーを設定する(例: tomoyan)🤔\\
 +<WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
 <b class=GRN>$</b> <b class=HIY>echo</b> ":1=tomoyan" | sudo tee -a /etc/tigervnc/vncserver.users <b class=GRN>$</b> <b class=HIY>echo</b> ":1=tomoyan" | sudo tee -a /etc/tigervnc/vncserver.users
行 114: 行 139:
 :1=tomoyan :1=tomoyan
 </pre></html></WRAP> </pre></html></WRAP>
 +</WRAP>
  
 +VNC 接続時パスワードを設定する(この設定を行わないとサービスが起動出来ない)🤔\\
 +<WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
 <b class=GRN>$</b> <b class=HIY>vncpasswd</b> <b class=GRN>$</b> <b class=HIY>vncpasswd</b>
行 124: 行 152:
 A view-only password is not used A view-only password is not used
 </pre></html></WRAP> </pre></html></WRAP>
 +</WRAP>
  
 +vnc-server サービスの有効化と起動を行い、正常に起動することを確認する😀\\
 +<WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
 <b class=GRN>$</b> <b class=HIY>sudo</b> systemctl enable --now vncserver@:1 <b class=GRN>$</b> <b class=HIY>sudo</b> systemctl enable --now vncserver@:1
行 145: 行 176:
 10月 07 10:26:31 WICKED-BEAT systemd[1]: Started vncserver@:1.service - Remote desktop service (VNC). 10月 07 10:26:31 WICKED-BEAT systemd[1]: Started vncserver@:1.service - Remote desktop service (VNC).
 </pre></html></WRAP> </pre></html></WRAP>
- 
 </WRAP> </WRAP>
 +
 +==== Remmina で実際に接続確認を行う ====
 +[[linux:remmina|Remmina リモートデスクトップ]] を参照。\\
 +{{:linux:tigervnc_001.png?800|TigerVNC 001}}\\
  
 ==== vncserver が起動しない場合...😥 ==== ==== vncserver が起動しない場合...😥 ====
 <WRAP color_term> <WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
-$ systemctl status vncserver@:1.service+<b class=GRN>$</b> <b class=HIY>systemctl</b> status vncserver@:1.service
 <WRAP color_result><html><pre> <WRAP color_result><html><pre>
 <b class=GRN>●</b> vncserver@:1.service - Remote desktop service (VNC) <b class=GRN>●</b> vncserver@:1.service - Remote desktop service (VNC)
  • linux/vnc.1677915786.txt.gz
  • 最終更新: 2023/03/04 16:43
  • by ともやん