This article is transcoded by 简悦 SimpRead, original at zhuanlan.zhihu.com
Background
The lab recently set up a high-performance Mac workstation. We want to use this workstation to build a small multi-user server to fully utilize the machine’s resources (the school’s cluster multithreading scheduling and IO are somewhat poor, so running programs is inconvenient). Resources include both hardware and software, as well as the Mac ecosystem. At the same time, the workstation is also used daily by lab members, so it is a premise to not interfere with the normal use of the machine. Specifically, the requirements are as follows:
- Each user has an independent home folder (like Linux);
- Each user can have an independent graphical desktop (this feature seems to require the server machine’s GPU to be powerful enough);
- Shared software.
System Version
MacOS Big Sur
Final Solution
- Create accounts according to the “Server Configuration” method below;
- Independently install NoMachine on the accounts that need remote access and start the software; Free Remote Desktop For Everybody
- Client downloads the corresponding version of the system, and connects directly using the NX protocol
Very smooth, also supports cross-device copy-paste, almost a perfect solution!
Solutions found online
1. Server (Host)
Step 1: In ‘System Preferences,’ go to ‘Users & Groups’ and create users:
![]()
Step 2: Go to ‘Login Options,’ configure fast user switching:
Note: This step is necessary for Windows to use VNC to access; if other hosts are all Macs, this step is not required.
![]()
Step 3: In ‘System Preferences,’ go to ‘Sharing’ and configure sharing options:
![]()
![]()
![]()
2. Client (Login User)
2.1 Mac User GUI Login
On the desktop, click ‘Go’ > ‘Connect to Server’
![]()
Enter the IP address:
![]()
Enter the account to login and select ‘Connect as Registered User’:
![]()
Successfully open the personal user desktop of the host:
![]()
You can transfer files directly in this window. Of course, you can also use other tools for file management (such as ForkLift) from the app store).
2.2 Windows User GUI Login 在 MacOSX 上实现多用户远程桌面-CSDN博客" data-balloon-pos=“up”>[1]
Windows users need to first download VNCViewer (free): Download VNC Viewer for Windows, enter the IP address and user info. In addition, Windows users need to log in to the corresponding account on the host first (this is why the fast user switching feature mentioned above is needed).
This method is very laggy, reportedly because it realizes remote connection through continuous screenshotting, compression, transmission, and decompression performance - Why is VNC on Windows so slow? - Super User" data-balloon-pos=“up”>[2].
![]()
2.3 Shell Login
After this configuration, the host supports file transfer using sftp, and remote connection using ssh, so it can also be used directly as a Linux server.
Shared Software
Default installed software and computing platforms (anaconda, R, java, etc.) can be shared by all users. However, some software uses shared buffer areas, causing only one user to be able to use the software normally (e.g., when RStudio is installed on the host, other users open it and only see “Rstudio cannot be opened due to a problem”). In such cases, you need to change to local installation, i.e., drag the app inside to the desktop (or local folder), so that an independent software installation for individual users is done.
![]()
References
- ^ Implementing multi-user remote desktop on MacOSX https://blog.csdn.net/iteye_17686/article/details/82231369
- ^ Why is VNC on Windows so slow? https://superuser.com/questions/285250/why-is-vnc-on-windows-so-slow