Score:1

Ubuntu/Vagrant makes me log in every time I run a program within virtualbox

gq flag

I am using Vagrant and Virtualbox running a virtual instance of Ubuntu. Every time I use the following command "exec /vagrant/build/test_gui" the logs and output of that program show for a split second (not long enough to even try to read the text) before clearing the terminal and displaying the login once again. (pictured below) I am fairly new to all of these systems and would like to know how to stop this from happening so I can see the output of my program within the virtual machine's terminal? When I use vagrant ssh or vagrant ssh -- -X, and run the same command, it returns an error regarding not being able to find a display. I am aware this is probably what is resetting the terminal, and I am working on fixing this, but it is rather secondary- what I need is for my terminal to not reset every time there is an error! Is this possible?

Terminal with the following text:

Ubuntu 18.04.6 LTS ubuntu-bionic tty1
ubuntu-bionic login:

enter image description here

Also, because I cannot seem to find an answer anywhere on the internet, is "exec" the way I should be running executable?

I cannot seem to figure out how to both make and also run executables in this reference environment.

Pls help.

Edit.

Fixed this- Had to reset and redo environment variables, amongst other things. Unrelated BSODs in the past week seem to have corrupted a bunch of stuff, thought i got it all; guess not. Will close when i figure out how to

ar flag
Please don't use comments to ask a new question. This is a question answer site where one question at a time of the policy. The comments are our channel to ask you for clarifications. Additional information about the question should be edited into to question.
ar flag
I just had a thought, Did you install the server version of Ubuntu?
hopoffZ avatar
gq flag
Noted- thanks for the tips, I'm pretty new here. Went ahead and read the post rules (probably shouldve before posting. lol.) In terms of my ubuntu version I did not manually install it, the only packages I installed myself were vagrant and virtualbox. Ubuntu seems to have been installed by virtualbox. I looked around to see how to check for server vs desktop version, and according to what uname -a returned I seem to have the generic version rather than the server version. I will see if changing this fixes my issue :D
ar flag
The server version does not have any GUI. so a login prompt you see is normal. I am not familiar with Vagrant and virtualBox, So, I can't help you if Ubuntu is installed by Vagrant and VirtualBox.
hr flag
"**is "exec" the way I should be running executable?**" I'm not sure about your context, but `exec` is a shell builtin that tells the shell to *replace itself* with the given command. When used from a login shell, it should not be surprising that it returns you to the login prompt
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.