Python API and 'execute' will stuck on my command

Discussion about using the VirtualBox API, Tutorials, Samples.

Python API and 'execute' will stuck on my command

Postby renn0xtek9 » 1. Oct 2018, 21:53

The Virtualbox python API has a bug: when I try to launch something like (on a Ubuntu 18.04 to a Ubunut 18.04)
Code: Select all   Expand viewCollapse view
process,stdout,stderr=gs.execute('/usr/bin/konsole',[''])

It won't execute, and will freeze the termainl session on the host.

Interestingly it works fine from a Ubuntu to a Windows 7

see
https://github.com/renn0xtek9/VMRequests/blob/master/ExecuteRequests.py
line 138 for more code
renn0xtek9
 
Posts: 5
Joined: 25. Feb 2018, 12:57

Re: Python API and 'execute' will stuck on my command

Postby noteirak » 25. Oct 2018, 03:36

The Guest additions (required for this) have their own session on the guest, which means it will not magically link to your GUI session nor display anything in it, especially without any DISPLAY environment variable set.
The call gets "stuck" because the command is executed, the process is most likely running (check with top or ps). Until the process exists, the call will not terminate.
Hyperbox - Virtual Infrastructure Manager - https://kamax.io/hbox/
Manage your VirtualBox infrastructure the free way!
noteirak
Site Moderator
 
Posts: 5198
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7


Return to The VirtualBox API

Who is online

Users browsing this forum: No registered users and 1 guest