- Enter the command in the terminal to bring up config.txt.
- sudo nano /boot/config.txt
- Uncomment the section on the screen resolution to set the size manually.
- #console-width=1024
- #console-height=700
- Reboot the pi.
- Further information can be found here.
Setting date and time in Pi
First to configure the timezone
- Enter the command:
- sudo dpkg-reconfigure tzdata
- Link for more explanation.
Configuring time:
- If time differs from the current time by a significant amount, need to set manually by using the command:
- sudo date -s “Thu Aug 9 21:31:26 UTC 2012”
- Configure the NTP to sync the time (require internet connection)
- Enter the command to edit the NTP config
- sudo nano /etc/ntp.conf
- Visit the NTP website to select list of server near the region
- Restart the daemon:
- sudo /etc/init.d/ntp restart
- For information, see the link
Scheduling jobs on RPi
- Enter following command in Pi terminal
- crontab -e
- Enter a new job by entering the time at which the program is scheduled to run e.g
- 0 0 * * * python ~/UserScripts/logtime.py which will run a python script in the folder UserScripts at every day at midnight.
- To see if the script is working, can add in log of the output using
- 0 0 * * * python ~/UserScripts/logtime.py >> havlog.log which will have a log file “havlog.log” at the /home/pi directory.
- A problem using seen in the the crontab not working is that the directory or file path is not correctly set.
- More Information is shown in link.
- More on debugging crontab can be found in link.
Remote Desktop to Pi
At the Pi side:
- install vncserver using command:
- sudo apt-get install tightvncserver
- Run the command to active the VNC server:
- vncserver :1 -geometry 1024×600 -depth 16 -pixelformat rgb565
At the Computer (to remote access the Pi):
- Install putty.exe for SSH log in.
- Download and install tightvnc
- SSH in using putty to remote computer (known IP)
- Type “vncserver :1” into terminal
To kill the VNC server (at Pi side):
- Type: vncserver -kill :1
In the case where the blank screen is experienced:
- Type in command to open the file:
- sudo nano .vnc/xstartup
- Edit the file by replacing the contents with below:
- !/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid black
/usr/bin/lxsession -s LXDE &
- !/bin/sh
More resources can be found below:
- Basic Installation
- Solution tp the Empty screen and set up remote desktop automatically
How to install and use Git on Raspberry Pi
Installing Git on Raspberry pi and cloning projects
- sudo apt-get install git-core
- cd \target_folder
- git clone git://website/program.git
Reference from webpage below:
Resolve keyboard layout Issue in Raspberry Pi
Resolve keyboard character mismatch or keyboard layout issue.
- Keyboard setting for the pi might be in Great Britain format causing the mismatch in character displayed.
- Resolved by:
- Enter command: sudo nano /etc/default/keyboard (use nano editor)
- Change XKBLAYOUT=“us” in editor
- Save and Reboot: sudo reboot
- Some of links that are helpful include: