差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
linux:vnc [2022/08/28 05:48] – ともやん | linux:vnc [2023/09/01 12:54] (現在) – [インストール] ともやん | ||
---|---|---|---|
行 12: | 行 12: | ||
==== インストール ==== | ==== インストール ==== | ||
+ | tigervnc-server パッケージをインストールする🤔\\ | ||
<WRAP color_term> | <WRAP color_term> | ||
<WRAP color_command>< | <WRAP color_command>< | ||
- | $ sudo yum install tigervnc-server | + | <b class=GRN> |
</ | </ | ||
<WRAP color_result_long>< | <WRAP color_result_long>< | ||
行 60: | 行 61: | ||
</ | </ | ||
+ | 現在のファイヤウォールの内容を確認する🤔\\ | ||
+ | [[linux: | ||
<WRAP color_term> | <WRAP color_term> | ||
<WRAP color_command>< | <WRAP color_command>< | ||
- | $ firewall-cmd --list-services | + | <b class=GRN> |
</ | </ | ||
<WRAP color_result>< | <WRAP color_result>< | ||
dhcpv6-client mdns samba-client ssh | dhcpv6-client mdns samba-client ssh | ||
</ | </ | ||
+ | </ | ||
+ | |||
+ | vnc-server のファイヤウォール定義は以下のようになっている🤔\\ | ||
+ | <WRAP color_term> | ||
<WRAP color_command>< | <WRAP color_command>< | ||
- | $ cat / | + | <b class=GRN> |
</ | </ | ||
- | < | + | < |
<?xml version=" | <?xml version=" | ||
< | < | ||
行 77: | 行 84: | ||
<port protocol=" | <port protocol=" | ||
</ | </ | ||
- | </pre></html></ | + | </code></WRAP> |
+ | </WRAP> | ||
+ | |||
+ | ファイヤウォールに vnc-server の設定を行う🤔\\ | ||
+ | <WRAP color_term> | ||
<WRAP color_command>< | <WRAP color_command>< | ||
- | $ sudo firewall-cmd --permanent --add-service=vnc-server | + | <b class=GRN> |
</ | </ | ||
<WRAP color_result>< | <WRAP color_result>< | ||
success | success | ||
</ | </ | ||
+ | </ | ||
+ | |||
+ | ファイヤウォール設定を有効化するためにリロードする🤔\\ | ||
+ | <WRAP color_term> | ||
<WRAP color_command>< | <WRAP color_command>< | ||
- | $ sudo firewall-cmd --reload | + | <b class=GRN> |
</ | </ | ||
<WRAP color_result>< | <WRAP color_result>< | ||
success | success | ||
</ | </ | ||
+ | </ | ||
+ | |||
+ | 設定が適用されていることを確認する🤔\\ | ||
+ | <WRAP color_term> | ||
<WRAP color_command>< | <WRAP color_command>< | ||
- | $ firewall-cmd --list-services | + | <b class=GRN> |
</ | </ | ||
<WRAP color_result>< | <WRAP color_result>< | ||
dhcpv6-client mdns samba-client ssh vnc-server | dhcpv6-client mdns samba-client ssh vnc-server | ||
</ | </ | ||
+ | </ | ||
- | <WRAP color_command>< | + | VNC 接続時に適用されるデフォルト設定を行う(例: |
- | $ cat << " | + | <WRAP color_term> |
+ | <WRAP color_command>< | ||
+ | <b class=GRN> | ||
session=gnome | session=gnome | ||
geometry=1366x768 | geometry=1366x768 | ||
EOF | EOF | ||
- | </code></ | + | </pre></ |
<WRAP color_result>< | <WRAP color_result>< | ||
session=gnome | session=gnome | ||
geometry=1366x768 | geometry=1366x768 | ||
</ | </ | ||
+ | </ | ||
+ | 画面番号 :1 のログインユーザーを設定する(例: | ||
+ | <WRAP color_term> | ||
<WRAP color_command>< | <WRAP color_command>< | ||
- | $ echo ": | + | <b class=GRN> |
</ | </ | ||
<WRAP color_result>< | <WRAP color_result>< | ||
:1=tomoyan | :1=tomoyan | ||
</ | </ | ||
+ | </ | ||
+ | VNC 接続時パスワードを設定する(この設定を行わないとサービスが起動出来ない)🤔\\ | ||
+ | <WRAP color_term> | ||
<WRAP color_command>< | <WRAP color_command>< | ||
- | $ sudo systemctl enable --now vncserver@: | + | <b class=GRN> |
- | $ systemctl status vncserver@: | + | |
</ | </ | ||
<WRAP color_result>< | <WRAP color_result>< | ||
- | ○ vncserver@:1.service - Remote desktop service (VNC) | + | Password: |
- | Loaded: loaded | + | Verify: |
- | Active: inactive (dead) since Sun 2022-08-28 04:44:43 JST; 6s ago | + | Would you like to enter a view-only password |
- | | + | A view-only password is not used |
- | | + | </pre></html>< |
- | Main PID: 14016 (code=exited, | + | </WRAP> |
- | CPU: 35ms | + | |
- | 8月 28 04:44:43 WICKED-BEAT systemd[1]: Starting vncserver@: | + | vnc-server サービスの有効化と起動を行い、正常に起動することを確認する😀\\ |
- | 8月 28 04:44:43 WICKED-BEAT systemd[1]: Started | + | <WRAP color_term> |
- | 8月 28 04:44:43 WICKED-BEAT systemd[1]: | + | <WRAP color_command>< |
+ | <b class=GRN> | ||
+ | <b class=GRN> | ||
</ | </ | ||
+ | <WRAP color_result>< | ||
+ | <b class=GRN> | ||
+ | | ||
+ | | ||
+ | Process: 2756 ExecStartPre=/ | ||
+ | Process: 2768 ExecStart=/ | ||
+ | Main PID: 2775 (vncsession) | ||
+ | Tasks: 0 (limit: 19016) | ||
+ | | ||
+ | CPU: 38ms | ||
+ | | ||
+ | | ||
+ | 10月 07 10:26:31 WICKED-BEAT systemd[1]: Starting vncserver@: | ||
+ | 10月 07 10:26:31 WICKED-BEAT systemd[1]: Started vncserver@: | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ==== Remmina で実際に接続確認を行う ==== | ||
+ | [[linux: | ||
+ | {{: | ||
+ | |||
+ | ==== vncserver が起動しない場合...😥 ==== | ||
+ | <WRAP color_term> | ||
+ | <WRAP color_command>< | ||
+ | <b class=GRN> | ||
+ | <WRAP color_result>< | ||
+ | <b class=GRN> | ||
+ | | ||
+ | | ||
+ | | ||
+ | Process: 3001 ExecStartPre=/ | ||
+ | Process: 3010 ExecStart=/ | ||
+ | Main PID: 3017 (code=exited, | ||
+ | CPU: 56ms | ||
+ | |||
+ | 3月 04 16:24:57 highway-x.fireball.local systemd[1]: Starting vncserver@: | ||
+ | 3月 04 16:24:57 highway-x.fireball.local systemd[1]: Started vncserver@: | ||
+ | 3月 04 16:24:58 highway-x.fireball.local systemd[1]: vncserver@: | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | vnc パスワードの設定をしていない可能性があるので設定する🤔\\ | ||
+ | <WRAP color_term> | ||
+ | <WRAP color_command>< | ||
+ | <b class=GRN> | ||
+ | </ | ||
+ | <WRAP color_result>< | ||
+ | Password: | ||
+ | Verify: | ||
+ | Would you like to enter a view-only password (y/n)? n | ||
+ | A view-only password is not used | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | vncserver を起動し直してステータスを確認する🤔\\ | ||
+ | <WRAP color_term> | ||
+ | <WRAP color_command>< | ||
+ | <b class=GRN> | ||
+ | <b class=GRN> | ||
+ | </ | ||
+ | <WRAP color_result>< | ||
+ | <b class=GRN> | ||
+ | | ||
+ | | ||
+ | Process: 3220 ExecStartPre=/ | ||
+ | Process: 3232 ExecStart=/ | ||
+ | Main PID: 3239 (vncsession) | ||
+ | Tasks: 0 (limit: 9402) | ||
+ | | ||
+ | CPU: 67ms | ||
+ | | ||
+ | ‣ 3239 / | ||
+ | |||
+ | 3月 04 16:31:50 highway-x.fireball.local systemd[1]: Starting vncserver@: | ||
+ | 3月 04 16:31:50 highway-x.fireball.local systemd[1]: Started vncserver@: | ||
+ | </ | ||
</ | </ | ||