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

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&

Related

How to remote SSH into a MacOS or Linux terminal using the Termius app?

I have been playing with the Termius app on Android running downloaded shell scripts that I wrote, catting files and snooping inside my device's directories; among other goofy stuff.
I have seen in some tutorials that I can remote SSH into my computer's terminal and run commands into my Android's Termius as if I'm typing on my computer's keyboard.
Having attempted these instructions myself, I've found they're no good (IMHO) and I couldn't make them work. Also, these tutorials have no good explanation for how I am actually SSHing using the Termius app.
The question is: How do I make it work and how does it work?
You would need to:
generate a key on Termius (and export it)
add that key to your Mac or Linux remote user ~/.ssh/authorized_keys
connect to the remote computer using ssh remoteUser#remoteIP
That assume you have an ssh daemon listening on that remote computer.

Remote access to a Jetson Nano

I am trying to remotely access a Jetson Nano from my mac. So far I have done the following:
I installed microsoft Remote Desktop on my mac
I connected the nano with my mac through the Micro-usb Port
In network I could see the connection "linux for Tegra" where my nano would be 192.168.55.1
With this I still cannot remote access the nano
So I open a terminal and typed
>ssh username#192.168.55.1
and I could access the nano terminal.
So I think now, I have to do
>sudo apt install xrdp
in order to be able to remotely access the GUI.
However, the nano does not have internet connection.
Is there a way that it can use the internet connection of my mac to do this?
(I am reading a tutorial on Rasppi with windows and apparently this is possible)
One of the approaches is to install X server for mac and then use ssh -Y username#192.168.55.1. You will get the command line shell first but you can type in commands like gedit - they windows will show up on the host.
192.168.55.1 is the same network as any other. All tools supposed to work over TCP/IP should work with it as well.
USB is a Serial connection by default.
On windows use a putty based tool.
For example start with MobaXterm > New session > Serial #11500
Login
Password
It won't forward internet by default.
Best simple way is to plug in your phone as USB network sharing and plug in to the laptop via micro-USB.
For Linux, Ubuntu, use a serial ("COM" related stuff) tool.
If you want to do ssh through USB it will require custom editing of networking file.
By default Nano is using a bridge called L4TBRO on 192.168.55.1, laptop is client in .100.
DNS server is on Nano's side.
You would have to create a new interface but using your laptop as DCHP and DNS servers.
Note that usb can power the Jetson Nano for continuous execution on a recent laptop. Some recommends not to and it may crash if you run a compilation on all cores. (if it crashes, just disable 2 cores via nvpmodel -m 1)

Raspberry Pi 3 Always booting to terminal

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?

Access picamera from SSH and VNC on Windows

I read in the Raspberry Pi Official Documentation that you cannot preview the picamera using SSH and VNC. The doc states:
Note that the camera preview only works when a monitor is connected to
the Pi, so remote access (such as SSH and VNC) will not allow you to
see the camera preview.
But, I have googled and I have found a tweak to preview picamera on PC running on Ubuntu. Here is the link. The tutorial uses NetCat on Ubuntu.
I cannot find NetCat for my Windows machine. Is there any way possible to do what I want on Windows.
Yes! On your raspberry pi install xRDP
sudo apt-get install xrdp
Then log in from your Windows and open Remote Desktop Connection/Viewer and proceed.
Note: it is vital to update and upgrade packages first. Also ensure you have the latest firmware.

Close ssh session without logging out at the remote computer

I am currently implementing a web server on a raspberry py using the web.py framework. For convenience, I am using ssh, so I can perform tests on the raspberry directly from my laptop.
My problem is that I can't close the ssh session without the web server stopping to work, because when the session closes, a logout is performed automatically.
Does anyone know a possibility to avoid the logout while closing the ssh session? I am using Linux on both my laptop and the raspberry. Thank you.
The best way to do this is by using screen. It lets you "multiplex" your command line, meaning you can run multiple commands at the same time. Also, when you exit your ssh session, the commands running in screen will continue to run, and it is very easy to install as well.
Here's a guide for installing and running it, and if you have any other questions, comment or google for more screen guides
Edit in 2022: These days many people prefer tmux to screen. My personal recommendation would be tmux, but both do the trick!
I have raspLite on the raspberry pi 3 model b and this is how i used screen in the bash enviroment.
ssh pi#hostname
apt-get install screen
screen
Then I press Enter to proceed through the License Agreement.
npm start
Then I close the terminal and the webserver continues untill i use the SIGINT kill command on the pid.