Connection FreeBSD software to GUI within TrueNAS?

matclou

Dabbler
Joined
Feb 15, 2020
Messages
33
Dear community,

I have a rather general understanding question in relation to the use of FreeBSD jails - in which I am a real beginner.

As I understand, there are several softwares that can be installed on FreeBSD and that are collected here: https://www.freebsd.org/de/ports/

My question relates to the graphical representation: Do I understand it correctly that these "ports" and packages have normally not implemented a graphical interface? And, that one then normally uses XORG and connects it to this application? - as described here: https://docs.freebsd.org/en/books/handbook/x11/#x-config

Does this also work when using FreeBSD as Jails within TrueNAS, where a monitor or similar is not directly available? How would you approach the graphical interface? What are good alternatives? Are there good instructions how to realise it?

Best regards

matclou
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You need an X11 server for your desktop environment. With X11 forwarding over SSH you can then run UI applications in a FreeBSD jail.

The question is why you would want to do that? Are you thinking of things that are not available for your desktop OS? Which ones in particular and which desktop OS?

The most common use for jails is running server applications that do not have a native UI but present e.g. a web interface. Nextcloud, Grafana, Gitlab, ...
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Do I understand it correctly that these "ports" and packages have normally not implemented a graphical interface?
No, not really--while probably most of the FreeBSD packages/ports are CLI-only, there are plenty that have a GUI. But your NAS doesn't have a graphical environment, and neither does the basic FreeBSD installation that's set up in the jail--and the jail also doesn't have access to any graphics card that might be installed in your server either. If you want to run software that uses a local GUI in a jail, one option is to use X with a separate client and server, as Patrick suggests. Another would be to install X alongside of noVNC to give you that jail's desktop environment via your web browser.

But really, if you're wanting to use software that calls for a local GUI, a jail probably isn't the best way to do it; a VM (either on TrueNAS or elsewhere) would give you that console capability.

Note that I'm talking about a "local GUI," or what Patrick refers to as desktop software. This is distinct from present a web interface; to access one of those you'd use a web browser on your client machine(s).
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Do I understand it correctly that these "ports" and packages have normally not implemented a graphical interface?

That's somewhat of a misunderstanding. The TrueNAS system does not include the X11 Window environment, but even if it did, it would only appear on the system's attached VGA console, and would only be available if you were sitting in front of the system's monitor and keyboard. This is not an available option in TrueNAS.

These days, "GUI"-like components for network appliances are typically supplied over the web via web user interfaces. These can then be accessed via anywhere you can get network connectivity to the NAS, whether it is your PC next to the NAS, or a laptop halfway around the world connected via VPN.

Do I understand it correctly that these "ports" and packages have normally not implemented a graphical interface?

Ports and packages are typically based on UNIX, and many of them do not have a native X11 component. Almost all ports and packages are able to be run from the UNIX shell prompt, however, and often interact with the user within the shell or login session in a textual fashion. You can use sshd to SSH into a jail or even the host system to interact with them.

In a jail, it is also possible to install the X11 Window system, and then use $DISPLAY to point at the X11 Window Server that you can optionally install on your local PC or laptop. This can allow you to run any native X11 stuff you'd like.
 

matclou

Dabbler
Joined
Feb 15, 2020
Messages
33
Hi,

thank you for your useful replies! In fact I was particularly thinking of Tellico, which is a collection management software, which also has a FreeBSD version (https://tellico-project.org/). The problem is, that it does not have a Windows version - therefore I was thinking about installing it at central place like TrueNAS.

However your replies show me that this would be rather complicated, because indeed Tellico probably has no web interface. So If I understand you correctly (?) the more easier solutions would be to either run a virtual machine on TrueNAS and installing tellico there - or install Tellico on a local Windows PC with the help of a virtual machine.

Do you share this view?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
The remote graphical console of VMs in TrueNAS is also rather limited. I would not use TrueNAS for interactive graphical applications at all. So yes, a VM (either in Virtualbox or the free VMware player) looks like one possible approach. Also there might be a chance to run the Linux version in Windows Subsystem for Linux:

 
Top