참고사이트
pi@raspberrypi:~ $ # github에서 다운로드할 위치로 이동해서 clone 해오기 pi@raspberrypi:~ $ pi@raspberrypi:~ $ pi@raspberrypi:~ $ cd ~/Downloads/ pi@raspberrypi:~/Downloads $ git clone https://github.com/poscoict-arvrmr/first.git 'first'에 복제합니다... remote: Counting objects: 43, done. remote: Compressing objects: 100% (27/27), done. remote: Total 43 (delta 21), reused 34 (delta 14), pack-reused 0 오브젝트 묶음 푸는 중: 100% (43/43), 완료. pi@raspberrypi:~/Downloads $ cd first pi@raspberrypi:~/Downloads/first $ pi@raspberrypi:~/Downloads/first $ pi@raspberrypi:~/Downloads/first $ # npm install 을 실행해야 pi@raspberrypi:~/Downloads/first $ # package.json에 등록되어 있는 모듈이 pi@raspberrypi:~/Downloads/first $ # node_modules 에 추가됨( eg. react ) pi@raspberrypi:~/Downloads/first $ pi@raspberrypi:~/Downloads/first $ pi@raspberrypi:~/Downloads/first $ npm install > electron@1.7.10 postinstall /home/pi/Downloads/first/node_modules/electron > node install.js added 169 packages in 27.404s pi@raspberrypi:~/Downloads/first $ pwd /home/pi/Downloads/first pi@raspberrypi:~/Downloads/first $ whereis electron electron: /usr/lib/electron /home/pi/.nvm/versions/node/v9.3.0/bin/electron pi@raspberrypi:~/Downloads/first $ cd ~ pi@raspberrypi:~ $ pi@raspberrypi:~ $ pi@raspberrypi:~ $ pi@raspberrypi:~ $ pi@raspberrypi:~ $ # 터미널에서는 4가지 방법으로 first app을 실행할 수 있음 pi@raspberrypi:~ $ # electron ~/Downloads/first pi@raspberrypi:~ $ # electron /home/pi/Downloads/first pi@raspberrypi:~ $ # /home/pi/.nvm/versions/node/v9.3.0/bin/electron ~/Downloads/first pi@raspberrypi:~ $ # /home/pi/.nvm/versions/node/v9.3.0/bin/electron /home/pi/Downloads/first pi@raspberrypi:~ $ pi@raspberrypi:~ $ pi@raspberrypi:~ $ # autostart 파일 내용 확인 후 수정 -> 4번재 절대 패스 사용할것것 pi@raspberrypi:~ $ pi@raspberrypi:~ $ cat .config/lxsession/LXDE-pi/autostart @lxpanel --profile LXDE-pi @pcmanfm --desktop --profile LXDE-pi @xscreensaver -no-splash @point-rpi pi@raspberrypi:~ $ pi@raspberrypi:~ $ pi@raspberrypi:~ $ nano .config/lxsession/LXDE-pi/autostart pi@raspberrypi:~ $ pi@raspberrypi:~ $ pi@raspberrypi:~ $ pi@raspberrypi:~ $ # @로 시작하는 명령어 추가하고 저장하고 나오기. pi@raspberrypi:~ $ # Ctrl+O:저장, Enter:확인, Ctrl+X:종료 순으로 pi@raspberrypi:~ $ pi@raspberrypi:~ $ pi@raspberrypi:~ $ pi@raspberrypi:~ $ cat .config/lxsession/LXDE-pi/autostart @lxpanel --profile LXDE-pi @pcmanfm --desktop --profile LXDE-pi @xscreensaver -no-splash @point-rpi @/home/pi/.nvm/versions/node/v9.3.0/bin/electron /home/pi/Downloads/first pi@raspberrypi:~ $ pi@raspberrypi:~ $ pi@raspberrypi:~ $ pi@raspberrypi:~ $ pi@raspberrypi:~ $ # 수정사항 확인하고 새시작해서 확인 pi@raspberrypi:~ $ sudo reboot