开发者

how do i setup ubuntu desktop in ec2 [closed]

开发者 https://www.devze.com 2023-02-13 22:11 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

This question does not appear to be about a specific programming开发者_StackOverflow社区 problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.

Closed 2 years ago.

Improve this question

Been playing around with amazon ec2, so far I've been able to get ubuntu-desktop working (once) although it was a random set of hacks from blogs ive not been able to reproduce what made it work

my setup windows box w/- putty, NX-Nomachine, amazon:ubuntu 10.04 lucid ami when i launch NX i can see the nicely rendered terminal window inside the desktop viewer, on a plain black background. previously I had tried sudo aptitude install ubuntu-desktop but im unclear as to what steps are needed to view my new desktop within my image. when i try start x - i get a user not authorized to start x-server..aborting i've also noticed errors like 'xf860penconsole cannot open dev/tty0 [no such file or directory] ' and ' any thoughts about what this might be ?


I have just set up the remote desktop of Ubuntu on Windows. I have Ubuntu Instance running on EC2. I have followed this link. But for quick installation let me give you the commands to execute. Execute this commands one-by-one.

export DEBIAN_FRONTEND=noninteractive
sudo -E apt-get update
sudo -E apt-get install -y ubuntu-desktop
sudo add-apt-repository ppa:freenx-team
sudo apt-get update
sudo aptitude install -y freenx
wget https://bugs.launchpad.net/freenx-server/+bug/576359/+attachment/1378450/+files/nxsetup.tar.gz
tar -xvf nxsetup.tar.gz
sudo cp nxsetup /usr/lib/nx/nxsetup
sudo /usr/lib/nx/nxsetup --install 

Say No to password

sudo vi /etc/ssh/sshd_config and set PasswordAuthentication to yes
sudo /etc/init.d/ssh restart

sudo passwd ubuntu

download and Install the setup NX client on the respective OS from here

Note: if you get error like

gpg: requesting key D018A4CE from hkp server keyserver.ubuntu.com gpgkeys: HTTP fetch error 7: couldn't connect to host gpg: no valid OpenPGP data found. gpg: Total number processed: 0

then exeucte this command

gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv F3A662B57D580D3A2E98E5152A8E3034D018A4CE | sudo apt-key add


I am using 12.04 and have found the need for one additional line

sudo apt-get install gnome-session-fallback


A little late, but as a reference for others.

More detail installation: http://michaelhallsmoore.com/blog/Desktop-Ubuntu-in-Amazon-EC2-The-Right-Way

Just the basics steps: http://aws-musings.com/4-easy-steps-to-enable-remote-desktop-on-your-ubuntu-ec2-instance/

The two use FreeNX Server.


I got better results on Oneiric Ocelot using the steps below derived from Anand Soni's answer (which I up-voted and hope you will too). Anand's is probably better for Precise onward.

export DEBIAN_FRONTEND=noninteractive
sudo -E apt-get update
sudo -E apt-get install -y ubuntu-desktop

wget http://64.34.173.142/download/3.5.0/Linux/nxclient_3.5.0-7_i386.deb
wget http://64.34.173.142/download/3.5.0/Linux/nxnode_3.5.0-9_i386.deb
wget http://64.34.173.142/download/3.5.0/Linux/FE/nxserver_3.5.0-11_i386.deb
sudo dpkg -i nxclient_3.5.0-7_i386.deb 
sudo dpkg -i nxnode_3.5.0-9_i386.deb 
sudo dpkg -i nxserver_3.5.0-11_i386.deb

sudo /usr/NX/bin/nxserver --status
sudo sed -i 's/PasswordAuthentication\ no/PasswordAuthentication\ yes/g' /etc/ssh/sshd_config
sudo service ssh restart
sudo passwd ubuntu

Note there are i386 and amd64 versions of NX Free Edition downloads from NoMachine. Check their download pages for the right links for the wget commands and unpacking steps in the middle section above.


I set mine up with NoMachine and with mounting to AWS FSx Windows SMB share.

sudo apt update
sudo apt -y upgrade
sudo apt install ubuntu-desktop

Transfer nomachine package to instance via WinSCP

sudo dpkg -i nomachine_6.10.12_1_amd64.deb 
sudo mkdir .nx
sudo mkdir .nx/config 
sudo cp -p .ssh/authorized_keys .nx/config/authorized.crt
sudo vi /etc/ssh/sshd_config

Hit i for insert

Set Password Authentication yes

Hit esc to get out of insert mode

:wq! to save

then, to set password for ubuntu account:

sudo /etc/init.d/ssh reload
sudo passwd ubuntu 

to add new user:

sudo useradd newuser

to add user to the admin rights group:

usermod -aG sudo newuser

and this set new user password:

sudo passwd newuser

For FSx mounting the following is needed:

sudo apt-get install cifs-utils

then you have to edit the file ".smbcredentials" with the command:

vi ~/.smbcredentials

Hit i for insert

Paste the following information:

username=USERNAME
password=PASSWORD
domain=DOMAIN

Hit esc to get out of insert mode

:wq! to save

then in shell user prompt:

chmod 0600 ~/.smbcredentials
sudo mkdir /mnt/share

finally you have to edit "/etc/fstab" followion teese instructions:

sudo vi /etc/fstab use:

$ to go to the end of the line in VI i to insert move to the next line and paste the following

//IPADDRESS/share /mnt/share cifs credentials=/home/ubuntu/.smbcredentials 0 0

* Hit esc to get out of insert mode :wq! to save * Remeber to execute:

sudo mount -a

To mount the FSx share

0

精彩评论

暂无评论...
验证码 换一张
取 消