Last time As a result, iPad 3 can be used as a sub monitor of Ubuntu by using VNC, but this method can be used for the same wireless network. It cannot be realized if it is not connected.
It doesn't matter if you're inside the house, but if you take it outside, for example, if you have a free spot (~~ still resists ~~ it doesn't seem to allow connections between clients), WiFi If there is no place at all, the iPad will be just a baggage.
So you can use your iPad as a sub monitor without WiFi
--Do not change the method of making it a sub monitor (using VNC) --The network is not ** connected via wireless network, but connected from iPad to ubuntu hotspot using Ubuntu as a hotspot ** --Also, make it possible to connect to the Internet from Ubuntu --Hotspot connection = Almost direct connection, I hope that the operation of the sub monitor will improve a little.
Considering this, the results achieved by trial and error are shown below as an example.
To make the wireless LAN adapter a hotspot on Ubuntu 18.04, do the following:
However, no matter how many times I try, I get a password error and cannot connect. I wanted to make sure that I could connect to the Ubuntu hotspot for the time being, so I was looking for a way to invalidate the password, though it was a bad idea.
Now that I've been able to connect, I'm sure there's something wrong with encryption. It's an old one, so I imagined that the adapter doesn't support the new method.
In addition, it is a habit to check the IP address
$ ifconfig
I was surprised to hear "Command ifconfig
not found ".
So immediately
$ sudo apt install net-tools
I kept it.
vino
Since the network was connected, I opened [Settings] → [Sharing] → [Screen Sharing] on the PC side to reconfirm the settings.
The network was x. Moreover, there is nothing else that can be done other than pressing x = deleting, so it seems that it can not be done from this screen anymore.
So, as usual, I rowed out into the sea of the net and sprinkled around.
I changed require-encryption with the "gsettings command" to disable the encryption process, but I was able to confirm the settings related to vino including this with the following command.
$ gsettings list-recursively org.gnome.Vino
org.gnome.Vino notify-on-connect true
org.gnome.Vino alternative-port uint16 5900
org.gnome.Vino disable-background false
org.gnome.Vino use-alternative-port false
org.gnome.Vino icon-visibility 'client'
org.gnome.Vino use-upnp false
org.gnome.Vino view-only false
org.gnome.Vino prompt-enabled false
org.gnome.Vino disable-xdamage false
org.gnome.Vino authentication-methods ['vnc']
org.gnome.Vino network-interface ''
org.gnome.Vino require-encryption false
org.gnome.Vino mailto ''
org.gnome.Vino lock-screen-on-disconnect false
org.gnome.Vino vnc-password 'xxxxxxx'
$
At first glance, the "network-interface" that looks like it sets "lo" when connecting to itself, and it is usually empty. Other than this, it doesn't look like that, so I gave up on this direction.
(reference) https://help.ubuntu.com/community/VNC/Servers
In dconf
org.gnome.setting-daemon.plugins.shareing.service.enabled-connections
There is a key called "List the UUIDs of network I / Fs used by vino" in this value.
First, the "UUID" of the network I / F was confirmed with the following command.
$ nmcli con show
NAME UUID TYPE DEVICE
(Wireless connection) XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX wifi --
Hotspot YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY wifi wlxxxx0
Wired connection 1 ZZZZZZZZ-ZZZZ-ZZZZ-ZZZZ-ZZZZZZZZZZZZ ethernet --
Next, check the current setting value.
$ dconf read /org/gnome/settings-daemon/plugins/sharing/vino-server/enabled-connections
['XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX']
Since only the UUID of the wireless connection was registered, I registered the registered UUID and the UUID of the hotspot by connecting them with a comma (since it seems that some dconf cannot be added or deleted).
$ dconf write /org/gnome/settings-daemon/plugins/sharing/vino-server/enabled-connections "['XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX','YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY']"
$ dconf read /org/gnome/settings-daemon/plugins/sharing/vino-server/enabled-connections
['XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX','YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY']
I confirmed that the values are the same in the dconf editor.
If you open [Settings] → [Sharing] → [Screen Sharing] again ...
Wow, it's really bad.
Turn on the hotspot while embracing a single hope ...!
・ ・ ・ Thank you for your hard work (I couldn't connect)
I tried to follow the movement of vino again.
First, I went back from the hotspot to the wireless network and checked the process and the port number listening.
$ ps -alx | grep vino
0 1000 2333 1337 20 0 587904 30408 poll_s Ssl ? 0:00 /usr/lib/vino/vino-server
0 1000 3585 1872 20 0 15456 1120 pipe_w S+ pts/0 0:00 grep --color=auto vino
$ netstat -pl | grep 2333
tcp 0 0 0.0.0.0:5900 0.0.0.0:* LISTEN 2333/vino-server
tcp6 0 0 [::]:5900 [::]:* LISTEN 2333/vino-server
You can see that a process called vino-server is running and listening on port 5900. If you look at the parent PID of vino-server,
$ ps -alx | grep 1337
4 1000 1337 1 20 0 77228 8348 ep_pol Ss ? 0:00 /lib/systemd/systemd --user
:
So I also found out that I was kicked by systemd.
If you switch to a hotspot here and check again
$ ps -alx | grep vino
$ netstat -pl | grep 59
$
There was no vino-server, and there were no processes waiting on port 5900. When I returned to the wireless connection again, vino-server restarted (the process ID was different), and it returned to the standby state on boat 5900.
So, if you turn on [Screen Sharing], you can see that the vino-server (VNC server) is raised or lowered by looking at the status of the network I / F. Even if the UUID of the hotspot is registered in dconf, vino will be terminated, so it seems that not only the UUID but also whether it is a hotspot is checked.
In addition, since vino-server is started from systemd, I wondered if it was controlled by systemctl, but I couldn't find the word vino. When it comes to that, it seems that gnome is doing something, and I just chase after it and get hooked on the depths.
I'm sorry, I think I can do it soon.
Looking at the standby status of vino once again
$ netstat -pl | grep 2333
tcp 0 0 0.0.0.0:5900 0.0.0.0:* LISTEN 2333/vino-server
tcp6 0 0 [::]:5900 [::]:* LISTEN 2333/vino-server
So, although the port number is specified, the IP address does not seem to be fixed. In that case, it is speculated that if vino is still running, it may be connected even from wireless disconnection & hotspot without automatically raising and lowering by setting [Screen sharing].
Therefore,
After that, I ran vino-server manually.
$ /usr/lib/vino/vino-server
09/11/2020 17:14:24 Autoprobing TCP port in(all) network interface
09/11/2020 17:14:24 Listening IPv6://[::]:5900
09/11/2020 17:14:24 Listening IPv4://0.0.0.0:5900
09/11/2020 17:14:24 Autoprobing selected port 5900
09/11/2020 17:14:24 Advertising security type: 'TLS' (18)
09/11/2020 17:14:24 Re-binding socket to listen for VNC connections on TCP port 5900 in (all) interface
:
:
$ ^C
$ ps -alx | grep vino
0 1000 4051 1872 20 0 587896 30284 signal Tl pts/0 0:00 /usr/lib/vino/vino-server
$ netstat -pl | grep vino
tcp 0 0 0.0.0.0:5900 0.0.0.0:* LISTEN 4051/vino-server
tcp6 0 0 [::]:5900 [::]:* LISTEN 4051/vino-server
$
Here again, switch the wireless to the hotspot and connect again from the iPad to the hotspot. If you can connect, specify the IP address of the hotspot in VNC Viewer and connect ...
It was reflected in VNC of iPad! !! Apparently this is fine.
It's a pattern every time, but it's not beautiful to type commands from the terminal every time.
--Booting from systemctl --Automatic startup at login
I thought about two things.
The former systemctl was set by referring to the following site.
(reference) https://askubuntu.com/questions/636270/vino-vnc-server-unable-to-start-on-startup
However, when I checked the status after enabling it with systemctl, vino failed with an error such as the display not being found. I searched for vino options and systemctl a little, but it seems that it will not be solved soon, so I gave up once.
On the other hand, the latter is automatically started at login, but when I was doing this and that, I found the following vino-server desktop file.
$ cd /usr/share/applications/
$ sudo nano vino-server.desktop
---
[Desktop Entry]
Name=Desktop Sharing
Comment=GNOME Desktop Sharing Server
Keywords=vnc;share;remote;
Exec=/usr/lib/vino/vino-server --sm-disable
Icon=preferences-desktop-remote-desktop
NoDisplay=true
Terminal=false
Type=Application
X-GNOME-Autostart-Phase=Applications
X-GNOME-AutoRestart=true
X-GNOME-UsesNotifications=true
X-Ubuntu-Gettext-Domain=vino
---
When I changed NoDisplay from true to false as a trial, the icon "Desktop ..." appeared in the launcher. When I double-clicked this icon without vino-server, vino-server started up and I was able to connect with VNC, so I will use the value of this EXEC.
Then, open [View applications] → [Settings for applications to start automatically] and click [Add].
--Name: (appropriately) vino-server --Command: / usr / lib / vino / vino-server --sm-disable --Description: (Appropriately) Desktop Sharing
After saving, log off and log in once.
After logging in, I confirmed that vino-server was automatically started, and then confirmed that VNC was connected both via the wireless network and via the hotspot.
There were twists and turns, but to summarize.
――I don't think this is the right path, but I'm glad that I managed to reach the point where I achieved my first goal.
When the hotspot is turned on, the following dialog is displayed.
So, as you can see in this message, turning on the hotspot will disconnect the wireless network, so I mentioned it as a purpose.
--Also, make it possible to connect to the Internet from Ubuntu
Will not be fulfilled.
Well, what should I do ...