Showing posts with label setup. Show all posts
Showing posts with label setup. Show all posts

Thursday, August 19, 2021

install xrdp for remote desktop on friendlyarm ubuntu version, focal 20.04.

Must translate thru google translate.  Translated version copied and pasted here.

XRDP with xorg doesn't work, probably due to missing hardware to frame buffer.  Seems to rig to use vnc remote desktop method to  remote the desktop.

Installed xfce4 for window manager

<run following thru google translate for updated info>
snapshot copied and saved 8/19/2021

https://wiki.friendlyarm.com/wiki/index.php/How_to_setup_XRDP_server_on_NanoPC-T4


How to setup XRDP server on NanoPC-T4

View Chinese

1 Step1: Install XRDP remote desktop

Enter the following command to install:

sudo apt install  -y tigervnc-standalone-server xrdp
 sudo  sed  -e  's/^new_cursors=true/new_cursors=false/g'  -i  / etc / xrdp / xrdp.ini

2 Step2: Edit /etc/xrdp/startwm.sh

Edit /etc/xrdp/startwm.sh:

sudo  vim  / etc / xrdp / startwm.sh

Comment out the last two lines in the file (comment method: add # sign at the beginning of the line), as shown below:

# test -x /etc/X11/Xsession && exec /etc/X11/Xsession 
# exec /bin/sh /etc/X11/Xsession

Then add the following at the end of the file:

lxsession -s LXDE -e LXDE

3 Step3: Edit /etc/xrdp/xrdp.ini

Edit /etc/xrdp/xrdp.ini

sudo  vim  / etc / xrdp / xrdp.ini

Scroll to the address of "; Session types", delete all other session types, only [Xvnc] is left:

;
; Session types
;
; Some session types such as Xorg, X11rdp and Xvnc start a display server.
; Startup command-line parameters for the display server are configured
; in sesman.ini. See and configure also sesman.ini.
 [ Xvnc ] 
name =Xvnc
 lib =libvnc.so
 username =ask
 password =ask
 ip =127.0.0.1
 port =- 1 
#xserverbpp=24 
#delay_ms=2000

4 Step4: Disable light-locker

Since light-locker will not work properly in the XRDP environment, we need to disable it in the XRDP environment. In order not to affect the real environment, here we use a packaging script to solve the problem. First, rename the original file:

the sudo  CP  / usr / bin / Light-Locker / usr / bin / Light-locker.orig
 the sudo  RM  / usr / bin / Light-Locker

Create another script to call it, and use the editor to create a file /usr/bin/light-locker with the following content:

#!/bin/sh
 
# The light-locker uses XDG_SESSION_PATH provided by lightdm. 
if  [  !  -Z  " \$ {XDG_SESSION_PATH}"  ] ; then 
  / usr / bin / light-locker.orig
 else 
  # Disable light-locker in XRDP. 
  true 
fi 
EOF

Give the script executable permissions:

sudo  chmod  755  / usr / bin / light-locker

5 Step5: Start xrdp service

sudo systemctl enable xrdp
 sudo systemctl restart xrdp

6 Step6: Test the remote desktop connection

Use the Microsoft Remote Desktop client to create a new connection, the address is the IP address of the development board, and the user name and password are pi. In order to get a better experience, the resolution is recommended to be set to 1280x800, and the color depth is 24 bits. The settings are as shown in the figure below. Shown:

  • Xrdp-ip.png
  •  
  • Xrdp-settings.png

After the connection is successful, as shown in the figure below:
Win-xrdp-friendlydesktop.png


--30--

Sunday, January 20, 2019

configuration notes for beaglebone pocket


local link to BBB if connected (presented for convenience).
http://192.168.7.2/bone101/Support/bone101/

This will probably apply to the beaglebone black (wireless) which will be used in the Unibone project that is in the queue.

This has some number of extra complications since it has a USB OTG connection for power and also presents a USB networking adapter via that conduit to the host.

This allows for a very interesting control interface via the web, but makes it a bit tricky to
get to the internet with the pocket (since it has no network NIC).

The first few notes here are for configuring the network, setting up ssh.

The default login is debian for the system, which is default for the debian releases.

The network router / gateway address is 192.168.7.1, and 192.168.7.2 is the IP for the debian board on the other side of the USB.  On windows at least, the win 10 automagically recognized the connection, created an eth instance for the USB NDIS nic and the ip 192.168.7.1 is visible there.

Login worked to the 192.168.7.2 as advertised.

The time page below doesn't use Debian, so such as installing software must be translated to debian commands.  The page's example uses Angstrom (which is advertised on the BBB images).

Also it did not include the incantation for getting the time to be set.  ntp was not in the downloaded debian image used, so one must use some way to get  the time to set.

http://derekmolloy.ie/automatically-setting-the-beaglebone-black-time-using-ntp/

I also wanted to set the timezone.  Not sure how one would do it on the Angstrom release, but on debian, the dpkg reconfigure worked as usual.

dpkg-reconfigure tzdata

This page has info for making Windows 7 host the network connection.

https://ofitselfso.com/BeagleNotes/HowToConnectBeagleboneBlackToTheInternetViaUSB.php

Will research how to use a raspberry pi W or such linux system to host this, with possibly less foolishness with the network setup on the hosting system end.  With windows not sure how much has to be redone everytime the system starts and stops.

Also since this will be frequently used on a windows laptop, not sure whether the whole thing will survive suspend, even if the BBB pocket is turned off prior to the exercise of suspending.

Eventually setting up a raspberry pi zero as a router would be valuable as it could also present an IP and make it accessible by natting the connection used by the BBB.

***********************
Hosting system + network with a linux host:

https://elementztechblog.wordpress.com/2014/12/22/sharing-internet-using-network-over-usb-in-beaglebone-black/

The Debian OS is used for the testing which is obtained from here.
BBB console can be obtained by using the following command
ssh 192.168.7.2 -l root
 
In the BBB console type the following
ifconfig usb0 192.168.7.2
route add default gw 192.168.7.1

In the linux console of host system type
sudo su
 
#wlan0 is my internet facing interface, eth5 is the BeagleBone USB connection
ifconfig eth5 192.168.7.1
iptables --table nat --append POSTROUTING --out-interface wlan0 -j MASQUERADE
iptables --append FORWARD --in-interface eth5 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward

Incase network not accessible then type the following in BBB terminal

echo "nameserver 8.8.8.8" >> /etc/resolv.conf  

To set up a domain use the following (example uses pri domain):

domain pri
search pri
nameserver 10.192.168.1
nameserver 8.8.8.8

***********************
Other links of use:

getting started

How to Connect a BeagleBone Black to the Internet Using USB

discussion for Armbian, but some good info on USB OTG as a tether.
USB OTG as a network - Development - Armbian forum 

Announcing $25 PocketBeagle - Google Groups (link into GG discussions)

BeagleBoard.org - latest-images

eLinux org links

BeagleBoardDebian - eLinux.org

--30--

Friday, December 15, 2017

Firefox studies, disabling along with reporting bug dumps.


Firefox has two options that should be off for full privacy.

One is to allow Firefox to send dumps to Mozilla.  I've no idea if anyone looks at this, but a dump may sweep up enough information to discern your browser history and other items, such as deciphered items which have used your private key to authenticate a site, etc.

The other one which blew up today, is to "allow Firefox to perform studies".  This was abused 12/15/2017 (though not sure what version) to load a useless extension during an update.  This is possibly harmless today (and useless crap to load if you don't use it), and potentially useful if your browser is being compromised to add something to spy on you or otherwise mess with your system.

The extension was able to be installed if you had the "Firefox Studies" checkbox selected. To prevent Firefox Studies from installing extensions on your behalf:
  • Navigate to: "about:preferences#privacy"
  • Scroll down to the "Firefox Data Collection and Use" section
  • Uncheck the "Allow Firefox to install and run studies" checkbox (and the others, if you wish)
 
This gets rid of the studies problem.  Also uncheck the other options there while you are at it.

Saturday, August 26, 2017

Raspberry pi zero headless setup

5/21/2019, another setup for headless.  Includes how to do multiple WIFI ssids

https://core-electronics.com.au/tutorials/raspberry-pi-zerow-headless-wifi-setup.html

Note:  at end of this, remember to change power save setting

https://www.gaggl.com/2017/08/set-up-a-raspberry-pi-zero-headless/

credit to leo gaggl

If you are using the GUI (Raspian full download) and want to connect your RPi Zero to a keyboard and monitor there are probably easier ways to do this. These notes are for people that want to use a headless (no monitor and GUI) setup ready to connect to your RPi after first boot via SSH from another terminal.

Download Raspbian Lite

wget -O raspbian-lite-latest.zip https://downloads.raspberrypi.org/raspbian_lite_latest
Download link: https://www.raspberrypi.org/downloads/raspbian/

Write Image to SD Card

dd bs=4M if=2017-08-16-raspbian-stretch-lite.img of=/dev/sdb
After this step there should be 2 additional mounts (if not mount the 2 SD card partitions manually).

Set up network interfaces

Create a new config file for the wireless interface.
cd etc/network/interfaces.d/
vim wlan0.conf

Add the following to the new file (if you want to use DHCP – change to static if you want to fix the IP):
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Set up connection details for local wireless network

vim etc/wpa_supplicant/wpa_supplicant.conf
Check the file and ensure the network settings are as per the Wireless Network you are connecting to.

country=AU
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="SSID"
psk=HASHED_PSK_VALUE
}

 
country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="your_real_wifi_ssid"
    scan_ssid=1
    psk="your_real_password"
    key_mgmt=WPA-PSK
}


You could use the clear-text PSK passphrase but I prefer not to do that in configuration files. Create a PSK hash using ‘wpa_passphrasethis older article
There could be other config values you might need depending on the network you are connecting to. More info: https://linux.die.net/man/5/wpa_supplicant.conf.

Ensure there are DNS Servers configured

sudo vim etc/resolv.conf
Add the following to the new file (or your own nameservers):
# Google's public DNS servers
nameserver 8.8.8.8
nameserver 8.8.4.4

Enable SSH Access

Create an ssh empty file in the mounted boot partition. This is necessary to enable SSH access as SSH is by default disabled on more recent versions of Raspbian.
cd boot/
sudo touch ssh

Boot RPi

Boot the Rpi by powering up and after ~30secs you should be able to connect to the IP assigned. Check your router or ise ‘nmap’ or similar to check the assigned IP:
sudo nmap -p22 -sV 10.1.1.0/24
Default login details are
UID: pi
PWD: rasbperry
My normal further setup steps for RPi 3 are here.
EDIT [2017-08-21]: One of the things necessary on later RPi’s is to turn off power saving mode on the WLAN interface.
sudo iw dev wlan0 set power_save off

Raspberry Pi forum entry link for headless setup

https://www.raspberrypi.org/forums/viewtopic.php?t=191252 

Another headless setup page


https://hackernoon.com/raspberry-pi-headless-install-462ccabd75d0

--30--