LoginSignup
2
5

More than 5 years have passed since last update.

UbuntuでXRDPやVNC設定の際に役立つコマンド

Last updated at Posted at 2018-06-24

私がXRDPやVNCサーバーのことで試行錯誤している中で、頻繁に使ったコマンドをまとめました。

デスクトップマネージャー関連

sudo apt-get purge lightdm
sudo apt-get install lightdm

インストールするとlightdmとgdmのどちらをインストールするか選択画面が表示されます。

システム修復

sudo apt-get update
sudo apt-get -f install

XRDP再起動

停止

sudo service xrdp stop 

または、

sudo systemctl stop xrdp

起動

sudo service xrdp start 

再起動

sudo service xrdp restart 

または

sudo systemctl restart xrdp

VNC関連

VNCサーバー設定&起動

vncserver

画面番号を指定して起動出来る。

VNCサーバー停止

vncserver -kill :1

数字は、画面番号

VNCサーバー起動

vncserver :1 

数字は、画面番号

ユーザー切り替え

su - name

-でPAHTなど引き継ぐ

ユーザー追加

adduser user_name

adduserコマンドは、ユーザーを追加した時に、HOMEディレクトリも追加されます。

ユーザーをsudoグループに追加

gpasswd -a user_name sudo

ユーザーに、管理者権限を付ける

sudo usermod -aG sudo USER_NAME

-aをつけ忘れると上書きになってしまうので、-aを忘れ無いこと。

2
5
0

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
2
5