Did you try running your scripts on the default Jail server to see if this is a config issue?
Hi Garth,
For both the php file I get the blue window (same as first post). For the r test file I get a terminal window (attached).
No obvious error messages.
I hope you can help me further.
Kind regards,
Andrew
Can you please share the code you’re using to test the R file?
Hi Garth,
Thanks for sticking with me. Apologies again for being so inept! The code is simply:
print("Hello World!")
(from here: https://www.datamentor.io/r-programming/examples/hello-world)
Kind regards,
Andrew
P.S. I've also included a screenshot showing the output from the built-in Check execution servers tool.
Error constructing proxy for org.gnome.Terminal...
Hi Andrew and Garth,
Thank you for your detailed message and for testing VPL with R on the Docker-based jail server. I’ve tried to reproduce your issue using the Docker image jcrodriguezvpl/jail-ubuntu-full, but so far, I haven’t encountered the same problem.
The message you're seeing — Error constructing proxy for org.gnome.Terminal — appears to be related not to VPL itself, but to the container’s graphical environment or its resource constraints.
Running R in VPL 4.3.2
With the release of VPL 4.3.2, we have simplified R integration by using VPL’s new running modes. These allow better control over how R scripts are executed, especially in text mode or GUI terminal environments.
As you may know, the R tool is based on a REPL (Read-Eval-Print Loop) interface, which complicates direct integration with VPL. After exploring various approaches, the latest solution uses Rscript, which is better suited for automated/scripted execution.
Here's how R execution works using Rscript in VPL 4.3.2:
- The first
.Rfile in the student submission is run usingRscript --vanilla. Since
Rscriptis not interactive, you need to:- Use
readLines(file("stdin"), n = 1)to read input. - To display charts:
Save them as image files using
png("file.png")orjpeg("file.jpg"). Generate the image, chart, etc. Close the graphics device usingdev.off(). Show the image with an external viewer using:r system("nohup xdg-open file.png &")(Note: This need a text in GUI run mode)
- Use
Suggested Setup (if not using VPL 4.3.2)
If you're not yet on VPL 4.3.2, you can configure R execution manually by using the following vpl_run.sh script in "execution files" for text-only mode:
#!/bin/bash
# Script for running R in VPL
. common_script.sh
check_program R
get_first_source_file r R
cat common_script.sh > vpl_execution
echo "Rscript --vanilla \"$FIRST_SOURCE_FILE\"" >> vpl_execution
chmod +x vpl_execution
To run in a GUI terminal (text in GUI mode), you may add to the previous vpl_run.sh:
mv vpl_execution vpl_execution_in_gui
cat common_script.sh > vpl_wexecution
cat <<'END_SCRIPT' >> vpl_wexecution
if command -v gnome-terminal &> /dev/null; then
gnome-terminal -- bash -c "./vpl_execution_in_gui; echo; read -p 'Press Enter to continue...'"
elif command -v xterm &> /dev/null; then
xterm -e bash -c "./vpl_execution_in_gui; echo; read -p 'Press Enter to continue...'"
elif command -v konsole &> /dev/null; then
konsole --noclose -e "./vpl_execution_in_gui"
elif command -v xfce4-terminal &> /dev/null; then
xfce4-terminal --hold --command="./vpl_execution_in_gui"
else
echo "No terminal emulator found. Running without GUI terminal."
./vpl_execution_in_gui
fi
wait_end vpl_execution_in_gui
END_SCRIPT
chmod +x vpl_wexecution
Best regards, Juan Carlos Rodríguez
Success!! Error constructing proxy for org.gnome.Terminal...
Success!!
I updated the plugin (to tag V4.3.2), added a new Virtual programming lab activity using the defaults, and it worked!
It run in the "blue" window (like PHP) so I guess that is "text mode". (Thanks Juan Carlos for your comment re the gnome issue not being related to VPL itself - that is very useful info).
So, for now, I am up and running.
Thank you all!