x2go issue with XFCE and Ubuntu 20.04 - kvm

When I connect x2go with XFCE Ubuntu 20.04 (KVM VM) after ~10 minutes of idle time, x2go will lose its mouse focus and keyboard focus and there is no way to grab control of the session. Even restarting x2go will not bring the focus back.
The XFCE VM is still running because I can see the top output in the console.
I tried several key combinations to bring the focus back but it does not. I tried LXDE and it does not have this issue. I tried XFCE desktop 20.04 on its running in a KVM VM. I also tried installing Ubuntu server 20.04 and load Xubuntu-desktop (KVM VM) - the same issue. After ~10 minutes the x2go session-focus is lost.
What brings the session focus back is if I reboot the VM and then connect to the VM again using x2go. as I mentioned just restarting x2go will not bring the session focus back.
I tried uninstalling the screensaver and the power management features in XFCE but that did not fix this issue.

Update: this x2go bug report log suggests its screensaver related. Using the applications/settings/screensaver allowed me to turn off anything related to the screensaver, solving the problem for me. Issue appears to be solved here similarly: askubuntu forum
I've been having the same issue w/ XFCE and LXDE both after an idle period (10-15 minutes), and only on Ubuntu 20.04, not on 18.04 or earlier. In either desktop env, the session was not recoverable and required termination of the session either from the client side or via a separate terminal ssh session to kill <PID> the x2gocleansessio process on the server side (after seeing it was running using top). For a short period, I regained control in the new session until the cycle recurred.
Seems like a major problem for x2go in Ubuntu 20.04.

Just to save everyone the time of digging through the AskUbuntu forum... run this + restart and you should be good to go on Ubuntu 20.04 -
sudo apt-get remove xfce4-screensaver

If your are login via x2go and don't want to uninstall xfce4-screensaver, it's hard to solve the problem because there are intern script of xfce who launch xfce4-screensaver whatever you told him to do. I found my own workaround WITHOUT root privilege:
First activate screensaver on start-up :settings-manager -> Session and Startup->check screensaver(that sound weird but by this way you are sure to launch your xfce4-screensaver localy otherwise it's the root user who launch it which this own startup file which you can't edit without root)
Second : in ~/.config/autostart/xfce4-screensaver.desktop (if it doesn't exist uncheck then check screensaver in first step). Add to the end of this file:
Exec=sh -c "kill $(pgrep -u <YOUR-USERNAME> screen)"
This will launch it but auto-kill it after OnLogin
Edit: it's better than uninstall it because in my case that was the administrator that install for every user xfce4-screensaver so I can't uninstall it because the computer need a screensaver on the real sessions (I mean not in ssh on the physique machine). Maybe switch to Xscreensaver or other screensaver will solve this problem

Related

(WSL error at Startup) Press any key to continue

Problem:
When I launched Ubuntu 20.04, it pops up: "Press any key to continue...", and then if I press any key, it exits immediately. This prevents me from using (typing any command) in Ubuntu WSL. (It occurred suddenly today. For the last couple of days it has been working properly.)
Screenshot: Press any key to continue pops up after startup
Attempts Tried:
LxssManager service is running. But LxssManagerUser and LxssManagerUser_60d78 are stopped. Manually starting the two services doesn't help as they automatically stop themselves right afterwards.
Hyper-V service is set to auto. Virtualization mode is enabled (task manager -> performance -> CPU)
Trying to re-run the update from here https://learn.microsoft.com/en-us/windows/wsl/wsl2-kernel, but it shows WSL not installed (which is weird since I have been using it for a long time before)
Environment:
OS: Microsoft Windows 10 Family, Insider Preview
Version: 10.0.20152 Version 20152
System Type: x64 based
I'd accidentally mounted the WSL virtual disk image by double-clicking it in explorer, and it remained mounted to my machine even though it reported an error that made having it mounted useless. Unmounting the vdisk from Disk Management resolved the issue for me.
From https://github.com/microsoft/WSL/issues/4177#issuecomment-597736482
There is a conflict between wsl.exe and Proxifier.
Developers of Proxifier gave a solution.
Thanks for the info.
We have reproduced this issue. Apparently, wsl.exe displays this error
if Winsock LSP DLL gets loaded into its process.
The easiest solution is to use WSCSetApplicationCategory WinAPI call
for wsl.exe to prevent this. Under the hood the call creates an entry
for wsl.exe at
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinSock2\Parameters\AppId_Catalog
This tells Windows not to load LSP DLLs into wsl.exe process.
We have a tool that can make this call:
www.proxifier.com/tmp/Test20200228/NoLsp.exe
Please just run as admin with the full path to wsl.exe as the
parameter: NoLsp.exe c:\windows\system32\wsl.exe
This has fixed the problem in my case.
Please let me know how it works for you.
And it works well for me!
This worked magic! Go to the Windows Command Prompt and run the following command:
netsh winsock reset
Then Restart your computer. NB: Don't Shutdown since it did not work for me. Instead, Restart!
More answers can be found here.
I solved by downloading the https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msimsi and excuting it.
see https://learn.microsoft.com/en-us/windows/wsl/wsl2-kernel
I went into the bios and had to enable virtualization from there
if you got this error:
An operation was attempted on something that is not a socket.
there is something wrong with windows sockets and try this command in cmd administrator mode to reset windows sockets.
1. netsh winsock reset catalog
2. netsh int ipv4 reset reset.log
3. netsh int ipv6 reset reset.log
4. Restart the computer.
Maybe not relevant for TO but I had the same issue and just had to run in Windows Terminal:
wsl --shutdown
After that Ubuntu worked again.
powershell => type "wsl --shutdown" => error message
ctrl-alt-del => services => HvHost => right button => restart (think to stop all hyperv virtual machines before ?)
powershell => type "wsl" => OK
restart hyperv virtual machines

Ubuntu on WSL doesn't launch

I have installed Ubuntu 18.04 for windows subsystem for linux on windows 10, after enabling WSL in Powershell (instructions here: https://learn.microsoft.com/en-us/windows/wsl/install-win10).
I've done this before on a desktop but now I'm doing it on a laptop. I had no issues with the previous installation but this time around ubuntu will not launch. I get the ubuntu console popping up briefly before disappearing.
Also trying to run bash.exe from the command line fails silently (doesn't hang, just exits with no message), which may be related.
I'm struggling to figure this out as I have no idea where any error messages might be logged. Does anyone know how I can investigate further why this is happening?
Setup is a windows 10 Pro, os build 17134.376, everything up to date.
I'm struggling to figure this out as I have no idea where any error messages might be logged. Does anyone know how I can investigate further why this is happening?
Check with wslconfig.exe /l all registered distros, try to deregister the one you have problem with ( e.g. wslconfig.exe /u Ubuntu [^1]) and run the ubuntu.exe in your distro once again. Just a wild guess, it might be also a problem, if you have more than one copy of the linux distribution in you home directory.
[^1]: Warning: deregistering will delete all the associated files!

Vagrant disable SSH Agent

Getting the following when I am trying to run Vagrant up.
Have tried to re-provision etc. Even tried rolling back (in Time Machine) the user/vagrant-local directory & the vagrant-local directory where the sites all live.
An error occurred in the underlying SSH library that Vagrant uses. The
error message is shown below. In many cases, errors from this library
are caused by ssh-agent issues. Try disabling your SSH agent or
removing some keys and try again.
If the problem persists, please report a bug to the net-ssh project.
timeout during server version negotiating
I was getting this exact error.
I upgraded from VirtualBox 5.0.x to 5.1.8 and the error went way.
After upgrading I did vagrant destroy and then vagrant up and the machine booted up without issues.
So this is what I have now:
Windows 10 pro
Vagrant 1.8.7
VirtualBox 5.1.8
I also made sure everything else was updated. Don't forget to reboot.
Hope this helps.
I have faced the same issue and done the following:
Send shutdown command to your VM (virtual machine)
Run the command again: vagrant up
ssh issue was resolved after this as VM has been restarted again.
I just had the same issue on this setup:
Windows 11
Vagrant 2.3.1
VirtualBox 6.1.38
What seems to have solved the problem for me is this:
run vagrant destroy -f
temporarily disable "Use the WSL2 based engine" from Docker Desktop. Wait for Docker Desktop restart.
run vagrant up --debug. The problem is still reported, but this time Vagrant recovers and runs to the end
Verify vagrant ssh is working
Re-enable "Use the WSL2 based engine". Wait for Docker Desktop restart.
Verify things are still working (also after re-boot)

boot2docker inside VBox

I would like to use boot2docker for Windows inside a VirtualBox (Windows XP 64-bits, VT-x enabled).
I tried to start the last version of boot2docker (v1.6.2) but the boot2docker start command does not end, both using the Boot2docker shortcut or running directly boot2docker start in Windows terminal.
The "boot2docker init" actually works, but the "boot2docker up" outputs (I waited for one hour, still up):
Waiting for VM and Docker daemon to start..............................................ooooooo
There is no failure, no message, nothing major in Logs from boot2docker-vm and its state is "running".
I tried "boot2docker ssh" in another Terminal but it fails with error "error in run: exit status 255" ("boot2docker ip" fails with "Failed to get VM Host only IP address. Was the VM initialized using boot2docker?").
I guess this issue can be related to the usage of Windows inside a VB by contrast with "native" Windows.
Did someone already successfully use older versions of boot2docker inside a VirtualBox? Or maybe it is not possible...
This happened to me once, and I did a
boot2docker delete
boot2docker init
boot2docker up
and it worked.
It is rather impossible to run boot2docker inside the VirtualBox as boot2docker is based also on VirtualBox and unfortunately such nesting is not supported - here is feature request concerning this (its worth to show your interest there! :).
People are reporting success running nested VirtualBox configuration but they are using 32 bit OS for inner instance and docker supports currently only 64 bit OS.
There are however some unofficial tries to run docker on 32 bit OS but then there is a need of dedicated 32 bit docker images.
It would be interesting if such combination of above have worked for somebody.

VBoxManage: error: Failed to create the host-only adapter [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
The community reviewed whether to reopen this question 1 year ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I am running vagrant 1.4 and virtual box 4.3 on fedora 17 machine. When I do "vagrant up", I get this error:
Bringing machine 'default' up with 'virtualbox' provider...
[default] Clearing any previously set forwarded ports...
[default] Clearing any previously set network interfaces...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["hostonlyif", "create"]
Stderr: 0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: VBoxNetAdpCtl: ioctl failed for /dev/vboxnetctl: Inappropriate ioctl for devic
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterface, interface IHostNetworkInterface
VBoxManage: error: Context: "int handleCreate(HandlerArg*, int, int*)" at line 66 of file VBoxManageHostonly.cpp
I had the same problem today. The reason was that I had another VM running in VirtualBox.
Solution:
Open VirtualBox and shut down every VM running
Go to System Preferences > Security & Privacy Then hit the "Allow" button to let Oracle (VirtualBox) load.
Restart VirtualBox
sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
You should now be able to run vagrant up or vagrant reload and have your new host configured.
As mentioned in this answer, recent versions of macOS can block VirtualBox.
Solution:
Go to System Preferences > Security & Privacy Then hit the "Allow" button to let Oracle (VirtualBox) load.
(thanks to #pazhyn, #lsimonetti & #dave-beauchesne for clarifications)
For Mac OS X 10.9.3 and Vagrant 1.6.3 and VirtualBox 4.3.6 this problem was fixed with restarting the VirtualBox
sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
TL;DR MacOS is probably blocking VirtualBox. Go to System Preferences > Security & Privacy Then hit the "Allow".
Solution:
Go to System Preferences > Security & Privacy Then hit the "Allow" button to let Oracle (VirtualBox) load.
MacOS by default can block kexts from loading. You must click the "allow" button before executing the VirtualBoxStartup.sh script.
Then run:
sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart like the answer above.
(This article provides more clarity to MacOS kernel extension loading)
This issue appears to be fixed by installing the latest version of Virtual Box.
I had this issue after upgrading to OS X El Captian. Upgrading to the latest version of VB solved the issue for me. Virtual box will give you the latest link if you go to the virtualbox menu at the top of your screen and clicking check for updates.
Got the error in Mac after the update to Mojave. Probably you have an older version of virtual box.
Update to a recent version of virtualbox. (5.2 at the time of wrting this post)
Edit: adding #lsimonetti's comment.
In addition to that upgrade to Virtualbox 5.2, you need Vagrant >= 2.0.1
If you are on Linux, simply run: sudo vboxreload
I'm running Oracle VM Virtualbox on Ubuntu 16.04 LTS.
The solution that worked was to reinstall virtualbox as mentioned here:
sudo apt remove virtualbox virtualbox-5.0 virtualbox-4.*
sudo apt-get install virtualbox
I couldn't find my VirtualBox installation folder, as such could not issue the command:
$sudo /Library/StartupItems/VirtualBox/VirtualBox restart
I had to reinstall Virtual Box on my machine.
Here's the downloads page: Downloads Page
Then vagrant up worked for me after.
If after performing what is said by #totophe and on macOS it still doesn't work, just restart your mac. Then open the terminal and vagrant up.
This usually happens after each macOS update.
I had similar problem upgrading to OSX Monterey.
Solution:
Install VirtualBox Extension (download)
Accept VirtualBox Security & Privacy/Privacy/Input Monitoring
VirtualBox can also have and lose permissions for Accessibility, check that as well
In my case, I was able to solve this issue by reinstalling virtual box. I was trying to use laravel's homestead and was having this error. Reinstalling helps creating the directories that are needed for virtual box again. Took me an hour to figure out.
I'm running Debian 8 (Jessie), Vagrant 1.6.5 and Virtual Box 4.3.x with the same problem.
For me it got fixed executing:
sudo /etc/init.d/vboxdrv setup
Tried multiple solutions but the below sequence works for me.
Virtual Box: 5.2.34
Vagrant: 2.2.5
Mac OSX: 10.14.6
First Allow access to oracle inc:
Go to System Preferences > Security & Privacy Then hit the "Allow" button to let Oracle (VirtualBox) load.
Then restart VBox by this command:
sudo /Library/Application\ Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh restart
Now try Vagrant up again.
I've just had the same problem after upgrading to mac os Big Sur
Linus solution worked for me
Grant permission to VirtualBox under System Preferences > Security & Privacy > General (this request is new to macOS High Sierra)
Open Terminal and run: sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
https://stackoverflow.com/a/47652517/6146535
$sudo /Library/StartupItems/VirtualBox/VirtualBox restart
Worked great for me on Mac. This normally happens when I shut down my computer without running
$vagrant suspend
I am using ubuntu 14.04. I have genymotion installed on virtualbox. Every time I start genymotion I had no problem, but suddenly one time it said unable to load virtualbox engine and it didn't open. I went through the log file and found out it could not create a new host only network because it has already created all possible host only networks. And the problem is that it cannot allocate memory for a new network.
Fix: go to your virtual box File --> Preferences --> Network
Click the host-only tab and just delete some of the host-only networks so that you will get some memory freed and next time, a new network can be created easily.
Deletion fixed my problem.
In my case I had to do the following to solve this error for me:
totophe's answer in combination with (re)installing the latest VM-version (https://www.virtualbox.org/wiki/Downloads) (Thanks to jacobappleton & user1718159)
Steps:
First (re)install latest VirtualBox;
Run sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart in terminal (not sure if this is needed in order to get the system preferences show up the allow/disallow option);
Allow in Security & Privacy
Restart your machine
Run sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart again.
Ready to run vagrant up again.
I fixed this error by installing VirtualBox 4.2 instead of 4.3. I think the latest version of vagrant and VB 4.3 are incompatible on a fedora system.
CentOS Linux release 7.2.1511 (Core)
VirtualBox-5.0
I came across this tread while searching Google for...
VBoxManage: error: Failed to create the host-only adapter
I was using VirtualBox-5.0 to test some virtual machines created with Vagrant and setting private networks in my Vagrantfile
web.vm.network "private_network", ip: "192.168.10.2"
When evoking the command $ vagrant up I would get the above mentioned error along with /dev/vboxnetcrl does not exist.
It seems that my version of VirtualBox did not have the proper kernel module compiled for my version of Linux and the device, /dev/vboxnetcrl, does not get created.
Since I wanted to test virtual machine and not troubleshoot VirtualBox, my work around (not a solution) was to:
# yum remove VirtualBox-5.0
# yum install VirtualBox-4.3
After that I was able to create the virtual machines with specified host-adapters. And of course, under VirtualBox-4.3, /dev/vboxnetcrl was there.
Now on to testing my VMs. And when I have time, I'll see if I can get it working under VirtualBox 5.0
If you are on Linux:
sudo service virtualbox restart
Windows 10 Pro
VirtualBox 5.2.12
In my case I had to edit the Host Only Ethernet Adapter in the VirtualBox GUI. Click Global Tools -> Host Network Manager -> Select the ethernet adapter, then click Properties. Mine was set to configure automatically, and the IP address it was trying to use was different than what I was trying to use with drupal-vm and vagrant. I just had to change that to manual and correct the IP address. I hope this helps someone else.
I had the same problem just now and it was solved by simply reinstalling to the latest version of VirtualBox.
For those on Mac OS High Sierra - the installation might fail at first but you need to go to System Preferences > Security & Policy and click on the "Allow" button to allow Oracle installing the software.
For macOS Mojave, this solution worked:
sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart
I faced this issue on mac.
I did the following
Go to:
Launcher->Virtualbox
Click the icon to open Virtualbox
Start Virtualbox with the button that pops up once Virtualbox starts. Wait till the terminal window gives you the prompt,
docker#boot2docker
Then try to open docker. Hope it works!
If you are sure you have allow Oracle from system preference and the error still persist. It is highly possible you have not started VirtualBox. Ensure it is running and run vagrant up again.
Finally worked for me by following Given link.
https://www.mediacurrent.com/blog/drupal-vm-failed-create-host-only-adapter/
Tried on : 06 Mar, 2021
Mac OS = 11.2.2 (20D80)
Oracle Virtual Box = Version 6.1.18 r142142 (Qt5.6.3)
~ ➤ docker-machine create --driver virtualbox Manager1
Running pre-create checks...
Creating machine...
(Manager1) Copying /Users/speedoo/.docker/machine/cache/boot2docker.iso to /Users/speedoo/.docker/machine/machines/Manager1/boot2docker.iso...
(Manager1) Creating VirtualBox VM...
(Manager1) Creating SSH key...
(Manager1) Starting the VM...
(Manager1) Check network to re-create if needed...
(Manager1) Found a new host-only adapter: "vboxnet0"
(Manager1) Waiting for an IP...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with boot2docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env Manager1
~ ➤
~ ➤
~ ➤ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
Manager1 - virtualbox Running tcp://192.168.99.100:2376 v19.03.12
~ ➤
What helped me on Opensuse 42.1 is to install VirtualBox and Vagrant from the official RPMs instead of from Opensuse repositories.
I encountered this problem on Windows 8.1, VirtualBox 5.1.18 and Vagrant 1.9.3.
Deleting the VirtualBox Hosts-only Ethernet Adapter from VirtualBox Preferences (Network --> Hosts-only networks) fixed this for me, and vagrant up could continue and start the VM.
I had the same problem while following a tutorial on setting up Laravel Homestead for Windows 10. The tutorial provides an example IP address 192.168.10.10 to use for the server. The problem with their example IP is that if you already have a VirtualBox Host-Only Adapter set up, the IP you use for your vagrant server must have the same first three parts of the IP address of your current adapter.
You can check what your current Virtualbox Host-Only Adapter IP address is by running ipconfig (windows) ifconfig (mac/linux) and looking for VirtualBox Host-Only Adapter's IPv4 address. 192.168.56.1 was mine. Usually if the host IP is 192.168.56.1 then the guest IP will be 192.168.56.101 so instead of using the example IP I used 192.168.56.102. Any IP that is within 192.168.56.* that is not already taken should work.
After this homestead up worked perfectly for me.
TL;DR - If your current VirtualBox Host-Only Adapter IP is 192.168.56.1, make your Vagrant server IP 192.168.56.102.