SSH from Windows PC into PinePhone?
#11
Thank you both for your advice.

We have to have a closer look at this.

Wibble, your great support is really a reason to buy a PinePhone Heart .
  Reply
#12
We downloaded and installed Xming according to this instruction:

https://manjaro.site/how-to-forward-x11-...ing-putty/

We where then able to configure  Putty to enable X11 Forwarding. This is nicely decribed in this youtube  video:

https://www.youtube.com/watch?v=QRsma2vkEQE

After that, we where able to login to a PinePhone terminal with user name and password, as described above.

Wibble wrote:

«Are you thinking of when I described forwarding the display using ssh -X to show libreoffice on my linux desktop? That works because both LibreOffice on the phone, and my desktop, can both use X for display. X has built in support for remote display over the network.»

We are on the phone terminal now, and are able to enter command line, as bescribed above, which is not very satisfying.

«LibreOffice on the phone, and my desktop, can both use X for display»

What are the next steps now on the phone and on the desktop for remote display over the network?
  Reply
#13
If everything's working and configured then you should just be able to run any X11 application and it will display on your Windows desktop rather than on the phone. Wayland applications will still display on the phone. For applications that can run on either there may be an option you can set to force it to use X11 but you'll probably have to look it up. If you want the application to run in the background so you can still do other things in the command line then stick ' &' on the end of the line. If you forget then you can use ctrl-z to pause the application, then 'bg' to resume it in the background. So for example to start libreoffice writer in the background it should look something like:

mobian@mobian:~$ libreoffice --writer &
[1] 2154
mobian@mobian:~$

The '[1] 2154' is telling you that the process id for the program that just started is 2154. After a few seconds the libreoffice splash screen appeared on my desktop, followed by the writer application window in phone aspect ratio (as that's where it was last started - it seems to remember the window size from the last time it ran). You can just resize the window as normal.

I'm assuming it should work the same on Windows as on linux, but I can't try it. There's a chance that the libreoffice detection thing will kick in like it did at one point with phosh, and that it's just ok for me because I'm using a common desktop environment that it recognises.
  Reply
#14
Thanks, Wibble

1. The example here shows how to start Firefox to Forward X11 Display to Windows using Putty:

https://manjaro.site/how-to-forward-x11-...ing-putty/

2. The Youtube video shows how to run LibreOffice by X11 Forwarding using Putty on Windows, and is very detailed.

https://www.youtube.com/watch?v=QRsma2vkEQE

a) We installed the Xming Windows applications, which allows to configure PuTTY.

b) In Putty, there was the option to activate  Forward X11, as described in 1)

c) then, we started in PuTTY a terminal on the PinePhone as described in 1)

d) We then typed «Firefox» in the command line of the Pinephone and return:

result:

no DISPLAY environment variable specified

e) We then typed «libreoffice –writer » in the command line of the Pinephone and return:

result:

Failed to open display

On the Windows PC, whe have two icons after installation of Xming: Xming and Xlaunch.

- With Xming, PuTTY can be configured to support X11 Forwarding

- With  Xlaunch, nothing happend.

In example 1, Firefox started in the PuTTY terminal on the Windows PC

In example 2, LibreOffice started in the PuTTY terminal on the Windows PC

In our example, nothing started in the PuTTY terminal on the Windows PC.
  Reply
#15
If the DISPLAY environment variable isn't set then nothing will know where to display anything, and it suggests you don't have X11 forwarding correctly configured. If you type 'echo $DISPLAY' in the PuTTY terminal (your ssh session) you should see something like 'localhost:11.0' - if you get a blank line then it's not set. Check that you have 'X11Forwarding yes' set in /etc/ssh/sshd_config on the phone - I don't remember whether this is the default or whether I changed it. Lines with a '#' at the start are comments not settings. If you changed it then make sure you restarted sshd after making the change - a reboot would do it. I can't really help further on the Windows side as I don't have/use it.
  Reply
#16
Debugging Information:

Source 1:

- «There is an easy way to use or run the X application GUI over a remote SSH connection using Putty.»

https://manjaro.site/how-to-forward-x11-...ing-putty/

- It shows demonstrates video that illustrates how to run firefox with X forwarding.

- On the Windwos site, Xming and PuTTX is required.

- Xming will automatically detect and configure itself to work with Putty

- Go to SSH >> X11 tab in PuTTY. Enable X11 forwarding option and then type the following in the X display location:

localhost:0.0

- next go to Session and then type the IP address of the PinePhone

- Click Open and the ssh window will open

- THE SSH WINDOW OPENED WITH A PROMT, AND WHE WERE ABLE TO LOGIN TO THE PINEPHONE IN A TERMINAL WINDOW

- Thanks for reading this article and I hope you enjoy it, was the end of the article

- THIS WAS THE WHOLE INSTRUCTION of example one

- It shows how firefox can be started in a terminal window by typing in «firefox»

- WHEN WE TYPED IN «firefox»:

Error: no DISPLAY environment variable specified

- entering echo $DISPLAY

- WE RECEIVED AN EMPTY LINE

WE ARE NEW TO LINUX AND WORKING ON A BADLY CONFIGURED WINDOWS PC WITH BADY CONFIGURED KEYBOARD. EVEN GETTING THE DOLLAR SIGN INTO THE TERMINAL WINDOW WAS AN ADVENTURE, SINCE IT WAS NOWHERE ON THE KEYBOARD.

BEFORE FURTHER DEBUGGING, WHE NEED TO CHECK ALL THE AVAILABLE OPTIONS TO FIND OUT WHICH IS THE EASIEST ONE.
  Reply
#17
https://wiki.postmarketos.org/wiki/VNC

I just tried it on mobian and it worked. On the phone in the terminal (not via ssh, at least for the wayvnc part):
sudo apt install wayvnc
wayvnc -r 0.0.0.0

The -r option makes it render the mouse pointer as shown on the phone's screen which may or may not be useful. The 0.0.0.0 tells it to listen on all the phone's IP addresses - good for getting started, but it would be better to use the address for the interface that you'll actually be using. You need to know that address to connect anyway. Since I didn't specify a port it will use the default 5900. The PmOS wiki page specifies port 9999 instead.

Now on your PC, using the VNC client of your choice, connect to the phone's IP address and port 5900 (or whatever else you specified when starting wayvnc). I used TigerVNC which is available for both Windows and linux.

This will give you the copy of what's on the phone's screen in a window on your desktop, although it's a little laggy. You can copy and paste text between them - I haven't tried anything more complicated like dragging and dropping files. I wouldn't like to use libreoffice this way, but if you can't get X forwarding to work it's an option.
  Reply
#18
We installed PostmarketOS posh on your first PinePhone, and are happy that whe managed to install and start LibreOffice on it. The installation method was distro hopping:

https://www.youtube.com/watch?v=Zf0zwq6jI30&t=1s

We have now  PostmarketOS and LibreOffice installed. When we put in the installation SD card, it boots into JumpDrive, and is possible to access files on the PinePhone from PC with the Windows file explorer, which is great, an option which was a reason to change from an Android phone to a PinePhone.

Currently we love our installation and it s features.

We managed to install LibreOffice by typing:

sudo apk add libreoffice

now, we tried to install wayvnc on our setup:

command: sudo apt install wayvnc
error:     sudo: apt: command not found

we tried:

command: sudo apt install wayvnc

which worked fine.

We installed TigerVNC on our Windows PC and run it:

the TigerVNC whe installed is a VNC viewer which asks for a  VNC server.

Wibble:

«Now on your PC, using the VNC client of your choice (we have chosen TigerVNC), connect to the phone's IP address and port 5900»

phone ip adress is: 192.168.1.103

port it will use the default 5900 as wibble said.

The TigerVNC ask for  VNC server. Whe typed in  192.168.1.103 as  VNC server in  the TigerVNC VNC window. We could not find an option to set a port in  TigerVNC. We pressed «connect in  TigerVNC. The TigerVNC window disappeared.

After a view seconds, the TigerVNC responded with an error message,

unable to connect to  192.168.1.103. The other side did not respond after a certain period of time. The host did not react. Try once more?

We tried several times once more.

The phone is still listening patiently after typing:

wayvnc -r 0.0.0.0

what might be wrong?
  Reply
#19
We have overseen this page:

https://wiki.postmarketos.org/wiki/VNC

The port number is entered after the ip adress in the TigerVNC.

The ip adress of the phone is: 192.168.1.103

wibble said:

«Since I didn't specify a port it will use the default 5900»

We entered 192.168.1.103:5900 into  the TigerVNC

result: connection error

wibble said:

«The PmOS wiki page specifies port 9999 instead»

We entered 192.168.1.103:9999 into  the TigerVNC

result: connection error


The guide explains how to setup a VNC server on your phone has the example:

$ wayvnc 172.16.42.1 9999

before, whe used

wayvnc -r 0.0.0.0

but we suppose 0.0.0.0 is a symbol of an ip adress, therefore we typed on the phone (by trail and error):

$ wayvnc 192.168.1.103:9999

result: Error: Failed to bind to address on the phone

we typed on the phone:

$ wayvnc 192.168.1.103: 5900

result: Error: Failed to bind to address on the phone
  Reply
#20
Sentdex who teaches Python on his Youtube channel with 1,13 Mio subscribers recorded a video how to remote access with SSH a Rasperri PI from a Windows PC.  Sentdex had 433.845 views for his video:

https://www.youtube.com/watch?v=IDqQIDL3LKg&t=4s

Sentdex inspired me, that this should also be possible for the PinePhone, trough SSH or VNC server. It is possible as the instruction here shows. But will it also reach 433.845 viewers?
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Shocked Slow Teathering With PinePhone kujo_marble 2 152 Yesterday, 08:24 PM
Last Post: kujo_marble
  pinephone-support package not upgradable on Mobian fhireman 4 282 09-24-2022, 08:01 AM
Last Post: dante404
  Are you using the Pinephone as your daily driver? jro 110 48,288 09-22-2022, 12:17 AM
Last Post: linmob
  Pinephone power consumption figures? girl 4 381 09-20-2022, 01:48 AM
Last Post: girl
  Tow-boot on Pinephone beta edition saddamus 10 429 09-11-2022, 02:43 PM
Last Post: saddamus
  Satellite Communications on Pinephone(beat Apple!) biketool 3 278 09-11-2022, 12:23 AM
Last Post: biketool
  Pinephone availability in volumes? oobdev 1 130 09-09-2022, 01:47 AM
Last Post: oobdev
Bug Pinephone Pro LTE issue DoesOkay 4 201 09-08-2022, 05:06 AM
Last Post: DoesOkay
  PinePhone for Kids iraklisam 2 204 09-01-2022, 10:58 PM
Last Post: dachalife
  PinePhone as Linux PDA? jakfish 4 287 08-31-2022, 01:39 PM
Last Post: jakfish

Forum Jump:


Users browsing this thread: 1 Guest(s)