Raspberry Pi 3 Always booting to terminal - raspbian

I'm new to working with a Pi, I'm setting up a machine in a headless configuration but have been having issues getting the GUI to display when i use VNC to connect to the Pi.
It seems that after a reboot the Pi sits at the terminal, pressing enter on a connected keyboard then starts the GUI and all is fine.
Does anyone know how i can stop it sitting at the terminal so it boots straight to the GUI?

Related

Run Raspberry Pi script from Windows PC using Ethernet

As the title says, I want to run a script on the Raspberry Pi from my Windows PC. The connection between PC and Raspberry Pi 4 (Raspbian OS) should be done using an Ethernet cable. The Rasperry Pi cannot be operated permanently in the network. Is it correct that then a SSH connection is out of the question?
For background: the Raspberry Pi is connected to a camera and a stepper motor. Depending on the position of the object to be photographed, the stepper motor is moved and then a photo is taken. This photo is then to be sent back to the PC via the network cable. The script on the Raspberry Pi (rotation stepper motor and image capture) is implemented with Python and fully functional. Is it generally possible to run the Pi script using the Ethernet cable and transfer the generated images back?
Using a Windows QT GUI I want to start this script and display the images later.
Is this possible or can someone suggest a simpler way? Maybe someone already had a similar problem and would help me.
Many thanks in advance.
If you have an extra Ethernet NIC on your computer, you can directly connect your PC and Raspberry PI (on relatively newer hardware) or if that doesn't work, you can use a crossover Ethernet cable to connect your PC to the PI. Then configure an ssh server on the PI and enable Avahi and dhcpd and execute your script via that using MSYS ssh or Putty (ssh pi#hostname.local). Don't forget to change your hostname.
Bonus tip: you can also send your data (images) back over the same connection.

Cannot access USB UART in VirtualBox Guest on macos Host

I've created a virtualbox via docker-machine:
$ docker-machine create --driver virtualbox default
Within the Guest-OS I'd like to access my USB-Serial device, which is a Nordic nRF52840 DevKit, which is listed in macos as /dev/tty.usbmodem144241.
However, this device is not listed as USB device by virtualbox. I've also tried adding the devices as a Serial Port with the Port Mode "Host-Device" as described in this link, but without any success:
If I add the Serial Port as .tty-usbmodem the virtualbox will hang in 'Starting', I have to kill all virtualbox processes or disconnect the serial cable in order to start again. If I use .cu-usbmodem the virtualbox starts up but immediately crashes.
I'm running out of ideas here. I'm stuck at this issues since docker for mac does not support the --devices mapping without virtual machine, and for the virtual machine I somehow can't manage to add the port.
Any ideas on what else I could try?
So as it turns out virtualbox is quite picky about when a device is actually connected and does not work as seamlessly as I'm used from using VMWare:
The device I was using really just shows up as SEGGER J-Link in the USB menu
It must be added as filter (filter is really confusing > first I thought it would ignore the device)
The device cannot be added to the virtualbox 'on the fly' (using the USB-icon in the 'Show' window, see screenshot), it must not be connected before the virtualbox starts up.
The serial-tab is irrelevant > it's all handled via the USB tab.
The important fact is that the device must not be connected wenn the virtualbox fires up. So the steps to add a device are the following:
Power down the virtualbox
Make sure the USB controller is enabled
Connect the USB/serial device to the computer (host)
Add it to the filter in the virtual box
Now every time you want to use the device with the virtualbox:
Make sure the virtualbox is down (e.g. docker-machine stop default)
Disconnect the USB/serial device from the computer
Start up the virtualbox (e.g., docker-machine start default)
Virtualbox should now be able to "intercept" the device and list it under /dev, e.g., as /dev/ttyACM0
Un-/Plugging a filtered device once the box is up also works (you don't have to power down the virtualbox again if you forgot to disconnect the device before starting it up. Just wait for the box to be up, unplug, plug in, should be good).

Raspberry Pi2 IoT no HDMI output

I have had Win 10 IoT Core running on a Raspberry Pi2, it was working fine, I had ported across my signage software, and all good, then the hdmi port stopped working ? my monitor just says no output, and goes into sleep mode. the Pi is running as I can assess it via the web portal, I can still deploy my application to it, and it says its running, but nothing been displayed.
I know that when using Linux there is a config file that you can modify, but what do you do with windows version ?
you have the configuration file for Windows too. check in the root of SD card. refer https://www.raspberrypi.org/forums/viewtopic.php?t=5851. You can try setting (this forces the board to use DVI mode instead of HDMI)
hdmi_group=2 # forces DVI timing to be used
It might also be due to low power input to the RP2, which could cause HTMI to not work. Try using USB3 or 1.5A~2.0A/ 5V adapter.
Ensure that you are running headed mode and not switched to headless by mistake. Details here: https://ms-iot.github.io/content/en-US/win10/HeadlessMode.htm
he display.

Raspberry Pi (SSH X11 Forwarding) Desktop Display on MAC Strange Behavior

I'm trying to get the desktop of my Raspberry Pi to display on my mac. I've done this numerous times before with an X11 display app installed locally on the mac ( in this case XQuartz ) and X11 forwarding enabeled on the raspberry pi, through SSH with X11 enabled.
Here are the commands:
bryans-mbp:~ bryan$ ssh -X pi#192.168.1.185
pi#192.168.1.185's password:
With XQuartz running
pi#raspberrypi ~ $ lxsession&
[1] 2515
Heres the strange thing, XQuartz brings up a window in the background, it replaces the background for my desktop however its just the raspberry pi logo (same logo on the raspi desktop). I can't minimize or make use of the window. So, it's displaying something. But I can't use or interact with the display.
What am I doing wrong?
Please see the attached link (cant post images due to experience).
RPI DESKTOP SCREEN GRAB
That's indeed weird, but if you want to see the whole desktop rather than run individual X apps, what I'd instead suggest is installing xrdp on the Pi, with sudo apt-get install xrdp.
Then you can use an RDP client (e.g. Microsoft Remote Desktop Connection or its older non-App Store version) to connect. It performs significantly better than X, in my experience.
the right command for quartz x11 users is:
/etc/X11/Xsession
instead of
lxsession&

A good SSH client to open Gnome/KDE desktop sessions from Windows machines?

I'm using MobaXterm to open a Gnome desktop session on a remote system from my Windows 7 workstation with SSH and X11 forwarding. It all works very well, the remote machine is a calculation cluster that runs on CentOS. The only drawback is that MobaXterm doesn't seem to catch keyboard shortcuts like "alt+tab", which gets really annoying on the long run.
Is there another SSH client that would allow me to do what I'm doing now but with keyboard shortcut recognition?