Enable Remote Desktop command line

The monitor for my desktop broke and I would like to enable remote desktop but I only have access over the network by ssh. I know that I can control files and other content in command line, but I would enjoy to have access by remote desktop until I can replace my monitor. Any help setting up remote desktop will be appreciated.

Bryan

If you can ssh, then you’ll need to do that first in text mode to setup your remote X capability.

Probably the easiest way to get everything you need installed is to install VNC (there are several possible remote X ways to connect). When you’ve ssh into your machine, su or sudo to gain sufficient permissions and run YAST in ncurses(text) mode

yast

Then in YAST
YAST > Network Service > Remote Administration (VNC)

Set to Allow Remote Administration and open port in firewall.
Click “OK” and agree to installing the x server components.

After you’ve installed,
You can configure a VNC client on your remote client to connect to your laptop, or even run

ssh -X user@machine 

For further information about configuring and connecting using VNC, you can use the openSUSE community docs
https://doc.opensuse.org/documentation/leap/reference/html/book.opensuse.reference/cha.vnc.html#sec.vnc.one-time

TSU

tsu2,
Thank you, I knew I was missing a step. Prior to my post I had verified my firewall it just did not dawn on me to turn Remote Administration on, but now it seems I have another problem. When my remote machine started to download and install x server components none of the repository locations were able to be found. So I started to narrow down the problem. Obviously, the Ethernet port is working on the remote device and I was able to ping ip addresses of my local ISP. I tried nslookup for different websites the output is below.

bryan@Hannah's_Laptop:~> nslookup www.google.com
Server:        82.163.143.171
Address:    82.163.143.171#53

Non-authoritative answer:
Name:    www.google.com
Address: 216.58.201.4

bryan@Hannah's_Laptop:~> ssh bryan@xxx.xxx.xxx.xxx
Password: 
Last login: Sat Aug 27 06:52:06 2016 from console
Have a lot of fun...
bryan@Family_Desktop:~> nslookup www.google.com
;; connection timed out; no servers could be reached

bryan@Family_Desktop:~> 

The first output is from my laptop, as it says in the hostname, and the second is from my remote machine. I have found out that NetworkManager is not running. To me it appears to be a DNS problem, but the NetworkManager not running is a problem as well. Any suggestions as to what I can try next?

Bryan

On 08/27/2016 08:46 AM, bryansailer wrote:
>
> tsu2,
> Thank you, I knew I was missing a step. Prior to my post I had verified
> my firewall it just did not dawn on me to turn Remote Administration on,
> but now it seems I have another problem. When my remote machine started
> to download and install x server components none of the repository
> locations were able to be found. So I started to narrow down the
> problem. Obviously, the Ethernet port is working on the remote device
> and I was able to ping ip addresses of my local ISP. I tried nslookup
> for different websites the output is below.
>
>
> Code:
> --------------------
> bryan@Hannah’s_Laptop:~> nslookup www.google.com
> Server: 82.163.143.171
> Address: 82.163.143.171#53
>
> Non-authoritative answer:
> Name: www.google.com
> Address: 216.58.201.4
>
> bryan@Hannah’s_Laptop:~> ssh bryan@xxx.xxx.xxx.xxx
> Password:
> Last login: Sat Aug 27 06:52:06 2016 from console
> Have a lot of fun…
> bryan@Family_Desktop:~> nslookup www.google.com
> ;; connection timed out; no servers could be reached
>
> bryan@Family_Desktop:~>
>
> --------------------
>
>
> The first output is from my laptop, as it says in the hostname, and the
> second is from my remote machine. I have found out that NetworkManager
> is not running. To me it appears to be a DNS problem, but the
> NetworkManager not running is a problem as well. Any suggestions as to
> what I can try next?
>
> Bryan
>
>

On the remote machine make sure that the /etc/resolv.conf file is
populated with nameservers.


Ken
linux since 1994
S.u.S.E./openSUSE since 1996

Ken,
When I looked at /etc/resolv.conf file last night there was one entry and I believe it was IP address of my router. I replaced the nameserver with my ISP’s DNS addresses. It did not seem to work last night, but it was late and falling asleep. I will try making those changes again and see what happens.

Bryan

I added the two nameservers to /etc/resolv.conf and I tried nslookup again the output is below. The IP address that I attempted to ping is my ISP’s DNS server.

[CODE
Family_Desktop:/home/bryan # vim /etc/resolv.conf
Family_Desktop:/home/bryan # nslookup espn.go.com
;; connection timed out; no servers could be reached

Family_Desktop:/home/bryan # ping 209.18.47.62
connect: Network is unreachable
Family_Desktop:/home/bryan # ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=1.40 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=1.27 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=1.20 ms
^C
— 192.168.0.1 ping statistics —
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 1.202/1.294/1.408/0.085 ms
Family_Desktop:/home/bryan # ]

When you installed openSUSE on your Desktop, by default its network connection is configured to use Wicked which is an enhanced ifup/ifdown instead of Network Manager. That’s fine because your Desktop isn’t portable and always uses the same network connection.

When you SSH into your Desktop, you need to <know> what the network configuration is <and> what the actual effective network settings are.

On your Desktop, even in text mode, with root permissions you can run YAST by simply invoking the name

yast

Within YAST, you can inspect your network settings, including the network interface (I assume it should be set to be a DHCP client), the Hostname and DNS settings (DNS should be blank, but you can optionally try specifying DNS servers) and the Default Gateway
YAST > System > Network Settings

To display your effective network settings

ip addr

To display your routing table plus default gateway

ip route

Lastly and perhaps a big clue to your issues…
You speculated that your Desktop might be pointing to your Gateway router for DNS.
The info you posted indicates your Laptop is <not> pointing to your Gateway router, is probably your ISP’s DNS.

TSU

TSU,
Thank you, I appreciate the information and that makes a lot of sense why Network Manager is not running. It has been awhile since install LEAP on my desktop but I do remember seeing Wicked as part of the installation. Last night I found a few forums and openSUSE network manual that walked me through making changes to the Network Manager configuration files but none of the changes made a difference. I will use the commands you provided to identify what went wrong with my Desktop.

Bryan

Also,

Remember that you can also refresh your network settings at any time by restarting your network service using the following command. Of course, if you’re remoting into your machine, that will break your network connection.

systemctl restart network.service

And, if your Wicked network connection is somehow faulty, you can always switch to Network Manager.
But, if you’re remoting into your machine this carries some risk… Unlike the above which simply refreshes your network settings which has only <some> risk, switching how your network settings are managed means that your new <untested> configuration <must> work. To make this change, you only need to open the YAST module I described in my previous post and modify the setting in the left-most (General) tab.

TSU

When I open YAST on my remote machine what does xinetd mean?

Network Services (xinetd)

TSU,

It seems all I had to do was restart network.service. Now my remote machine is working like normal. Back to working on Remote Desktop.

systemctl restart network.service