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 won't boot. spha 13 3,740 05-15-2024, 10:31 PM
Last Post: Richy_T
  Pinephone boot. Richy_T 5 524 05-15-2024, 03:35 PM
Last Post: Richy_T
  eSIM on PinePhone just_a_q 4 3,073 05-14-2024, 01:35 PM
Last Post: Kevin Kofler
  PinePhone - boot from microSD laserpyramid 9 1,407 05-03-2024, 10:09 AM
Last Post: laserpyramid
  pinephone virtual keyboard aular 4 707 04-10-2024, 03:45 PM
Last Post: aular
  PinePhone Doesn't Boot LED Doesn't Show Any Signs When Charging dorkydev 1 483 04-02-2024, 11:50 AM
Last Post: Kevin Kofler
  Are you using the Pinephone as your daily driver? jro 157 116,780 02-18-2024, 11:33 PM
Last Post: aular
  2020 PinePhone Manjaro CE EU for sale, name your price astrojuanlu 7 2,336 02-14-2024, 04:51 PM
Last Post: astrojuanlu
  pinephone is not bootble for the box. ijij 1 871 01-19-2024, 01:29 PM
Last Post: fxc
  Multiple issues with the Pinephone MTXP 12 3,142 12-28-2023, 07:55 AM
Last Post: MTXP

Forum Jump:


Users browsing this thread: 1 Guest(s)