Difference between revisions of "ITerm"

From InkBox
Jump to navigation Jump to search
(Created page with "Category:User applications[https://github.com/Kobo-InkBox/ITerm ITerm] is a Qt-native terminal emulator app using [https://github.com/Kobo-InkBox/ITerm/tree/master/ext/libvterm libvterm] for interacting with a virtual TTY.")
 
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:User applications]][https://github.com/Kobo-InkBox/ITerm ITerm] is a Qt-native terminal emulator app using [https://github.com/Kobo-InkBox/ITerm/tree/master/ext/libvterm libvterm] for interacting with a virtual TTY.
[[Category:User applications]][[File:Iterm htop.jpg|thumb|Kobo Libra H2O running ITerm with the 'htop' program]][https://github.com/Kobo-InkBox/ITerm ITerm] is a Qt-native terminal emulator app using [https://github.com/Kobo-InkBox/ITerm/tree/master/ext/libvterm libvterm] for interacting with a virtual TTY.
== Installation ==
Download [https://github.com/Kobo-InkBox/user-applications/blob/main/download/ITerm.zip ITerm.zip] and unzip it in <code>[onboard-storage]/.apps/</code>.
 
'''Important''': If you plan to interact with programs that are using the HTTPS technology, you must add <code>0</code> to the <code>RequiredFeatures</code> array of ITerm's <code>app.json</code> (located in <code>[ITerm.zip]/ITerm/app.json</code>) so that it will mount SSL certificates to the container, otherwise, it won't work.
== Use cases ==
=== Default ===
ITerm runs in a containerized environment by default and thus, the provided userspace is quite limited. You can use various <code>busybox</code> commands, such as editing a file with <code>vi</code> or watching the process list with <code>top</code>.
=== SSH or telnet from the local environment ===
You can SSH or telnet to external hosts from the local environment, for example:
<pre>
$ ssh user@some.hosts.ip.address
</pre>
or:
<pre>
$ telnet some.hosts.ip.address
</pre>
=== SSH or telnet to the local environment ===
==== SSH ====
Should you want, for some reason, to access the current ITerm CLI environment via SSH from an external computer, you may do so by invoking the following commands in ITerm itself:
<pre>
$ mkdir -p /app-data/.ssh
$ dropbearkey -f /app-data/.ssh/id_dropbear
$ dropbear -r /app-data/.ssh/id_dropbear -p 8900
</pre>
This will start an SSH server on port 8900.
 
To access it:
<pre>
user@computer $ ssh -p 8900 user@your.kobos.ip.address
user@your.kobos.ip.address's password: <type 'user' here>
$ export PATH="/app-bin:/system-bin" HOME="/app-data"
</pre>
</pre>
==== telnet ====
Should you want, for some reason, to access the current ITerm CLI environment via telnet from an external computer, you may do so by invoking the following command in ITerm itself:
<pre>
$ telnetd -l /system-bin/sh -p 8900
</pre>
This will start a telnet server on port 8900.
=== Extensions ===
[[File:Iterm gomuks.png|thumb|gomuks running on ITerm]]
ITerm is an unique user application in the way that the [https://inkbox.ddns.net/git/tux-linux/rootfs/-/blob/master/etc/init.d/gui_apps#L207-224 GUI user applications system service] specially looks for extensions made for it. For example, if you like the [https://matrix.org Matrix] protocol and you'd like to get [https://github.com/tulir/gomuks gomuks] working on ITerm, you can.
 
ITerm is probably the only app in InkBox OS that doesn't require signed extensions because privilege escalation risk from other binaries should be pretty low (since it runs in an unprivileged chroot).
 
As such, to prepare and install your own extension, you can follow these steps:
# In an empty folder, create two subdirectories, named <code>bin</code> and <code>lib</code>.
# Put your extension's binaries and libraries in the appropriate directories.
# Package it with the following command, assuming you are in the root directory of the future extension: <code>mksquashfs . ../my-extension.isa -b 1048576 -comp xz -Xdict-size 100% -always-use-fragments</code>. This filename '''cannot contain spaces or special characters'''.
# In your device's mass storage, head over to <code>.apps-data</code>.
# Create a directory named <code>extensions</code> if it doesn't already exist.
# Copy the <code>*.isa</code> file you created earlier in this directory.
# When you launch ITerm again, the contents of your extension should appear in <code>/app-data/extensions/my-extension/</code>.

Latest revision as of 13:07, 29 June 2023

Kobo Libra H2O running ITerm with the 'htop' program

ITerm is a Qt-native terminal emulator app using libvterm for interacting with a virtual TTY.

Installation

Download ITerm.zip and unzip it in [onboard-storage]/.apps/.

Important: If you plan to interact with programs that are using the HTTPS technology, you must add 0 to the RequiredFeatures array of ITerm's app.json (located in [ITerm.zip]/ITerm/app.json) so that it will mount SSL certificates to the container, otherwise, it won't work.

Use cases

Default

ITerm runs in a containerized environment by default and thus, the provided userspace is quite limited. You can use various busybox commands, such as editing a file with vi or watching the process list with top.

SSH or telnet from the local environment

You can SSH or telnet to external hosts from the local environment, for example:

$ ssh user@some.hosts.ip.address

or:

$ telnet some.hosts.ip.address

SSH or telnet to the local environment

SSH

Should you want, for some reason, to access the current ITerm CLI environment via SSH from an external computer, you may do so by invoking the following commands in ITerm itself:

$ mkdir -p /app-data/.ssh
$ dropbearkey -f /app-data/.ssh/id_dropbear
$ dropbear -r /app-data/.ssh/id_dropbear -p 8900

This will start an SSH server on port 8900.

To access it:

user@computer $ ssh -p 8900 user@your.kobos.ip.address
user@your.kobos.ip.address's password: <type 'user' here>
$ export PATH="/app-bin:/system-bin" HOME="/app-data"

telnet

Should you want, for some reason, to access the current ITerm CLI environment via telnet from an external computer, you may do so by invoking the following command in ITerm itself:

$ telnetd -l /system-bin/sh -p 8900

This will start a telnet server on port 8900.

Extensions

gomuks running on ITerm

ITerm is an unique user application in the way that the GUI user applications system service specially looks for extensions made for it. For example, if you like the Matrix protocol and you'd like to get gomuks working on ITerm, you can.

ITerm is probably the only app in InkBox OS that doesn't require signed extensions because privilege escalation risk from other binaries should be pretty low (since it runs in an unprivileged chroot).

As such, to prepare and install your own extension, you can follow these steps:

  1. In an empty folder, create two subdirectories, named bin and lib.
  2. Put your extension's binaries and libraries in the appropriate directories.
  3. Package it with the following command, assuming you are in the root directory of the future extension: mksquashfs . ../my-extension.isa -b 1048576 -comp xz -Xdict-size 100% -always-use-fragments. This filename cannot contain spaces or special characters.
  4. In your device's mass storage, head over to .apps-data.
  5. Create a directory named extensions if it doesn't already exist.
  6. Copy the *.isa file you created earlier in this directory.
  7. When you launch ITerm again, the contents of your extension should appear in /app-data/extensions/my-extension/.