Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Thread Tools Display Modes
  #1   (View Single Post)  
Old 20th December 2023
rufwoof rufwoof is offline
Port Guard
Join Date: Nov 2023
Posts: 25
Default Base OpenBSD + tigervnc and use your phone for wifi and web browser

So you install OpenBSD, perhaps created a ~/.xsession file containing just
... as per how many prefer cwm over the default fvwm window manager (cwm is great once a few simple key combos become second nature), so with the newly installed OpenBSD firmware updated and syspatch having been run, and reboote ... and you're good to go.

But the wifi doesn't work, as in my case. No matter, a USB cable to a android phone and
dhclient urndis0
has you tethered to that, you now get you internet access via the phones wifi (or data). My default/original USB cable didn't work for that, had to buy a cheap laptop to phone usb cable that caters for both power and data, a few bucks cost. And had to put the phone in developer mode, as per some internet instructions I found, can't recall the exact method something like locating the phones build number and tapping that six times in a row or something like that.

So what about a browser, pkg_add chromium perhaps, nah! Might as well use the phone.

Without needing to root the phone you can install f-droid by visiting its web page and downloading/installing that on the phone, google/android will throw out repeated warnings of "its not google" but I just ok'd those warnings. With f-droid repo available, pkg install termux ... for terminal session on the phone, I also installed termux-api as that gives some nice additional features, such as being able to ssh in and trigger a camera picture being taken, or send a sms etc.

Once termux is installed, also install openssh, and set up sshd (/etc/ssh/sshd_config). On android the ssh port has 8000 added to it, so instead of port 22 its port 8022
I just start sshd from the termux command line
... and that just drops into the background

Somewhere such as opening Network, wifi and tapping the wifi you phone is connected to, will reveal the phones IP address, perhaps, so from your laptop you can
ssh -p 8022 and login as root (in termux don't forget to passwd as root and set a root password that you can use for that).

ssh'ing into the phone from your laptop makes things a lot easier to type when you're using your laptops screen/keyboard.

After that, well set aside a hour hour or so. On the phone

pkg install x11-repo
pkg install termux-x11
pkg install tigervnc
pkg install jwm
pkg install otter-browser
pkg install aterm

vncserver -localhost
for the first time, you'll be prompted to enter a password that I believe has to be at least 6 characters, 123456 for example, and again, to confirm the same password

the kill that vncserver session, which assuming it opted for display :1 as likely it did, then
vncserver -kill :1
kills that

edit on phone ~/.vnc/xstartup to run jwm i.e. change the last line from twm & to just jwm (with no background &)

Start vncserver again
vncserver -localhost
and you're done with the phone

On your laptop, set up a ssh tunnel to the phones vnc session
ssh -p 8022 -f -N -L 5901:localhost:5901
(or whatever IP your phone has been allocated if different to
and then with tigervnc installed in OpenBSD
vncviewer localhost:5901
and you should drop into a jwm desktop where the Menu/Terminal option starts xterm (aterm). Within which you can run otter-browser ... and up pops a browser similar to Opera.

If terminal within X/jwm doesn't work, you can always ssh into the phone and run
DISPLAY=:1 otter-browser
or even type that directly into your phones termux command line

I've never used Opera web browser (otter in termux), but from a quick dab it runs OK for me. Internet Speed test via the phones wifi indicated a 40Mbs download speed, so reasonably quick enough. No graphics acceleration though, so not high-end, but likely good-enough for many. I also have a local server (i5 8GB nvidia desktop box) that I vnc into, 140Mbs from that and vnc's screens that were rendered via the graphics card, but that's more for when at home, when out and about having the phone as a 'server' ... works ok. With the home server I also have access to LibreOffice ...etc. via that server box.

vnc is faster than X forwarding, considerably faster. I've talked through the above without having made any real notes as I went to I've probably missed some steps, more a discovery mission, trial and error as I went. I think however that I've covered most of the installation.

Just base OpenBSD with only tigervnc installed (you might like to also pkg_add jpeg as that can make tigervnc faster), with some firmware etc and mine shows pkg_info | wc -l of 64 packages installed. Where other than outbound (from OpenBSD) for ssh and vnc, the core OpenBSD security is sound/secure.

I snapped the attached image from within Linux when vnc'd into the phone. Looks the same from within OpenBSD but without the bottom tray bar.
Attached Images
File Type: png i1.png (58.8 KB, 36 views)
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Xorg and OpenBSD security record on the Base Install. shep News 3 27th October 2018 08:42 AM
ftp.fr.openbsd.org not available by base ftp shep OpenBSD Installation and Upgrading 2 6th July 2015 04:38 PM
OpenBSD nginx will be removed from base in OpenBSD-5.7 jggimi News 2 27th August 2014 05:59 PM
porting TigerVNC? hpabsdbeginner1 OpenBSD Packages and Ports 5 29th April 2014 04:43 PM
OpenBSD nginx is going into base ocicat News 1 23rd September 2011 08:23 AM

All times are GMT. The time now is 06:24 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick