CecilWard
Posts: 39
Joined: Sat Sep 03, 2016 10:17 pm

Headless setup for disabled user

Thu Dec 01, 2016 7:29 am

(Closely related to this thread: viewtopic.php?f=91&t=167063&p=1075464&h ... s#p1075464)

I'm wondering how to set up a Pi in headless mode? Out of the box, is there a way I can log in to Raspbian over the LAN, to a Pi without a screen or keyboard?

Assuming this isn't possible, how much help will I need to get from someone else to get to the point where I can administer the Pi remotely? A friend has prepared a bootable Raspian SD card for me already, so the initial steps of downloading and installing an o/s are done.

Experience - FYI I'm a very experienced C systems programmer but I've never used a Linux box before. Amazingly.

I'm thinking about using SSH, RDP or VNC (or X11 even). I will need to log in to the Pi from an iPad, my only workstation currently. (Yes, insane, I know, but physical and cognitive limitations have meant that I'm restricted to using an iPad all the time now.) I will be going in over an Ethernet LAN or wireless LAN, I have both options.

To edit files remotely from the iPad, it looks like I will need to be using WebDAV or (S)FTP at a pinch, because of the limited range of communications protocols my favourite iPad text editor can handle. Although SMB would be my first choice, the available SMB-client apps available on the iPad seem to be utterly useless because as far as I can see, they don't interwork with or expose services to other apps, in the typical crippled iPad fashion.

Any tips gratefully received.

User avatar
pi-anazazi
Posts: 555
Joined: Fri Feb 13, 2015 9:22 pm
Location: EU

Re: Headless setup for disabled user

Thu Dec 01, 2016 9:47 am

Hi!

After burning the image (latest raspian, I assume here) to the SD card make a file named "ssh" in the boot partition and boot the thing up.

Then you should have a ssh console with user pi and password raspberry.

Then follow this how-to and you have a vncserver running on boot:

viewtopic.php?f=66&t=123457
Kind regards

anazazi

jahboater
Posts: 4764
Joined: Wed Feb 04, 2015 6:38 pm

Re: Headless setup for disabled user

Thu Dec 01, 2016 11:18 am

A VNC server is included within Raspbian now.
Go into raspi-config to enable it.

jbudd
Posts: 1018
Joined: Mon Dec 16, 2013 10:23 am

Re: Headless setup for disabled user

Thu Dec 01, 2016 11:36 am

For me, headless setup means that the Pi has nothing plugged in except the USB power supply.
This means it has to connect to Wifi and have SSH enabled.
To achieve this you put a couple of files in the micro ssd boot partition after burning the Raspbian image:
1. As pi-ananzi says, an empty file /boot/ssh to enable SSH (This is a security change in the Nov 2016 Raspbian image)
2 A file /boot/wpa_supplicant.conf with the wifi login details eg

Code: Select all

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

network={
    ssid="TripMate-E8F0"
    psk="11111111"
}
Obviously change the ssid and psk to match your wifi setup.
The country=GB line is related to the wifi regulations in different countries. I guess that "country=US" is right if you are in the US!

I use my PC's sd card reader to write those files. I presume there is a way to do it from an ipad, or ask your friend to do it.

There are ssh client apps available for ipad. Once you have an ssh connection you can use the familiar Unix tools - vi, bash and ksh are already there, you can install csh or emacs if you like those.

Once you have the Pi booted and can ssh in to it, then you can move on to getting the GUI working on the ipad, if that is what you are aiming for.

User avatar
pi-anazazi
Posts: 555
Joined: Fri Feb 13, 2015 9:22 pm
Location: EU

Re: Headless setup for disabled user

Thu Dec 01, 2016 12:17 pm

ooops, is still use the manual for setting up VNC cause I use openSUSE Tumbleweed on all my recent raspis and the manual works also for TigerVNC and openSUSE with some minor modifications.

If on raspian you can use the built-in VNC server, of course. :-)
Kind regards

anazazi

CecilWard
Posts: 39
Joined: Sat Sep 03, 2016 10:17 pm

Re: Headless setup for disabled user

Fri Jan 20, 2017 9:26 pm

A few questions about addressing -

1. I'm wondering about default IPv4 addresses. Does a Raspbian system act as a DHCP client by default?

2. Is IPv6 enabled by default?

3. I'm wondering if the system will acquire one or more MAC-derived IPv6 addresses by default? How do I add a routable public static IPv6 address? (The LAN subnet it will be living in already uses a globally routable public /64 now, taken out of the static /48 that my ISP has given me.)

RDS
Posts: 721
Joined: Tue Oct 06, 2015 8:17 am
Location: Lancashire, UK

Re: Headless setup for disabled user

Fri Jan 20, 2017 11:25 pm

I have just started using VNC, that as stated above, is part of the latest Raspbian download.
I am finding it an excellent feature to have and VNC does everything I want.

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Headless setup for disabled user

Sat Jan 21, 2017 7:32 am

hi, headless working for long time using XRDP i now found/installed a program what does not work in the XRDP window ( QT creator ) so now i am also back using VNC.
my new setup:
-a- burning 2017-01-11-raspbian-jessie.img to SD ( by win32diskimager )
-b- create a empty file called "ssh" ( still from win PC ) on that SD boot path
to enable SSH already at first boot
-c- boot RPI only with USB power and ethernet cable to router connected
-d- search RPI IP using on win7 PC "nmap"
-e- use putty or Bitvise SSH Client to connect to that IP and login as pi:raspberry
-f- passwd to change raspberry to your_new_password
-g- check with df if /dev/root/ used full SD card
-h- sudo raspi-config to / enable VNC / adjust timezone / hostname/
-i- sudo reboot and check VNC auto start
-j- sudo apt-get update && sudo apt-get upgrade
+++++++
to use wifi and fix IP:
sudo nano /etc/dhcpcd.conf and add at end:

Code: Select all

interface eth0
static ip_address=192.168.1.101/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1
interface wlan0
static ip_address=192.168.1.201/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Code: Select all

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

network={
        ssid="YOUR-SSID"
        psk="YOUR-SSID-PASSWORD"
        key_mgmt=WPA-PSK
}
and reboot without ethernet cable and connect to ...201

p.s. it is also possible to create by PC that wpa_supplicant.conf file at /boot/
what will then at boot be copied to /etc/wpa_supplicant/ ( and deleted from /boot/ )
so wifi works at first boot.

++++ even more ++++++
i noticed that
in VNC the copy paste between PC and VNC windows works now !!
and using bitvise SSH client instead putty
i can use a bigger SSH window and also USE THE MOUSE there, like when i run MC
sudo apt-get install mc
mc in the ssh window
Image
Last edited by KLL on Wed Mar 01, 2017 2:22 am, edited 4 times in total.

CecilWard
Posts: 39
Joined: Sat Sep 03, 2016 10:17 pm

Re: Headless setup for disabled user

Thu Jan 26, 2017 11:36 am

Thank you all for your very generous help.

CecilWard
Posts: 39
Joined: Sat Sep 03, 2016 10:17 pm

Re: Headless setup for disabled user

Mon Mar 13, 2017 6:28 am

Due to various screw-ups and my deteriorating health, would someone be kind enough to volunteer to rescue me

1) advise me how to _buy_ a large, fast SD card with the latest Raspbian already on it, or better would you copy the latest o/s onto an excellent card for me,

and

2) create/edit the appropriate config files on the card so that the machine will boot up in a mode where I can remotely log on and administer the o/s over the network alone, so no monitor / mouse / keyboard attached?

So I'm asking for some _physical assistance_. This is not a how-do-I, as I am just stumped because of my physical and cognitive limitations and severe ill-health. I would be extremely grateful for this help and would not expect this to be done for free - I will of course pay for h/w and software, and I will expect to make a donation to your favourite charity / beer fund.

CecilWard
Posts: 39
Joined: Sat Sep 03, 2016 10:17 pm

Re: Headless setup for disabled user

Mon Mar 13, 2017 6:32 am

Btw the machine is the latest model, purchased April 2016, so I think that would make it a Model 3 B. I've simply been far too ill to get it going and I don't have any of the tools necessary and I'm also too ill to sit at a desktop PC, too confused and in too much pain, among other things.

CecilWard
Posts: 39
Joined: Sat Sep 03, 2016 10:17 pm

Re: Headless setup for disabled user

Mon Mar 13, 2017 6:34 am

Should I have started a new topic, lest these 'replies' simply go unnoticed?

jbudd
Posts: 1018
Joined: Mon Dec 16, 2013 10:23 am

Re: Headless setup for disabled user

Mon Mar 13, 2017 6:35 am

What part of the world are you in?

User avatar
KLL
Posts: 1453
Joined: Wed Jan 09, 2013 3:05 pm
Location: thailand
Contact: Website

Re: Headless setup for disabled user

Mon Mar 13, 2017 8:23 am

from your first post:
CecilWard wrote:is there a way I can log in to Raspbian over the LAN, to a Pi without a screen or keyboard?
A friend has prepared a bootable Raspian SD card for me already, so the initial steps of downloading and installing an o/s are done.
using SSH, RDP or VNC (or X11 even). I will need to log in to the Pi from an iPad
so now you need SSH and VNC enabled
-a- make ( or ask a friend )
a (empty) ssh ( ssh or ssh.txt ) file in the /boot/ dir ( by any PC and card reader with your RPI SD card.
-b- boot the RPI with a etherent cable to router and find its IP
-c- ssh / putty into RPI ( at that IP ) and pi : raspberry
now can start working remotely and get things like update upgrade..
wifi setup, VNC enable, fix IP, samba setup... done.

CecilWard
Posts: 39
Joined: Sat Sep 03, 2016 10:17 pm

Re: Headless setup for disabled user

Mon Mar 13, 2017 10:23 pm

I'm in Skye, Scotland. I'm afraid it's physical help from a volunteer that I will need as I'm so sick that I can't sit upright for long periods, I'm in pain confused, dizzy and nauseous.

jbudd
Posts: 1018
Joined: Mon Dec 16, 2013 10:23 am

Re: Headless setup for disabled user

Tue Mar 14, 2017 12:33 am

Skye - I wonder if there is someone at Portree High School who could help you.

If you just need someone to post you a working system on an SD card I could do that - I'm in England.
Send me a PM (click on my name aabove this post then Send Private Message) if you would care to discuss that.

CecilWard
Posts: 39
Joined: Sat Sep 03, 2016 10:17 pm

Re: Headless setup for disabled user

Wed Mar 15, 2017 7:51 am

@jbudd - many many thanks for your generous offer.

I've now had three offers of help, so if those don't pan out then I'd very much like to take you up on that. Extremely good of you, and I may indeed come back to you.

CecilWard
Posts: 39
Joined: Sat Sep 03, 2016 10:17 pm

Re: Headless setup for disabled user

Sat Sep 09, 2017 11:38 am

Further info about my situation, so you understand what all the whimpering is about :-) :-( :-)

viewtopic.php?f=91&t=192730&p=1208679#p1208679

Return to “Beginners”