13
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

LinuxサーバにVNCサーバを構築する手順

Posted at

前提

  • VNCサーバの詳しい設定等は説明しません。(というかできません)
    • 便利な設定ご教示いただけると幸いです。
  • とりあえずLinuxサーバをGUIで操作したくなったのでVNCが使いたいという人向けです。
  • セキュリティの機密性・完全性の観点からはあまりよろしくないことをしています。(rootユーザ使うなど)
    • あくまで可用性重視です。ご了承ください。
    • セキュリティ上こうしたほうが良いなどありましたらご教示いただければ幸いです。

環境

  • SV:RedHat Enterprise Linux Server release 6.5
  • CL:Windows8.1、Ultra VNC Viewer
    • CLの設定はググってください

パッケージのインストール

以下のコマンドを実行

yum install tigervnc*

ファイルの設定

  • /etc/sysconfig/vncserversの末尾に以下の行を追加
/etc/sysconfig/vncservers
VNCSERVERS="1:username"
VNCSERVERARGS[1]="-geometry 1024x768 -nolisten tcp"
  • usernameには任意のLinuxユーザ名を記載してください
  • 1024x768はVNCクライアントで接続した時の画面の解像度です

パスワードの設定

  • ファイルで設定したユーザ(username)でログインし以下のコマンドを実行
vncpasswd

VNCサーバの起動

  • 以下のコマンドを実行(rootで)
/etc/rc.d/init.d/vncserver start

OS起動時にVNCサーバを起動するようにする

  • 以下のコマンドを実行(rootで)
chkconfig vncserver --level 35 on
13
11
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?