Headless - Server Install

Hello,
I am trying to create a “headless server” using the TX2. I installed Jetpack 3.2.1 without vision, Cuda or other libraries and samples. The install still contains “desktop” environment complete with libreoffice, chromium etc. Removed the desktop applications but when I try to remove X modules, a lot of other systems break including the network.

Can you someone point me to any notes or documentation for minimal server installation for the TX2? I can always install the modules I need.

Thank you

1 Like

I haven’t set it up, but what you’ll want is something like VNC…search for “virtual desktop”. One I’ve seen reference to, but not tried, is vino. References related to the topic (don’t know how much it’ll apply to you):
[url]http://ubuntuhandbook.org/index.php/2016/07/remote-access-ubuntu-16-04/[/url]
[url]https://devtalk.nvidia.com/default/topic/1001017/jetson-tx2/remote-desktoping-into-jetson-tx2-from-windows-10/post/5123184/#5123184[/url]
[url]https://devtalk.nvidia.com/default/topic/995621/jetson-tx1/jetson-tx1-desktop-sharing-resolution-problem-without-real-monitor/post/5159559/#5159559[/url]

I may not have explained clearly. The TX2 will be used in the field connected to a cell network for some autonomous data collection and processing (occasional remote access). Having X/Desktop tools/applications is not necessary (example thunderbird or libreoffice etc.) I can always ssh into the system for remote access. Access is not the issue.

I am trying to remove X tools and make TX2 a remote, headless system in other words a server platform. I did the following… but it breaks a lot of regular packages including network operations. Wondering if someone has done something similar and managed to get a minimal, non-desktop installation working.

update

sudo apt-get update

install the ‘tasksel’ package so we can remove the desktop image

sudo apt-get install tasksel

remove the desktop image

sudo tasksel remove ubuntu-desktop

tell tasksel to start the server image setup

sudo tasksel install server

install the server images

sudo apt-get install linux-server linux-image-server

remove lightdm

sudo apt-get purge lightdm

remove all packages no longer required (~400 MB)

sudo apt-get autoremove

X11 is usually misunderstood. X does not provide any desktop or end user applications by itself, it simply provides GPU access (or framebuffer access) in a standardized way. In the past nobody used a GPU for anything but video, and naming tends to fool people into thinking X is desktop display software and not an ABI talking to a framebuffer or GPU. The NVIDIA driver is bound to the ABI of the X server, and much of what CUDA accesses is via the X ABI even when there is no desktop. Think of a virtual server as a headless stub to the GPU…though it can be a proxy where a remote application might talk to it. Should it happen that the virtual desktop runs something within it which is a GUI it works and can be viewed by remote software…should it not be a GUI and still provide GPU access to CUDA, this also works.

The reason why an end user of CUDA or video must be in group “video” (“grep video /etc/group”) even when no video is involved is because this is really “the group for GPU access”.

What you really want to get rid of is the login manager and window manager, along with all applications linked to those as end user software.

Here are some URLs of interest:
[url]https://www.jetsonhacks.com/2016/05/03/jetson-allow-graphics-without-hdmi/[/url]
[url]https://devtalk.nvidia.com/default/topic/1036010/jetson-tx2/underflow-using-pal-720x576-hdmi-video-output/post/5263098/#5263098[/url]

I remember a while back someone had posted some steps for some sort of absolute removal of X (perhaps @WayneWWW?), but unfortunately I don’t remember which thread that was in.

The simplest approach is:

sudo systemctl set-default multi-user.target
sudo system systemctl mask lightdm.service
reboot

you will now boot in text mode without a display manager.

I struggled with creating a minimal system for a while but gave up on the effort because it became a big headache and needed to be redone and tested each time NVidia came out with a new release. Simply disabling the display manager and leaving all the packages installed accomplished the objective of booting to a minimal system.

1 Like