Enhancing your RPi-JMRI

Here are a few enhancements that people have asked for to personalize their image. Most of them require command line access, which can be attained two ways:

1) Putty connection from another computer.

2) Terminal window from the RPi desktop. The desktop can be reached by:
2a) VNC Connection from another computer
2b) connect a monitor, mouse and keyboard to the HDMI and USB ports of the RPi

Change the WiFi access point name (ssid) and/or password:

NOTE: this edit is no longer needed for the Bookworm image. Use the Networking icon (upper right of desktop) and use "Edit Connections" to modify the RPi-JMRI connection's SSID, password and channel selection.

Pre-Bookworm only:
Run the following command:

sudo nano /etc/hostapd/hostapd.conf;

Then edit the following lines to change your network name (ssid), your network password or the wifi channel to use:

ssid=RPi-JMRI
wpa_passphrase=rpI-jmri
channel=7

Note: password is case-sensitive, must be 8-63 chars, and there are some special characters to avoid.

Save and exit by pressing [Ctrl-O], then [Enter], then [Ctrl-X].
Restart your RPi and verify you can connect using the new network name and password.

Change the pi user, vnc and samba passwords:

Run the following commands, and follow the prompts for each:

passwd;
sudo vncpasswd -service;
sudo smbpasswd -a pi;

Change the hostname:

Run the following commands:

sudo nano /etc/hostname;
sudo nano /etc/hosts;

In both files, replace "RPi-JMRI" with your desired hostname. Then save and exit by pressing [Ctrl-O], then [Enter], then [Ctrl-X].
Restart your RPi, then verify your new hostname with the "hostname" command.

Disable Access Point and Enable Wifi Client

The RPi wifi adapter cannot be used as an access point and a wifi client to another network at the same time.

NOTE: this edit is no longer needed for the Bookworm image. Instead, use the Networking icon (upper left of desktop) and use "Edit Connections" to modify the RPi-JMRI connection's mode from "Hotspot" to "Client". Reboot. When the desktop is available again, the Networking icon will show a list of SSIDs to connect to, and will prompt for the password.

Pre-Bookworm only:
Here are the steps to change the wifi to be a client only:

Disable the access point functionality by removing hostapd using: 

sudo apt-get remove hostapd;

then remove the related config by modifying your /etc/dhcpcd.conf file:

sudo nano /etc/dhcpcd.conf;

to comment-out (add a leading # to) the last three lines in the file, as such:

#interface wlan0
#static ip_address=192.168.6.1/24
#nohook wpa_supplicant

Then save and exit by pressing [Ctrl-O], then [Enter], then [Ctrl-X], and then reboot your RPi.
at this point, you'll need to have access to your RPi desktop via monitor, keyboard, mouse or connect to Ethernet and use a VNC client.
Unhide the wifi icon by right-clicking in the panel area (top left), select "Add / Remove Panel items", "Add", "Wireless & Wired Network".
Then use the wifi icon to select your wifi network, set the password, etc.
Reboot again with ethernet cable disconnected (if it was connected).
You should now be able to ping and connect to "RPi-JMRI.local" from devices on your wifi network.

Update JMRI:

Extract JMRI example

Note: This assumes you have desktop access to your RPi, either by VNC client or monitor+mouse+keyboard

Exit JMRI, then run the following command to delete the old JMRI program folder (your user files and profiles are not affected):

rm -rf /home/pi/JMRI;

Then download the desired Linux version of JMRI to your RPi, using the RPi web browser, or copy from another computer using the network or a USB drive.
If using the web browser, the file will open in xArchiver automatically. If not, you will need to locate the file and double-click on it.
Once open in xArchiver, click the Extract icon. In the resulting "Extract files" dialog box, change the "Extract To:" to "/home/pi" and press "Extract". See screenshot. Once complete you can close all windows and double-click the PanelPro icon or simply reboot.

Set date:

The RPi does not have an internal clock, so you may need to set the clock manually to prevent errors. Run the following command (specifying the current date and time):

sudo date -s "2020-05-05 5:55pm";

"Install" DecoderPro:

DecoderPro and PanelPro are the same program, just different startup screens.
From the PanelPro main menu, just click Roster, Roster to open the Roster list you see in DecoderPro.
If you want to start with that open each time, use Edit, Preferences, Startup, Add..., Perform Action..., Open Roster.