Difference between revisions of "Ubuntu"
From Robert-Depot
(→Upstart to launch/respawn installation) |
(→Installing SuperCollider) |
||
(36 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | =ofBook installation ideas= | |
+ | http://openframeworks.cc/ofBook/chapters/installation_up_4evr_linux.html | ||
− | =Upstart to launch/respawn installation= | + | =Upstart to launch/respawn installation software= |
*create this in /etc/init/facegraft.conf: | *create this in /etc/init/facegraft.conf: | ||
− | <syntaxhighlight lang="bash | + | <syntaxhighlight lang="bash"> |
#!upstart | #!upstart | ||
description "Face Swap" | description "Face Swap" | ||
Line 17: | Line 18: | ||
respawn limit 10 90 | respawn limit 10 90 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | *< | + | *starting and stopping the service. from the command line: |
− | + | <syntaxhighlight lang="bash"> | |
+ | start faceswap | ||
+ | </syntaxhighlight> | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | stop faceswap | ||
+ | </syntaxhighlight> | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | ./ls | ||
+ | #do some linux commands here | ||
+ | sudo reboot | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | =Disable Screen Dimming= | ||
+ | <syntaxhighlight lang="bash">gsettings set org.gnome.desktop.session idle-delay 0</syntaxhighlight> | ||
+ | source: http://askubuntu.com/questions/430384/turn-screen-off-when-inactive-setting-from-terminal | ||
+ | |||
+ | =run ofApp on local screen= | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | export DISPLAY=:0 | ||
+ | ~/code/of... | ||
+ | command | ||
+ | </syntaxhighlight> | ||
=UVC / webcam control in ubuntu= | =UVC / webcam control in ubuntu= | ||
==v4l2-ctl== | ==v4l2-ctl== | ||
===Installing=== | ===Installing=== | ||
− | + | <syntaxhighlight lang="bash'>sudo apt-get install v4l-utils</syntaxhighlight> | |
===Using=== | ===Using=== | ||
*set max zoom with c920: | *set max zoom with c920: | ||
− | + | <syntaxhighlight lang="bash">v4l2-ctl -c zoom_absolute=200</syntaxhighlight> | |
*set max tele with c920: | *set max tele with c920: | ||
− | + | <syntaxhighlight lang="bash">v4l2-ctl -c zoom_absolute=100</syntaxhighlight> | |
*list all controllable settings: | *list all controllable settings: | ||
− | + | <syntaxhighlight lang="bash">v4l2-ctl --list-ctrls</syntaxhighlight> | |
==guvcview== | ==guvcview== | ||
*comes installed. | *comes installed. | ||
*launch it: | *launch it: | ||
− | + | <syntaxhighlight lang="bash">guvcview</syntaxhighlight> | |
*should give you full access to your camera controls. | *should give you full access to your camera controls. | ||
Line 41: | Line 63: | ||
#make a live ubuntu usb disk in os x. [http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-mac-osx directions] | #make a live ubuntu usb disk in os x. [http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-mac-osx directions] | ||
#IN OSX: attach your new portable drive, partition it as an OSX Extended Journaled drive. | #IN OSX: attach your new portable drive, partition it as an OSX Extended Journaled drive. | ||
− | #IN UBUNTU: start install. select "something else", create three partitions (boot, root, and swap), leaving existing partition from OSX. | + | #Reboot into the live ubuntu usb disk. |
+ | #IN UBUNTU: start install. select "something else", create three partitions (boot, root, and swap), leaving existing EFI partition from OSX. | ||
#Install Refind to first partition. | #Install Refind to first partition. | ||
==Install rEFInd to partition of external drive== | ==Install rEFInd to partition of external drive== | ||
*download refind flashdrive http://sourceforge.net/projects/refind/files/0.7.4/refind-flashdrive-0.7.4.zip/download | *download refind flashdrive http://sourceforge.net/projects/refind/files/0.7.4/refind-flashdrive-0.7.4.zip/download | ||
*use diskutil to find number for partition on your external: | *use diskutil to find number for partition on your external: | ||
− | + | <syntaxhighlight lang="bash">diskutil list</syntaxhighlight> | |
**my EFI partition on external drive is /dev/disk2 | **my EFI partition on external drive is /dev/disk2 | ||
*unmount: | *unmount: | ||
− | + | <syntaxhighlight lang="bash">diskutil unmountDisk disk2</syntaxhighlight> | |
*use dd to copy flash image to external partition: | *use dd to copy flash image to external partition: | ||
− | + | <syntaxhighlight lang="bash">sudo dd if=refind-flashdrive-0.7.4.img of=/dev/disk2s1 bs=1m</syntaxhighlight> | |
=Using H2 with Ubuntu= | =Using H2 with Ubuntu= | ||
==Recording from H2== | ==Recording from H2== | ||
− | + | <syntaxhighlight lang="bash">arecord -D "hw:2,0" -f S16_LE -c 2 -r 44100 test2.wav</syntaxhighlight> | |
+ | |||
==pocketsphinx-continuous with H2== | ==pocketsphinx-continuous with H2== | ||
* | * | ||
+ | =Custom PC Build= | ||
+ | *install Ubuntu | ||
+ | *Boot to command line. Download CUDA from NVIDIA: | ||
+ | <syntaxhighlight lang="bash">wget http://developer.download.nvidia.com/compute/cuda/7_0/Prod/local_installers/rpmdeb/cuda-repo-ubuntu1404-7-0-local_7.0-28_amd64.deb</syntaxhighlight> | ||
+ | *Install CUDA, follow these instructions: http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux/index.html#ubuntu-installation | ||
+ | *Add nomodeset to GRUB_LINUX_CMDLINE_DEFAULT: http://askubuntu.com/questions/38780/how-do-i-set-nomodeset-after-ive-already-installed-ubuntu/38782#38782 | ||
+ | *Install netatalk and ssh: | ||
+ | <syntaxhighlight lang="bash">sudo apt-get install ssh netatalk</syntaxhighlight> | ||
+ | *Install glew.h, etc. This is easily accomplished through the openFrameworks install dependencies script (if you plan to use oF): | ||
+ | http://openframeworks.cc/setup/linux-codeblocks/ | ||
+ | *Install menu-meters: http://blog.dcxn.com/2012/06/06/menu-meters-for-ubuntu/ | ||
+ | |||
+ | ==Alternate NVIDIA Install options== | ||
+ | *http://www.askmetutorials.com/2015/01/install-uninstall-nvidia-driver-34058.html | ||
+ | *http://askubuntu.com/questions/464354/update-nvidia-drivers-with-xorg-edgers-ppa | ||
+ | |||
+ | =netatalk file sharing with OS X= | ||
+ | *http://outcoldman.com/en/archive/2014/11/09/ubuntu-as-home-server-part-3-afp-server/ | ||
+ | *had to install libevent-dev and libtdb-dev: | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | sudo apt-get install libevent-dev | ||
+ | sudo apt-get install libtdb-dev | ||
+ | </syntaxhighlight> | ||
+ | =copy ssh key to remote server= | ||
+ | <syntaxhighlight lang="bash">cat ~/.ssh/id_rsa.pub | ssh user@machine "mkdir ~/.ssh; cat >> ~/.ssh/authorized_keys"</syntaxhighlight> | ||
+ | =Use aptitude to downgrade some packages= | ||
+ | for example installing libcurl4-openssl-dev: | ||
+ | |||
+ | http://askubuntu.com/questions/584901/grive-tools-depends-libcurl4-openssl-dev-but-it-is-not-going-to-be-installed | ||
+ | =Installing SuperCollider= | ||
+ | https://github.com/supercollider/supercollider/wiki/Installing-SuperCollider-on-Ubuntu-systems | ||
+ | *add user to audio group: | ||
+ | <syntaxhighlight lang="bash">sudo adduser rtwomey audio</syntaxhighlight> |
Latest revision as of 07:02, 20 October 2015
Contents
- 1 ofBook installation ideas
- 2 Upstart to launch/respawn installation software
- 3 Disable Screen Dimming
- 4 run ofApp on local screen
- 5 UVC / webcam control in ubuntu
- 6 Make a Portable UBUNTU installation
- 7 Using H2 with Ubuntu
- 8 Custom PC Build
- 9 netatalk file sharing with OS X
- 10 copy ssh key to remote server
- 11 Use aptitude to downgrade some packages
- 12 Installing SuperCollider
ofBook installation ideas
http://openframeworks.cc/ofBook/chapters/installation_up_4evr_linux.html
Upstart to launch/respawn installation software
- create this in /etc/init/facegraft.conf:
#!upstart
description "Face Swap"
# Start job via the daemon control script. Replace "gert" with your username.
exec su -l rtwomey -c 'export DISPLAY=:0; /home/rtwomey/code/openFrameworks/apps/oftwomey/graft-tracker/bin/graft-tracker'
# Restart the process if it dies with a signal
# or exit code not given by the 'normal exit' stanza.
respawn
# Give up if restart occurs 10 times in 90 seconds.
respawn limit 10 90
- starting and stopping the service. from the command line:
start faceswap
stop faceswap
./ls
#do some linux commands here
sudo reboot
Disable Screen Dimming
gsettings set org.gnome.desktop.session idle-delay 0
source: http://askubuntu.com/questions/430384/turn-screen-off-when-inactive-setting-from-terminal
run ofApp on local screen
export DISPLAY=:0
~/code/of...
command
UVC / webcam control in ubuntu
v4l2-ctl
Installing
sudo apt-get install v4l-utils
Using
- set max zoom with c920:
v4l2-ctl -c zoom_absolute=200
- set max tele with c920:
v4l2-ctl -c zoom_absolute=100
- list all controllable settings:
v4l2-ctl --list-ctrls
guvcview
- comes installed.
- launch it:
guvcview
- should give you full access to your camera controls.
Make a Portable UBUNTU installation
- make a live ubuntu usb disk in os x. directions
- IN OSX: attach your new portable drive, partition it as an OSX Extended Journaled drive.
- Reboot into the live ubuntu usb disk.
- IN UBUNTU: start install. select "something else", create three partitions (boot, root, and swap), leaving existing EFI partition from OSX.
- Install Refind to first partition.
Install rEFInd to partition of external drive
- download refind flashdrive http://sourceforge.net/projects/refind/files/0.7.4/refind-flashdrive-0.7.4.zip/download
- use diskutil to find number for partition on your external:
diskutil list
- my EFI partition on external drive is /dev/disk2
- unmount:
diskutil unmountDisk disk2
- use dd to copy flash image to external partition:
sudo dd if=refind-flashdrive-0.7.4.img of=/dev/disk2s1 bs=1m
Using H2 with Ubuntu
Recording from H2
arecord -D "hw:2,0" -f S16_LE -c 2 -r 44100 test2.wav
pocketsphinx-continuous with H2
Custom PC Build
- install Ubuntu
- Boot to command line. Download CUDA from NVIDIA:
wget http://developer.download.nvidia.com/compute/cuda/7_0/Prod/local_installers/rpmdeb/cuda-repo-ubuntu1404-7-0-local_7.0-28_amd64.deb
- Install CUDA, follow these instructions: http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux/index.html#ubuntu-installation
- Add nomodeset to GRUB_LINUX_CMDLINE_DEFAULT: http://askubuntu.com/questions/38780/how-do-i-set-nomodeset-after-ive-already-installed-ubuntu/38782#38782
- Install netatalk and ssh:
sudo apt-get install ssh netatalk
- Install glew.h, etc. This is easily accomplished through the openFrameworks install dependencies script (if you plan to use oF):
http://openframeworks.cc/setup/linux-codeblocks/
- Install menu-meters: http://blog.dcxn.com/2012/06/06/menu-meters-for-ubuntu/
Alternate NVIDIA Install options
- http://www.askmetutorials.com/2015/01/install-uninstall-nvidia-driver-34058.html
- http://askubuntu.com/questions/464354/update-nvidia-drivers-with-xorg-edgers-ppa
netatalk file sharing with OS X
- http://outcoldman.com/en/archive/2014/11/09/ubuntu-as-home-server-part-3-afp-server/
- had to install libevent-dev and libtdb-dev:
sudo apt-get install libevent-dev
sudo apt-get install libtdb-dev
copy ssh key to remote server
cat ~/.ssh/id_rsa.pub | ssh user@machine "mkdir ~/.ssh; cat >> ~/.ssh/authorized_keys"
Use aptitude to downgrade some packages
for example installing libcurl4-openssl-dev:
Installing SuperCollider
https://github.com/supercollider/supercollider/wiki/Installing-SuperCollider-on-Ubuntu-systems
- add user to audio group:
sudo adduser rtwomey audio