Software Farm for Linux - Kunnskapsbasen
Software Farm for Linux
Linux users who want to access NTNU Software Farm currently only have one safe option, which is to use the Farm's remote desktop.
It is possible for the inquisitive and daring linux-user to run single applications from the Software Farm without connecting to the entire remote desktop (point 5c), or to use the Web-interface of the Farm (point 5e). We suggest these things as possibilities, but we do not support or endorse them.
Another possibility is to run the programs on the NTNU Software Farm in your desktop browser. This is explained in point 6.
Norsk versjon - Programfarm med Linux
- The Software Farm's desktops
- Linux client software for accessing the remote desktops
- Remmina - graphical interface to the remote desktop
- Using the remote desktop
- Use of XFreeRDP, the command line program
- Using the Software Farm in your browser
Looking for something else?
Topic page about software for students and for employees | Pages tagged software farm
The Software Farm's desktops
The Software Farm has several desktop options:
|Remote Desktop||Who are to use it|
|adminfarm.ntnu.no||Employees of NTNU. Not businesses on the NTNU perimeter (SINTEF etc.)|
|officefarm.ntnu.no||Students at NTNU. Also accessible for employees of NTNU with a student account.|
|edgefarm.it.ntnu.no||Employees of the NTNU perimeter businesses|
|calcfarm.ntnu.no||Students and employees who need scientific software and software for mathematics and statistics|
|devfarm.ntnu.no||Students and employees who need access to developer software such as Visual Studio|
|legacyfarm.ntnu.no||Employees at the NTNU administration who need the outdated interfaces required to access NTNU's accounting software: legacy versions of Internet Explorer and Java|
|kavlifarm.it.ntnu.no||Persons affiliated with the Kavli institutions.|
|ielfarm.it.ntnu.no||Department of Electric Power Engineering|
Officefarm and adminfarm contains the entire Microsoft Office packet and a rich diversity of other office work tools. Calcfarm contains different mathematics and calculations software.
General points concerning the remote desktops
- You can open one or the other of the desktops on your own PC, either as a window or as a full screen application. You can then use the software available as if it were actually loaded onto your own PC.
- You will have a shared clipboard for your own PC and the external desktop, and you can save programs on your network drive (home area M:\).
- In certain circumstances, you will also have your own local disk and printer available during your remote session.
Linux client software for accessing the remote desktops
The standard Linux distributions contain a diversity of programs to access remote desktops. As an example, most distributions offers:
- Remmina: a graphic program: The recommended option.
- Xfreerdp: a command line program
- rdesktop: a command line program
- vinagre: graphic program
Recommended: Remmina. Remmina is constantly updated and developed. It has a user friendly graphical interface and more options than the alternatives. Remmina is currently a graphical interface using xfreerdp as its kernel. xfreerdp is also under constant development.
rdesktop is incapable of forwarding your local disk to the remote desktop. rdesktop is no longer under development and must be considered obsolete.
vinagre is still under active maintenance, but lacks most of remmina's features.
All of the options suggested above are FOSS and provided without any guaranteed support from NTNU-IT, but an introduction has nevertheless been provided below.
Remmina - graphical interface to the remote desktop
In most distributions, Remmina should be included in the base install, but if it is not - use your favorite method to install the packages "remmina" and "remmina-plugin-rdp" from your linux-distribution, and then launch it. This will also install the xfreerdp-libraries. Consult the official documentation for distributions other than Ubuntu, which will be used for the introduction.
When remmina is started, click on the New icon on the toolbar. The "Remote Desktop Preference" panel will open up.
- Give your connection a name, such as "officefarm".
- Choose RDP as your Protocol, and fill in the server address. Here we have used officefarm.ntnu.no
- Then enter your NTNU username and password.
- The Domain is win-ntnu-no
- Share folder allows you to choose which folder from your local disk on your PC you want forwarded connect to the remote desktop. In the example below we have chosen Documents. It is also possible to choose your entire file system.
- In the panel, choose the Advanced tab.
- Set Quality to Best. With modern broadband, the warning "(slowest)" is no cause for worry.
- If you scroll a little down, you see some additional options. The option to forward you local printer to the remote desktop is already ticked. Forwarding a local printer presupposes the you have set up a default local printer in CUPS on your linux PC. You do not have to change any settings not displayed in the images attached to this guide.
- Set Security to Negotiate. This means the the Remote Desktop server will choose the security mode for you.
- Add rdgateway.it.ntnu.no as RD gateway server. The username and password is your NTNU login information and the domain win-ntnu-no.
- Remmina will save your set-up when you click on Connect, but you can also use the Save button.
The first time you connect to each of the Software Farm's desktops, you will be asked to accept a certificate. Press "OK". This will look approximately like this:
Now the remote desktop will open in a window on your linux desktop. Trouble with certificates might make it necessary for you to delete or edit entries in /home/<local_user>/.config/freerdp, either in the file "known_hosts" or in the directory "certs", on your local computer.
Using the remote desktop
When you have pressed "Connect" in Remmina, the remote desktop will open in a window on your linux-desktop.
This is the remote desktop. You can see remmina's toolbar at the left of the window. The toolbar lets you choose between working in a full screen mode or in a window mode and between different simultaneous remote sessions.
A tip is to toggle the dynamic resolution updating, so you can adjust the size of the desktop to your choosing. In addition, the option to grab all keyboard events could help with recognizing some keybindings.
At the bottom of the window, we see the remote desktop's Windows toolbar.
It is the desktop which is the background on which the remote applications run.
The start menu
At the left end of the Windows toolbar, we see a white Windows-icon. Click on this, and the start menu with all the available programs on the software farm will appear.
To log out
Right click on the white Windows-icon and select Sign Out. You account will be signed out and you will be disconnected. If you choose to simply disconnect, your user account will stay signed in until your next session.
You can cut/copy and paste between different programs that you have running in your remote session and ones that you have on your local desktop.
To see the available disks there are several options, from the start menu, either by clicking on the Windows icon and then choosing Documents ⇒This PC or pressing File Explorer, logo either from the desktop's toolbar. On the screen for This PC you will see the disks and drives accessible from the remote desktop.
Your user profile on win.ntnu.no will make sure that your network disk (Hjemmeområdet (M:) on the screenshot below) and other resources have been connected.
If you click on "Documents", either in the left navigation pane, or in the main area, you will notice that this is also your network disk (home area M:\). Saving your file to "Documents" will, then, save them to your network area, accessible from anywhere.
If the forwarding of your local disk or folder has been successful, the local disk on your host computer/Linux PC will be shown under Annet (Other). (Here you can see that the local folder /home/olavgun has been forwarded to the remote session as olavgun på oglinvirt). The forwarded disk can also be found under Network->tsclient-><forwarded disk>.
Forwarding the local disk can be buggy and cannot always be expected to work, if you encounter issues, make sure you are using the latest version(s) of your chosen software and your distribution, keep it updated.
Adding a printer to your Windows profile
- You can set up a remote printer on your external desktop, which will then be saved in your profile so you can use it the next time you log on.
- From the start menu, type Run and a small window will appear. Type
followprint.win.ntnu.no\ and click on OK. You will now be directed to an overview of the publicly available printers at NTNU. Right click on the one called "ntnuprint-ricoh" and choose Connect... the next time you would want to print, choose ntnuprint-ricoh and scan your card on a printer on campus and it should appear. If you encounter any issues with this, consult the guide for connecting and using the printers on Windows, or contact Orakeltjenesten.
Working seamlessly with Remmina
If you know the name of the software that you want to start in your remote system, you can start the program direct from the local Ubuntu desktop which you run locally. This means that you run it in a Remmina window but without having the rest of the remote desktop available. By adjusting the size of your Remmina window, it can seem like you actually have the program loaded on your PC. By typing "WINWORD" in the "Startup program" you can start Word directly, without using the external desktop.
For other programs, my experience was that I had to know the entire file-path, e.g. for Clue:
C:\Program Files (x86)\Clue10\Clue.exe
Use of XFreeRDP, the command line program
For the technically inquisitive user
Everything in this doc from here on, apply to the technically inquisitive user. You will not get help from Orakel or any other place for this. This information might be outdated, but
To open one of the Software Farms' remote desktops
Remmina uses the software libraries of xfreerdp to connect to the remote desktops. But it is also possible to use xfreerdp directly, from the command line.
The package to install from your linux supplier is called freerdp-x11, and the program installed is called xfreerdp. Use your favourite software installer, or install from the command line with "apt install freerdp-x11". You might need sudo privileges.
In the most simple case you can type at the command prompt:
xfreerdp /u:<ditt_brukernavn> /d:win-ntnu-no /v:officefarm.ntnu.no
This will open the remote desktop in a relatively small window, and with quite mediocre graphical quality.
A more comprehensive example:
xfreerdp +clipboard /size:1570x1165 +fonts +decorations +window-drag +menu-anims /sound:sys:alsa /printer:ntnu-it-felles /drive:MyPCDocuments,//home/olavgun /d:win.ntnu.no /u:olavgun /v:adminfarm.ntnu.no
- The size of the window for the remote desktop is set with /size:wxh
- +fonts gives antialiased (smoth and sharp) fonts.
- Other beautifying Windows elements are invoked by +decorations +window-drag +menu-anims.
- Sounds from the remote desktop are played on your local PC with /sound:sys:alsa -- if alsa is your local sound-system.
- The printer set up in CUPS on your PC is forwarded to the remote desktop by /printer:<printer-name in CUPS>
- /drive:<visible_name_remote><local_disk_area> will forward your local disk area to the remote desktop. e.g. "/drive:MyPCdisk,/home/olavgun"
Write "xfreerdp -help" to see all command line options.
To run a remote application seamlessly with xfreerdp
"Seamless" means the the remote application runs exactly as it would if run from your local desktop. That is, we have the application, but no remote desktop.
This is done by using the command line option /app:"||<program-alias>" with xfreerdp. Program-alias is the name the program has in the Windows registry on the remote server, registered as a program allowed to be run remotely.
xfreerdp +clipboard /size:1570x1165 +fonts +decorations /d:win.ntnu.no /u:olavgun /v:adminfarm.ntnu.no /app:"||WINWORD"
This command line gives the result that Word on the Software Farm runs on my linux desktop, as if it were a local program on my PC:
Microsoft Word running on my Mate linux desktop.
You can test this with other program aliases, like "||Clue", "||OUTLOOK" or "||NOTEPAD". Some worked for me, others didn't.
/app: should in principle work also with real program names, such as "Clue.exe". But in that case, one probably should use the entire file path, e.g. /app:"C:\Program Files(x86)\Clue10\Clue.exe". Notice the absence of "||" in this case.
The daring linux user may download and compile the source code of a newer version. This has not een tested, but should work with seamless remote applications without problems: https://github.com/FreeRDP/FreeRDP.
Scripts for easier use of xfreerdp
Our anonymous hacker has made a script, which checks for some standard settings on the PC, sets some other default values, asks the user for user name and password, makes a long string of commandline options to xfreerdp from this, and launches it all: opening a remote desktop in a window on your linux desktop. This set of scripts is unsupported by NTNU and Orakeltjenesten, and if you choose to run them, you will do it on your own and on your own risk. A guide to what the scripts does follows:
The script is called officefarm and takes one parameter, either "-office", "-admin" or "-calc". This determines which of the remote desktops to open.
The zip-file contains three files:
Unpack them to /usr/local/bin and set chmod 755 to all three, even if we for now only will use the first one.
Write e.g. "officefarm -admin" on the command line. You will then be asked for your username on win-ntnu-no and whether you want to forward some part of your local disk to the remote session. The script will find the default printer set up with CUPS and forward it to the remote desktop. At last xfreerdp will ask for your password. Then the remote desktop will open in a window on your linux desktop:
Here we have connected to the remote desktop with xfreerdp and opened the file manager.
Using the Software Farm's web-interface with xfreerdp
The most efficient way of using the Software Farm from a Windows PC, is via the web interface (see Software Farm with Windows).
As a religious devotee of the linux god Ubuntu, someone takes offence at the fact that this at the moment is not an option for the linux community, and wants to remedy the situation even in the face of his lack of technical adeptness.
By writing "farm.ntnu.no" in the address field of Firefox, and then filling in username and password for win-ntnu-no, one is served this web-page:
If you press a program icon, for example "Word 2013[A]", a file with the extension .RDP is downloaded to /tmp/.mozilla. The first time this is done, Firefox will ask you which helper program shall be used to manage the file.
Experience shows Remmina is not able to do it.
xfreerdp is able to handle it.
a) xfreerdp will presuppose that your username at win-ntnu-no is identical to your local user on your linuxPC.
b) It will ask you for your password and domain at stdout, and will look for your answers at stdin. And when you use xfreerdp as an helper for Firefox, you have no shell open, neither to see the questions, nor to type in your answers.
Some possibilities now suggest themselves:
Alternative 1 (outdated?)
Let Firefox open a command line shell, in this shell run a script which translates the contents of the RDP-file to command line options for xfreerdp. Let the script ask the user for username and password at win-ntnu-no, and give these also to xfreerdp as command line options. Xfreerdp now runs the application from the farm, seamlessly on the linux desktop.
The scripts to do this is contained in officefarm.zip (see above). Unpack the files to /usr/local/bin and set chmod 755 on them. In this context we use the script-files rdpwrap and rconnect.
In Firefox, choose rdpwrap as a helper program for RDP-files:
For this to be possible, RDP-file must already be registered on your computer as a mime-type. To do this, open the file-manager Nautilus or Caja, and find the downloaded RDP-file, possibly in /tmp/.mozilla. Right-click on the file, choose "Open with" and "Other", and choose a program, either Remmina or rdpwrap or xfreerdp, as the standard program to open RDP-files. When you start Firefox after this, "RDP-file" will appear as a "content type" in Firefox: Edit->Setup->Programs, and it will possible to choose rdpwrap as a standard helper for Firefox to handle RDP-files.
Rdpwrap will open a terminal window and run the script rconnect. Rconnect will ask for your username at win-ntnu-no, and for which part of your local disk you want forwarded to the remote session. It will also query CUPS for your default printer and forward it to the remote program.
When this is done, xfreerdp will run the remote program in seamless mode on your linux desktop. The advantage of this method is that you can use an approved and tested version of xfreerdp, viz. the one that ships with your linux distribution (e.g. Ubuntu 16.04, which was used to test and create this guide).
Alternative 2 (best?)
The second imaginable alternative is to equip xfreerdp with a popup window, which lets you fill in username, domain and password. In this case Firefox will start xfreerdp directly as the helper application for RDP-files, and xfreerdp will by itself process the rdp file. This daring deed has actually been accomplished by our half-tamed, uneducated bush hacker, in the darkness of the night and under a blue moonlight, and has made a deb-package of it.
Please note that this is DIY-compiled from a development version of xfreerd, and that it hence has not gone through the thorough testing done with the official Ubuntu packages. NTNU-IT takes no responsibility for the use of this package and its possible consequences in the form of data loss etc. Do not install this package on machines running a 32-bit version of linux.
The package will install xfreerdp and its libraries under /usr/local. Hence it will not conflict with the official installation of freerdp. But note that your file-path probably is set to search /usr/local before /usr, and that the DIY-package will be found and used before the official package by other programs using xfreerdp and its libraries, such as Remmina.
In Firefox, now set /usr/local/bin/xfreerdp as the helper program for RDP-files. That is, navigate to this folder to choose the helper application, so that there is no doubt that it is the DIY-version of xfreerdp which is to be launched.
In Firefox, go to farm.ntnu.no, and log in.
Click on a program icon, e.g. "Word 2013[A]". The DIY pop-up window will now actually pop up, so that you might enter your username, the domain "win-ntnu-no" (preset), and your password.
Hit OK, and the application choosen, in this case "Word 2013". will run seamlessly on your linux desktop.
Using the Software Farm in your browser
You can use the software farm in the browser without installing any new software on your machine. This requires an HTML5-compatible browser, but that should not be an issue. Simply follow the link above and log in with your normal NTNU username and password and choose the program you wish to use. While this could introduce a bit more lag than connecting to a remote desktop, this is a way to use the software farm without installing anything or doing anything in particular, a quick and easy solution!
Orakeltjenesten can help if you encounter difficulties. If you are an NTNU employee, consult your local IT Support.