Desktop Environment w/TrueNAS Scale

boscorillium

Dabbler
Joined
Jan 13, 2017
Messages
10
I am about to setup a test system for the TrueNAS Scale nightlies. I would also like to use a DE with it. Is there any reason to think that wouldn't work or be problematic?


Thanks.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Besides possible dependency hell, I imagine it should work. Although I question if it's a good idea.
 

boscorillium

Dabbler
Joined
Jan 13, 2017
Messages
10
I wouldn't expect dependency hell actually. There should be very little overlap between what is required for the DE and what is required to actually power TrueNAS scale but I would agree it's at least a possibility; worst case the DE has to be built based on the dependencies TrueNAS Scale needs.

As to questioning whether it's a good idea or not; for some people it will be a very, very bad idea and not desirable.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Sounds like you understand the implications of what you're suggesting, so let us know how it works out. For science.
 

boscorillium

Dabbler
Joined
Jan 13, 2017
Messages
10
Will do. I am hoping to give it a run this weekend. I'm still recovering from a data disaster of my own. Completely unrelated. :)
 

brando56894

Wizard
Joined
Feb 15, 2014
Messages
1,537
I would say the easiest way to get a DE would be to setup a VM like a full blown desktop and either use X2Go or VNC if you want to use it on another PC, or if you would rather have the GUI on your TrueNAS server, you could pass through a GPU to the VM. That way it seems like it's natively in Linux, but isn't (well, shouldn't be) susceptible to changes that they make to the host OS.
 

Salty1

Cadet
Joined
Sep 2, 2020
Messages
4
I would very much love to do this as well so my son could use that desktop environment to game using my old GTX 970. Right now, I've build an Unraid server to achieve the same thing but I desperately want to use TrueNAS scale instead
 

inman.turbo

Contributor
Joined
Aug 27, 2019
Messages
149
There are so many DE options for debian and so easy to get set up this should be no trouble at all, provided that it isn't being used for anything critical.
 

brando56894

Wizard
Joined
Feb 15, 2014
Messages
1,537
I would very much love to do this as well so my son could use that desktop environment to game using my old GTX 970. Right now, I've build an Unraid server to achieve the same thing but I desperately want to use TrueNAS scale instead

Ah, IDK what magic Unraid has done with KVM and GPU passthrough but it has always worked out of the box for me with Nvidia GPUs. I've tried the same thing using various other virtualization focused distros, and even doing it myself on Arch, Ubuntu and probably others, but always end up with that damn Code 43 error in the Windows Device Manager after installing the display driver. Doesn't matter if I use straight qemu, or do it via libvirt. Passthrough itself isn't the issue, it Nvidia being evil and blocking their drivers from working in a virtualized Windows OS. Zero problems with Linux.

I was hoping to test the same thing with my GTX 1070 in my home server, but I've ran out of PCI slots and lanes. In order to put in the GPU I have to sacrifice one PCI-E slot, and in order to keep all my other NVMe drives in there, it cuts the bandwidth of the GPU slot from x16 down to x8 :( Having more NVMe drives is more important to me since I already have a Windows gaming rig, I just was trying to make good use of my Threadripper hahaha

Edit:
I was going to reply to inman.turbo stating that / may be mounted RO and this probably wouldn't be possible, but it's definitely mounted RW. My VM is just a test, so I took the plunge and did a apt install plasma-desktop and it had zero issues pulling in 600+ the dependencies, so there's most likely no reason why you couldn't get a full blown DE on your FreeNAS box. Will it get wiped when you upgrade or downgrade? Lets find out!

Edit 2: switching boot environments affects installed packages. Anything installed on / is lost during an upgrade or downgrade. Looks like a VM with PCI passthrough is your only option.
 
Last edited:

rssfed23

Cadet
Joined
Sep 9, 2020
Messages
9
Relating to the above, is there a way to ensure certain changes aren't overwritten on reboot?
My primary concern here is UFW (which is a must as my NAS is running in OVH and they have no functioning firewall). The run on startup rc stuff from CORE would solve this issue, but if there's a way to persist certain changes on update that would of course be better
 

brando56894

Wizard
Joined
Feb 15, 2014
Messages
1,537
Relating to the above, is there a way to ensure certain changes aren't overwritten on reboot?

Don't store anything on / :)

Why not just do everything in VMs or containers? The host system isn't really meant to run anything other than VMs/containers, and manage storage. It's not meant to be used like a normal Linux distro.
 

rssfed23

Cadet
Joined
Sep 9, 2020
Messages
9
Why not just do everything in VMs or containers?
The OP was on about running a desktop environment which I agree; isn't really something you'd want to run on a production NAS. But two things which can't really be done in VMs or containers (and are required for at least my use cases):
UFW (or another firewall) & Netdata.

The latter of course can be run in a container, but you don't get nearly the same about of stats/visibility. But not a huge problem.
The former though is one, and has been brought up on the forum a few times before for CORE. I think people sometimes confuse a host software firewall with a full blown router like pfsense.
Either way, the idea to have a FW configurable through the UI was shot down (sometimes pedantically).

In this day and age, especially with the ongoing move to ipv6, the chances someone will need a software FW on the host is significantly increased. As I mentioned, my SCALE box is on a dedicated host in OVH. It's impossible to lock down such a server without a SW firewall as well (as while OVH has a "firewall" it doesn't block connections on their internal network so any OVH server/VPS can hit your box even if you set their FW to block all traffic. Completely crazy!). I use UFW for this due to ease of use and being the upstream "preferred" way.

Initially I worked around it by running a script after every nightly update I ran to reinstall it, but now I just build my own update tarball with UFW & Netdata built in.
If there was a "proper" way to apply changes on startup (like there is in CORE) then that would of course be preferred but I couldn't seem to find the equivalent in CORE (yet). I hope in time as the UI gains feature parity that that'll exist again :).
EDIT: found what I need in Data Protection > Init/Shutdown script
 
Last edited:

brando56894

Wizard
Joined
Feb 15, 2014
Messages
1,537
Trying to shove everything into one box and making it work the way it wasn't designed to be used is just asking for trouble IMO, I've done it before. I've had no issues running Netdata in a container, you just have to give it more permission than a standard container so I can grab more metrics. I don't mess with software firewalls often, so I can't weigh in on that.
 

shadofall

Contributor
Joined
Jun 2, 2020
Messages
100
In general its a bad idea. and makes it real easy to break something. particularly file permissions if you start trying to do file management. aside from certain situations. desktop environments aren't generally deployed on linux servers. at least everyplace i've worked.

UWF can be configured via CLI from what I can see. so don't think a desktop interface would be needed since the CLI should be fully available via SSH. altho I've never used UWF so not particularly clear on the difference between it and firewalld (if there is a major diff. i work with RHEL so firewalld is there by default and what im use to)

For systems supporting a business i would say absolutely not why add more things to go wrong.

That being said I do forsee SCALE being used on alot of Consumer grade hardware eventually due to linux hardware support for Home Servers (im sure some are going to screen NOOOOO at that), where it may not matter to much if you temporarily break something.. so i saw eh why not. if your break something figure out how to fix it!

I plan to test loading an x environment at some point as i plan to add a small PI display to use to access the system if needed and figure why not have a dashboard/System info available on the display
 
Top