RaspberryPi: Difference between revisions
Jump to navigation
Jump to search
(Created page with "Debian Weezy on Raspberry Pi == RPi CPU Tempurature == <pre># /opt/vc/bin/vcgencmd measure_temp # cat /sys/class/thermal/thermal_zone0/temp 49768 # expr `cat /sys/class/therm...") |
No edit summary |
||
Line 2: | Line 2: | ||
== RPi CPU Tempurature == | == RPi CPU Tempurature == | ||
< | <syntaxhighlight lang=bash> | ||
# /opt/vc/bin/vcgencmd measure_temp | |||
# cat /sys/class/thermal/thermal_zone0/temp | # cat /sys/class/thermal/thermal_zone0/temp | ||
49768 | 49768 | ||
# expr `cat /sys/class/thermal/thermal_zone0/temp` / 1000 # divide by 1000 for C | # expr `cat /sys/class/thermal/thermal_zone0/temp` / 1000 # divide by 1000 for C | ||
50</ | 50 | ||
</syntaxhighlight> | |||
== Force Sleep Mode / Screen off == | == Force Sleep Mode / Screen off == | ||
< | <syntaxhighlight lang=bash> | ||
On: /opt/vc/bin/tvservice -p</ | Off: /opt/vc/bin/tvservice -o | ||
On: /opt/vc/bin/tvservice -p | |||
</syntaxhighlight> | |||
== HDMI Audio Issues == | == HDMI Audio Issues == | ||
Append to /boot/config.txt; | Append to /boot/config.txt; | ||
< | <syntaxhighlight lang=bash> | ||
hdmi_drive=2</ | hdmi_force_hotplug=1 | ||
hdmi_drive=2 | |||
</syntaxhighlight> | |||
== Reduce Wear Leveling == | == Reduce Wear Leveling == | ||
< | <syntaxhighlight lang=bash> | ||
$ cat /etc/fstab | |||
proc /proc proc defaults 0 0 | proc /proc proc defaults 0 0 | ||
/dev/mmcblk0p1 /boot vfat defaults 0 2 | /dev/mmcblk0p1 /boot vfat defaults 0 2 | ||
/dev/mmcblk0p2 / ext4 defaults,noatime 0 1 | /dev/mmcblk0p2 / ext4 defaults,noatime 0 1 | ||
# a swapfile is not a swap partition, so no using swapon|off from here on, use dphys-swapfile swap[on|off] for that | # a swapfile is not a swap partition, so no using swapon|off from here on, use dphys-swapfile swap[on|off] for that | ||
tmpfs /var/log tmpfs defaults 0 0< | tmpfs /var/log tmpfs defaults 0 0 | ||
</syntaxhighlight> | |||
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=29&t=13889 | http://www.raspberrypi.org/phpBB3/viewtopic.php?f=29&t=13889 | ||
< | <syntaxhighlight lang=bash> | ||
sudo apt-get install lsof rsync; dpkg -i ramlog*.deb; reboot twice | |||
</syntaxhighlight> | |||
== MP3 Plackback == | == MP3 Plackback == | ||
< | <syntaxhighlight lang=bash> | ||
sox, or rather AUDIODEV=hw:1 play | |||
moc or mocp | moc or mocp | ||
mpd</ | mpd | ||
</syntaxhighlight> | |||
== Software to Install == | == Software to Install == | ||
< | <syntaxhighlight lang=bash> | ||
sudo apt-get install \ | |||
tightvncserver youtube-dl synergy transmission-daemon \ | tightvncserver youtube-dl synergy transmission-daemon \ | ||
chromium \ | chromium \ | ||
nginx php5 php-apc php5-sqlite sqlite mailutils python dns-utils \ | nginx php5 php-apc php5-sqlite sqlite mailutils python dns-utils \ | ||
php5-cgi php5-fpm php5-cli</ | php5-cgi php5-fpm php5-cli | ||
</syntaxhighlight> | |||
== raspi-config autologin not as user pi == | == raspi-config autologin not as user pi == | ||
By default when setting to enable straight to desktop, this script will make it pi; | By default when setting to enable straight to desktop, this script will make it pi; | ||
< | <syntaxhighlight lang=bash> | ||
# /usr/bin/raspi-config | |||
update-rc.d lightdm enable 2 | update-rc.d lightdm enable 2 | ||
sed /etc/lightdm/lightdm.conf -i -e "s/^#autologin-user=.*/autologin-user=pi/"</ | sed /etc/lightdm/lightdm.conf -i -e "s/^#autologin-user=.*/autologin-user=pi/" | ||
</syntaxhighlight> | |||
== RDP with rdesktop and xfreerdp == | == RDP with rdesktop and xfreerdp == | ||
< | <syntaxhighlight lang=bash> | ||
$ rdesktop -g 1280x720 -u drew -r sound=local 192.168.1.10 | |||
sound is choppy, clipboard works | sound is choppy, clipboard works | ||
-f for full, ctrl+alt+enter to exit | -f for full, ctrl+alt+enter to exit | ||
Line 54: | Line 70: | ||
$ xfreerdp -u drew -g 1280x720 -x l --plugin rdpsnd --data alsa -- 192.168.1.10 | $ xfreerdp -u drew -g 1280x720 -x l --plugin rdpsnd --data alsa -- 192.168.1.10 | ||
-x experience, l is for lan | -x experience, l is for lan | ||
-z is compression</ | -z is compression | ||
</syntaxhighlight> | |||
== LXDE autostart synergyc == | == LXDE autostart synergyc == | ||
< | <syntaxhighlight lang=bash> | ||
# mkdir ~/.config/autostart | |||
# cat ~/.config/autostart/synergyc.desktop | # cat ~/.config/autostart/synergyc.desktop | ||
[Desktop Entry] | [Desktop Entry] | ||
Type=Application | Type=Application | ||
Exec=/usr/bin/synergyc 192.168.1.10</ | Exec=/usr/bin/synergyc 192.168.1.10 | ||
</syntaxhighlight> | |||
== Fix Time / Date == | == Fix Time / Date == | ||
< | <syntaxhighlight lang=bash> | ||
dpkg-reconfigure tzdata | |||
</syntaxhighlight> | |||
^ set locale | ^ set locale | ||
== Sound == | == Sound == | ||
< | <syntaxhighlight lang=bash> | ||
# amixer set PCM 20%</ | # amixer get PCM | ||
# amixer set PCM 20% | |||
</syntaxhighlight> | |||
^ one off to set lower noise http://man.he.net/man1/amixer | ^ one off to set lower noise http://man.he.net/man1/amixer | ||
< | <syntaxhighlight lang=bash> | ||
# alsamixer | |||
</syntaxhighlight> | |||
^ tui to set PCM volume / sound card info | ^ tui to set PCM volume / sound card info | ||
< | <syntaxhighlight lang=bash> | ||
# amixer cset numid=3 1 | |||
</syntaxhighlight> | |||
^ 1 for headphones, 0 for hdmi | ^ 1 for headphones, 0 for hdmi | ||
== Video with omxplayer == | == Video with omxplayer == | ||
< | <syntaxhighlight lang=bash> | ||
# omxplayer -o local <filename> | |||
</syntaxhighlight> | |||
^ head phones output | ^ head phones output | ||
< | <syntaxhighlight lang=bash> | ||
# omxplayer -o hdmi <filename> | |||
</syntaxhighlight> | |||
^ hdmi output | ^ hdmi output | ||
< | <syntaxhighlight lang=bash> | ||
# omxplayer -r <filename> | |||
</syntaxhighlight> | |||
^ full screen, skewed though? | ^ full screen, skewed though? | ||
< | <syntaxhighlight lang=bash> | ||
# setterm -blank poke</ | # setterm -blank force && omxplayer filename | ||
# setterm -blank poke | |||
</syntaxhighlight> | |||
^ command on console so only the video shows (and not console text scroll back), poke gets it back | ^ command on console so only the video shows (and not console text scroll back), poke gets it back | ||
=== omxplayer - Key bindings === | === omxplayer - Key bindings === | ||
< | <syntaxhighlight lang=bash> | ||
1 Increase Speed | |||
2 Decrease Speed | 2 Decrease Speed | ||
j Previous Audio stream | j Previous Audio stream | ||
Line 109: | Line 145: | ||
Right Seek +30 | Right Seek +30 | ||
Down Seek -600 | Down Seek -600 | ||
Up Seek +600</ | Up Seek +600 | ||
</syntaxhighlight> | |||
== Admin groups == | == Admin groups == | ||
be in these groups: s/:pi/:pi,drew/ | be in these groups: s/:pi/:pi,drew/ | ||
< | <syntaxhighlight lang=bash> | ||
drew@drew-rpi ~ $ grep pi /etc/group | |||
adm:x:4:pi,drew | adm:x:4:pi,drew | ||
dialout:x:20:pi,drew | dialout:x:20:pi,drew | ||
Line 125: | Line 163: | ||
pi:x:1000: | pi:x:1000: | ||
netdev:x:105:pi,drew | netdev:x:105:pi,drew | ||
input:x:999:pi,drew</ | input:x:999:pi,drew | ||
</syntaxhighlight> |
Latest revision as of 01:41, 25 January 2018
Debian Weezy on Raspberry Pi
RPi CPU Tempurature
# /opt/vc/bin/vcgencmd measure_temp
# cat /sys/class/thermal/thermal_zone0/temp
49768
# expr `cat /sys/class/thermal/thermal_zone0/temp` / 1000 # divide by 1000 for C
50
Force Sleep Mode / Screen off
Off: /opt/vc/bin/tvservice -o
On: /opt/vc/bin/tvservice -p
HDMI Audio Issues
Append to /boot/config.txt;
hdmi_force_hotplug=1
hdmi_drive=2
Reduce Wear Leveling
$ cat /etc/fstab
proc /proc proc defaults 0 0
/dev/mmcblk0p1 /boot vfat defaults 0 2
/dev/mmcblk0p2 / ext4 defaults,noatime 0 1
# a swapfile is not a swap partition, so no using swapon|off from here on, use dphys-swapfile swap[on|off] for that
tmpfs /var/log tmpfs defaults 0 0
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=29&t=13889
sudo apt-get install lsof rsync; dpkg -i ramlog*.deb; reboot twice
MP3 Plackback
sox, or rather AUDIODEV=hw:1 play
moc or mocp
mpd
Software to Install
sudo apt-get install \
tightvncserver youtube-dl synergy transmission-daemon \
chromium \
nginx php5 php-apc php5-sqlite sqlite mailutils python dns-utils \
php5-cgi php5-fpm php5-cli
raspi-config autologin not as user pi
By default when setting to enable straight to desktop, this script will make it pi;
# /usr/bin/raspi-config
update-rc.d lightdm enable 2
sed /etc/lightdm/lightdm.conf -i -e "s/^#autologin-user=.*/autologin-user=pi/"
RDP with rdesktop and xfreerdp
$ rdesktop -g 1280x720 -u drew -r sound=local 192.168.1.10
sound is choppy, clipboard works
-f for full, ctrl+alt+enter to exit
keymap is broken, found doesn't work??
$ xfreerdp -u drew -g 1280x720 -x l --plugin rdpsnd --data alsa -- 192.168.1.10
-x experience, l is for lan
-z is compression
LXDE autostart synergyc
# mkdir ~/.config/autostart
# cat ~/.config/autostart/synergyc.desktop
[Desktop Entry]
Type=Application
Exec=/usr/bin/synergyc 192.168.1.10
Fix Time / Date
dpkg-reconfigure tzdata
^ set locale
Sound
# amixer get PCM
# amixer set PCM 20%
^ one off to set lower noise http://man.he.net/man1/amixer
# alsamixer
^ tui to set PCM volume / sound card info
# amixer cset numid=3 1
^ 1 for headphones, 0 for hdmi
Video with omxplayer
# omxplayer -o local <filename>
^ head phones output
# omxplayer -o hdmi <filename>
^ hdmi output
# omxplayer -r <filename>
^ full screen, skewed though?
# setterm -blank force && omxplayer filename
# setterm -blank poke
^ command on console so only the video shows (and not console text scroll back), poke gets it back
omxplayer - Key bindings
1 Increase Speed
2 Decrease Speed
j Previous Audio stream
k Next Audio stream
i Previous Chapter
o Next Chapter
n Previous Subtitle stream
m Next Subtitle stream
s Toggle subtitles
q Exit OMXPlayer
Space or p Pause/Resume
- Decrease Volume
+ Increase Volume
Left Seek -30
Right Seek +30
Down Seek -600
Up Seek +600
Admin groups
be in these groups: s/:pi/:pi,drew/
drew@drew-rpi ~ $ grep pi /etc/group
adm:x:4:pi,drew
dialout:x:20:pi,drew
cdrom:x:24:pi,drew
sudo:x:27:pi,drew,drew
audio:x:29:pi,drew
video:x:44:pi,drew
plugdev:x:46:pi,drew
games:x:60:pi,drew
users:x:100:pi,drew
pi:x:1000:
netdev:x:105:pi,drew
input:x:999:pi,drew