How to create an activity to access a Linux terminal

How to create an activity to access a Linux terminal

by Lisbeth López Verdecie -
Number of replies: 2

Hello Juan Carlos,

I want to create a task type where students can use some kind of webbased command line or ssh session in order to access virtual machine (or docker container). Is it possible to do it with this module?

Thanks for your time,


Average of ratings: -
In reply to Lisbeth López Verdecie

Re: New Virtual Programming Lab (VPL) module

by Juan Carlos Rodríguez-del-Pino -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Dear Lisbeth,

VPL is intended for programming activities. You can use VPL for programming in Bash language (shell script) as any other supported programming language. Notice that you must use the file extensión "sh" to run the code.
E.g.
Write a test.sh file

#!/bin/bash
echo "¡Hola Lisbeth!"

If you want that your students get interactive access to an ANSI terminal using a shared machine (not a virtual machine for each one) with zero configuration, you may use VPL. But notice that, each execution is a new start from scratch, no data is kept in the user environment from a previous execution. To get this use the following code

#!/bin/bash
bash

I think that the best approach may be a mix by launching a new "bash" at the end of the code. This will allow to develop and executing a shell script and then show the results and explore new commands.
E.g.
Write a test.sh file

#!/bin/bash
echo "¡Hola Lisbeth!"
bash

Notice that your students can not use commands with root sticky bit.

Best regards,
Juan Carlos

Attachment Screenshot_2020-04-15 Students Demo Any programming language Edit.png
Average of ratings: Useful (1)
In reply to Juan Carlos Rodríguez-del-Pino

Re: New Virtual Programming Lab (VPL) module

by Lisbeth López Verdecie -
Dear Juan Carlos,

Thanks for your response and recommendations. This looks like a good solution for what I want to do.

Best regards,
Lisbeth