💾 Archived View for seydaneen.nahtgards.de › leuchtturm › dwemerartefakte › blog › 2022-03-23.gemini captured on 2022-04-28 at 17:30:17. Gemini links have been rewritten to link to archived content

View Raw

More Information

-=-=-=-=-=-=-

A perfect device for the smol web

After my (german only) introduction to the ClockworkPi DevTerm here are some thoughts and hints with focus on using it for the smol web / gemini in english.

Picture of the DevTerm from the ClockworkPi Shop

Since my DevTerm is the smaller A04 with 2 GB RAM and Quad-core Cortex-A53 - and in general the DevTerm has a rather crappy trackball and no touch screen - i set up my environment for mostily terminal usage. I didn't go fully terminal because i want to see my battery and connection status all the time and something like browsing the web works with a graphical application just better for me.

Hotfixes for the firmware

On my DevTerm there was a screen error that show the top 4 pixels of the screen on the bottom.

This can be fixed by adding following line on the end of /etc/X11/Xsession.d/100custom_xrandr:

xrandr --output None-1 --transform 1,0,0,0,1,-4,0,0,1

For the 0.1a the public key for their repository is expired. Let's fix it:

wget -O - https://raw.githubusercontent.com/clockworkpi/apt/main/debian/KEY.gpg | sudo apt-key add - 
sudo apt update

You should also change your user password. This can be done with "passwd" in a terminal. A personalized user can be added via "adduser". Automatic login should also be disabled. I replaced gdm with lightdm. If you prefer gdm you should look at /etc/gdm3/custom.conf for the autologin setting.

sudo apt remove gdm3
sudo apt install lightdm lightdm-settings
sudo rm /etc/lightdm/lightdm.conf.d/12-autologin.conf

Note: lightdm does have some display issues. you should configure ("sudo lightdm-settings") to hide the user list and active the manual login. You can type in your user name and password after boot even if you don't see all of that ;)

Gimme more security

More security can be given by using a luks setup or if you don't want to reinstall and make a sd card with encrypted file system you can use the old way with eCryptfs. The following guide also adds a new user to the system you should use instead of "cpi". Just replace "mycoolnewusername" with the user name of your choice.

1. Install the required encryption package

sudo apt install ecryptfs-utils cryptosetup

2. Adding the new user to the system you will use from now on

sudo adduser mycoolnewusername
sudo usermod -aG sudo mycoolnewusername # is needed if you want to use sudo

3. Encrypt the new users home

sudo ecryptfs-migrate-home -u mycoolnewusername

4. Logout and login using the encrypted user credentials (mycoolnewusername). Do not reboot!

5. Open a terminal and get the recovery passphrase (save it on a secure place)

ecryptfs-unwrap-passphrase

6. Reboot the devterm, login to mycoolnewusername and delete the backup

You can now safely remove the temporary user as well as the backup created under step 3. You find it's name by "ls /home", and one of the listed folders should be a user name followed by a dot and some numbers and letters (like mycoolnewusername.4xVQvCsO) - that's the backup. Type "rm -R /home/mycoolnewusername.4xVQvCsO" to remove it.

The original guide for a manual eCryptfs setup

Additional packages i've installed for my setup

For my setup i needed some tools. Read the whole article to decide what you would need and what not before installing the whole stuff.

# a much smaller taskswitcher that the normal task list
sudo add-apt-repository ppa:xubuntu-dev/extras
sudo apt update

# - devilspie2 => automatic maximized windows
# - wmctrl => more control for of windows via keyboard
# - NetSurf => small graphical little webbrowser
# - Claws-Mail => graphical E-Mail client with small footprint
# - micro => my terminal editor of choise
# - unclutter => hides the mouse cursor if not in use
# - qjoypad => configure the game controls for general usage
# - mpv => video player
# - toot => Terminal Mastodon client
sudo apt install xfce4-docklike-plugin devilspie2 wmctrl netsurf-gtk claws-mail micro xclip unclutter unclutter-startup qjoypad

# - gomuks => Terminal Matrix chat client
# - amfora => Terminal Gemini client
mkdir ~/.local/bin
curl -L https://github.com/tulir/gomuks/releases/download/v0.2.4/gomuks-linux-arm64 -o ~/.local/bin/gomuks
chmod +x ~/.local/bin/gomuks
curl -L https://github.com/makeworld-the-better-one/amfora/releases/download/v1.9.2/amfora_1.9.2_linux_arm64 -o ~/.local/bin/amfora
chmod +x ~/.local/bin/amfora

Desktop setup

The screen has only 480 pixel in height. So the panel must go to the left or right and not to the top or bottom imho. The clock can be rotated in the settings. So i came up with this:

desktop screenshot with fullscreen terminal and amfora

wallpaper i created form the ClockworkPi twitter account

As main menu on the left i use whisker menu. To open it via keyboard with something like cmd + space you just need to configure "/usr/bin/xfce4-popup-whiskermenu" to your preference.

I disabled all shadows in the window manager settings. And use a gtk/xfce theme from pling.com; "Great-IMD-evo". For the default terminal i switched to the XFCE Terminal.

Hint: beware of the font color settings. Leave the setting below hinting to none!

With devilspie2 and following config placed in ~/.config/devilspie2/something.lua all normal windows go automatically to full screen on open:

if (get_window_type() == "WINDOW_TYPE_NORMAL") then
  maximize()
end

Some GTK3 applications can't be closed via strg+q/w. So i installed wmctrl and configured strg+w via the hotkey settings to the follwing:

wmctrl -c ":ACTIVE:"

qjoypad is configured on default to mirror the arrow keys on the joypad arrows and home, end, page up and page down to the y, b, x, a buttons.

devilspie2, unclutter and qjoypad must be added to the autostart list or ~/.profile.

Thoughts

The DevTerm is a really nice and open device with some downsides like crappy plastic, a really not that type friendly keyboard and some odd design choices like ne "screws" on the side or the ports next to the keyboard which make them terrible to use the device in handheld mode.

BUT, it's cheap, the performance for the price is great and it uses two normal 18650 batteries! You can even print with it or change active cpu cores with a little script (devterm-a04-gearbox) to last the batteries longer. I get about 4-8 hours using the device with wifi and two cores active.

It works really nice to browse gemini, chat with folks at irc or matrix and toot or tweet via terminal. It's a ideal handheld device for the smol web, for hacking, programming - ok, you should use a bt/usb keyboard if you have a desk for bigger stuff or if you are not on the go - or just to play around with.

You can get your own DevTerm on the official ClockworkPi Shop

---

zurück (back)