Russ's Pi Recipie
This is a list, for russ, by russ for setting up a raspery pi. You may use it or make your own.
Contents
Initial Log On
User management in Raspbian is done on the command line. The default user is pi, and the password is raspberry. You can add users and change each user's password.
CHANGE YOUR PASSWORD passwd
Bring Your System Up to Date
Before installing new application or service in Raspbian, make sure to always type this into terminal:
sudo apt-get update sudo apt-get upgrade sudo apt-get dist-upgrade
Set Up Remote Desktop
- use this command to setup the pi
sudo apt-get install xrdp
- on the windows machine go to router admin and get tcpip address of the pi or
- on the pi issue the command
ifconfig
- and read the tcpip address of the pi( inet addr )
on the windows machine run "Remote Desktop Connection" in it enter the pi address and the user name ( default pi ) click connect, if you need a password the default is raspberry.
- you should now be able to use your windows machine as the keyboard, mouse, and
- screen.
- if this step does not work try a reboot of the pi and try again, if that does not work
- try googling, it is beyond me.
Power Icons
make these icons by copying over to desktop and then editing. A few more details here would be nice.
sudo pcmanfm -- runs the file manager so it can change permissions on the shared drive sudo leafpad -- runs the editor and can save to protected places
/home/pi/Desktop
Static IP
Pi Setup: Static IP this may be a newer way
my table of addresses
D:\Russ\0000\Farm\FarmNet.ods
my first pi 192.168.0.175
look at current config
cat /etc/network/interfaces
look for dchp
>>>
ifconfig
record inet addr – 192.168.1.81 (Pi's Current IP Address) = address
Bcast – 192.168.1.255 (The Broadcast IP Range) = broad cast
Mask – 255.255.255.0 (Subnet Mask Address) = netmask
in file format address 192.168.1.81 netmask 255.255.255.0 broadcast 192.168.1.255
>>> netstat -nr
record: ( or fix area below )
'Gateway' Address – 192.168.1.254 = gateway 'Destination' Address – 192.168.1.0 = network
gateway 192.168.1.254 network 192.168.1.0
>>> use one of the following
sudo nano /etc/network/interfaces sudo leafpad /etc/network/interfaces
> comment out with #
iface eth0 inet dhcp
> add
iface eth0 inet static # new for static ip address 192.168.1.81 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.254
> save
>>> release address
sudo rm /var/lib/dhcp/*
Then we'll need to reboot and check your changes. . .
sudo reboot
Log back in and run ( just to check config )
ifconfig
Arduino Setup
- see the link below for more directions:
- http://tech.cyborg5.com/2013/05/30/irlib-tutorial-part-3d-installing-the-arduino-ide-on-a-raspberry-pi/
- use this for installation
sudo apt-get install arduino
Access Network Drive
use your router info to get tcpip address of the share device -- might work with name but not for me do we need samba for this?
which samba
did not whow samba but apt-get install samba showed it was there
- create mount point
mkdir /mnt/share1
>>> # works from command line but get read only access
sudo mount -t cifs -o guest //192.168.0.170/share /mnt/share1
>>> seems also to work can I write? no read only sudo mount -t cifs -o username=russ,password=squeak13 //192.168.0.170/share /mnt/share1
>>> share less
code
sudo mount -t cifs -o username=russ,password=squeak13 //192.168.0.170/share/_Source/rPi /mnt/share1
>>> another thing to try this worked for read write, see http://www.lukemannering.co.uk/mount-cifs-error-13-permission-denied/
sudo mount -t cifs -o username="russ",password="squeak13",workgroup="MSHOME",file_mode=0777,dir_mode=0777,nobrl //192.168.0.170/share/_Source/rPi /mnt/share1
But there is a graphical tool available which can browse shares and even mount them: smb4k apt get cannot find
I:\_Source\rPi and this for fstab
//192.168.0.170/share/_Source/rPi /mnt/share1 cifs user=russ,pass=squeak13,_netdev 0,0 //192.168.0.170/share/ /mnt/share1 cifs user=russ,pass=squeak13,_netdev 0,0
sec=ntlmm instead of guest seemed to work
more recently above fails but using
sudo rpi-update sudo reboot
makes it work see:
https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=20301
//10.1.10.50/share /mountpoint cifs sec=ntlm,noauto,x-systemd.automount 0 0
except that file manager cannot see the directories or files there but can be coaxed to see them if you put in the sub dir like /mnt/share1/_Global this is real odd http://www.raspberrypi.org/forums/viewtopic.php?t=60699
http://www.raspberrypi.org/forums/viewtopic.php?t=60699
https://unix.stackexchange.com/questions/124342/mount-error-13-permission-denied
then look in dir /rPi copy over this win_to_pi_info.txt so have reference there
when share works copy over to /pi so you can refer to it without a share
( or put on web? )
http://www.raspberrypi.org/forums/viewtopic.php?t=60699
command line for this would be ( need sudo? )
using fstab
- using fstab this will let you auto mount
for nano ctrl O writes a file
sudo leafpad /etc/fstab sudo nano /etc/fstab
note that fstab may be hidden file
>>
//192.168.0.170/share/_Source/rPi /mnt/share1 cifs user=russ,pass=squeak13,_netdev 0,0
this looks good for stab
mounting-and-automounting-windows-shares-on-raspberry-pi/
# For Guest Login //WindowsPC/Share1 /mnt/mountfoldername cifs guest 0 0
For Password Protected Login //WindowsPC/Share1 /mnt/mountfoldername cifs username=yourusername,password=yourpassword 0 0
//192.168.0.170/share/_Source/rPi /mnt/share1 cifs user=russ,pass=squeak13,_netdev 0,0
fix it maybe
code connecting to sesman ip 127.0.0.1 port 3350 sesman connect ok sending login info to sesman login successful for display 10 started connecting connecting to 127.0.0.1 5910 error - problem connecting
IF this is the same issue you are having I fixed it thusly...
CODE: SELECT ALL
sudo apt-get install tightvncserver