This guide provides step-by-step instructions for configuring your Cyberdeck, including setting up the LCD display orientation, enabling Bluetooth keyboard functionality, managing Tmux sessions, and increasing the terminal font size.
- 8.8" LCD Display from Ali Express - US $37
- Raspberry PI 2 Model B for low power consumption (works out to 8 hours with RPI + Screen and whopping 24 hours with no screen)
- Bluetooth USB Keyboard - US $14
- Frameless Chalkboard - US $1.25
The Cyberdeck uses frameless chalkboard for the keyboard base and also the battery holder.
Here is the 3D model that is used to 3D print the screen holder.
The following instructions are from this thread. Thanks RPi Community!
To rotate the LCD display to a horizontal orientation:
-
Open the
cmdline.txt
file located in/boot/firmware/
:sudo nano /boot/firmware/cmdline.txt
-
Add or update the following parameter:
video=HDMI-A-1:480x1920@60,rotate=270
-
Ensure the entire line in the file looks similar to this:
console=serial0,115200 console=tty1 root=PARTUUID=247a1fd9-02 rootfstype=ext4 fsck.repair=yes rootwait cfg80211.ieee80211_regdom=US video=HDMI-A-1:480x1920@60,rotate=270
Note: Replace
PARTUUID
and other parameters with those already present in your file. -
Save the file and exit.
-
Reboot the system for the changes to take effect:
sudo reboot
The bluetoothctl tool requires interactive commands for setting up and managing Bluetooth devices. The default-agent command, in particular, does not succeed in plain bash scripts because it reports "No agent is registered" even when the command sequence is correct. This happens because bluetoothctl expects a live session where the agent is explicitly registered (agent on) before setting it as the default agent.
Using expect allows us to simulate these interactions programmatically, ensuring that:
- The agent is successfully registered (agent on).
- The default-agent command succeeds in setting the registered agent.
This makes it possible to automate Bluetooth keyboard pairing and reconnection processes reliably.
-
Create the script file:
sudo nano /usr/local/bin/enable-default-agent-and-pair.sh
-
Copy the script from the
scripts/enable-default-agent-and-pair.sh
file included in this project. -
Make the script executable:
sudo chmod +x /usr/local/bin/enable-default-agent-and-pair.sh
-
Copy the
keyboard-monitor.service
andkeyboard-monitor.timer
files from thesystemd/
directory into/etc/systemd/system/
:sudo cp systemd/keyboard-monitor.* /etc/systemd/system/
-
Enable and start the timer:
sudo systemctl daemon-reload sudo systemctl enable keyboard-monitor.timer sudo systemctl start keyboard-monitor.timer
Tmux allows you to split your terminal into panes, manage multiple sessions, and
persist layouts even after a reboot. By combining Tmux with the Resurrect
plugin, you can preserve your layout and workflow seamlessly. This is useful in
a small terminal when you are running one command and want to use the output in
another. For e.g. since google search is not an easy option in small text only
terminals, I use the openaictl
to find solutions to problems.
With tmux, I can have the openaictl
session on the left pane
and try out the instructions on the right pane.
Asciinema video showing how I use tmux and openaictl in case I run into issues when using terminal only window.
-
Install Tmux:
sudo apt update && sudo apt install -y tmux
-
Install Tmux Plugin Manager (TPM):
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
-
Update your .tmux.conf file:
nano ~/.tmux.conf
Add the following:
# Initialize Tmux Plugin Manager run '~/.tmux/plugins/tpm/tpm' # Plugins set -g @plugin 'tmux-plugins/tmux-resurrect' set -g @plugin 'tmux-plugins/tmux-continuum' # Enable auto-restore set -g @continuum-restore 'on'
-
Reload Tmux configuration:
tmux source ~/.tmux.conf
-
Install plugins: Inside Tmux, press
Ctrl-b I
.
-
Create the Systemd service tmux.service:
sudo nano /etc/systemd/system/tmux.service
Add the following:
[Unit] Description=Tmux session manager After=network.target [Service] Type=forking ExecStart=/usr/bin/tmux new-session -d -s main ExecStop=/usr/bin/tmux kill-session -t main Restart=always User=<your-username> WorkingDirectory=/home/<your-username> [Install] WantedBy=multi-user.target
Replace
<your-username>
with your username. -
Enable and start the service:
sudo systemctl daemon-reload sudo systemctl enable tmux.service sudo systemctl start tmux.service
-
Detach your session using:
Ctrl-b d
-
Reboot the system and verify that the Tmux session is restored using:
tmux attach
To increase the font size in the terminal:
-
Run the following command:
sudo dpkg-reconfigure console-setup
-
Follow the prompts:
- Select UTF-8 as the character set.
- Choose Terminus as the font.
- Select 16x32 as the font size.
-
Reboot to apply changes.
- Reboot the system and verify that the LCD is oriented correctly.
- Turn the Bluetooth keyboard off and on to confirm it reconnects automatically.
- Check the terminal font size to ensure readability.
- Verify that tmux sessions persist.