How do I run graphical / GUI applications while using WSL on a CLSE computer?

To run graphical or GUI applications while using WSL, you first need to map a drive to the following network share:

\\ncdc-smb.m.storage.umich.edu\caen-linux-apps

To do this, right-click the Windows Start menu, and select File Explorer:

Right-click the Network folder on the left, and select Map network driveā€¦

From here, you can assign a drive letter to CAEN's remote desktop environmnt. Copy the directory address described above into the Folder line, as shown below (paste)

Click Finish, and you can see all of the applications available to run through WSL:

To run an application, you must first mount the Z: drive (or whichever drive letter you selected above). Run WSL2, as descried here.

Next, we must mount our Z: drive to a mount folder. For example, /mnt/apps or /mnt/z. In this example, we will use /mnt/apps. In the root directory (/), run the following commands:

mkdir /mnt/apps
mount -t drvfs Z: /mnt/apps
cd /mnt/apps

To confirm that this has worked properly, you can run the command ls, and make sure that you get a list of application folders (these should be the same as appeared in the files app before).

Running Apps

To run an app, you must first add a username using the following command:

useradd username

Next, run the user with sudo privileges:

su username

Finally, run an application executable by simply typing in the file path to the executable. For example, to run "vscode" you might execute the following:

/mnt/apps/vscode-1.70.2/code/code

Details

Article ID: 11729
Created
Thu 2/29/24 11:58 AM
Modified
Mon 3/25/24 9:23 AM