How to open a terminal on my PC to the PinePhone?
#1
When I connect my Librem 5 to a Linux PC via a USB cable, I can use the command picocom /dev/ttyACM0 on my PC to open a terminal inside the Librem 5. This is very convenient, since it allows me to use my PC's screen and keyboard and to easily cut and paste into the Librem 5 terminal.

However, I can't figure out how to get picocom to work with the PinePhone. How can I open a terminal in the PinePhone on my PC?
I'm currently running Mobian, but I would be interested in hearing solutions for other operating systems as well.
  Reply
#2
【On your phone】
Code:
sudo apt install ssh
sudo systemctl enable ssh

Then check your IP address (should be 192.168.x.x, 172.16.x.x, or 10.x.x.x, replace "x" with whatever shows up).
Code:
ip a

【On your PC】
ssh mobian@(IP address of your phone)

Then to skip the password (optional step, but very convenient if you frequently login):
【On your PC】
Code:
cat .ssh/id_rsa.pub
(Copy the output, if there is none or an error message, generate your SSH key.)

【On your phone】
Code:
mkdir .ssh # If not done already
nano .ssh/authorized_keys # or vi .ssh/authorized_keys, or vim .ssh/authorized_keys, or mcedit .ssh/authorized_keys etc.
(Paste the output you copied and save the file.)
母語は日本語ですが、英語も喋れます(ry
  Reply
#3
If you really want a serial terminal rather than ssh you'll need to check how they configure the USB gadget mode. This is more of a pointer for research than a set of instructions as I don't know the details. There's an example in the Mobian wiki for changing between different networking gadgets at runtime using entries under /sys/kernel/config/usb_gadget/g1
https://wiki.mobian-project.org/doku.php...ws-via-usb
There should be a similar way to add a serial gadget.
Once you have a serial interface you need to start getty or similar on the serial port, whether manually or using a service file like getty@ttyGS0.service
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  PinePhone - boot from microSD laserpyramid 5 299 03-06-2024, 06:37 PM
Last Post: aular
  Are you using the Pinephone as your daily driver? jro 157 105,078 02-18-2024, 11:33 PM
Last Post: aular
  2020 PinePhone Manjaro CE EU for sale, name your price astrojuanlu 7 1,522 02-14-2024, 04:51 PM
Last Post: astrojuanlu
  pinephone is not bootble for the box. ijij 1 459 01-19-2024, 01:29 PM
Last Post: fxc
  Multiple issues with the Pinephone MTXP 12 1,937 12-28-2023, 07:55 AM
Last Post: MTXP
  pinephone repair shop shengchieh 0 381 12-26-2023, 02:42 PM
Last Post: shengchieh
  sudo nano file saving pinephone beta edition CharlesGnarley 4 1,478 12-22-2023, 03:44 PM
Last Post: Kevin Kofler
  Can't get Mobian on PinePhone to recognise USB-C docking bar duncan_bayne 9 6,599 12-04-2023, 02:14 AM
Last Post: Peter Gamma
  Pinephone not booting, always vibrating alexander12 7 4,665 11-22-2023, 06:46 PM
Last Post: Scary Guy
  Pinephone on Verizon chachi 3 991 10-09-2023, 11:26 AM
Last Post: alaraajavamma

Forum Jump:


Users browsing this thread: 1 Guest(s)