Most simple way is by using MacPorts:
$ sudo port install openssh +ssh-copy-idThat's it! And you ready to use it :)
$ sudo port install openssh +ssh-copy-idThat's it! And you ready to use it :)
crontab: temp file must be edited in placeThen the solution is very simple. You just need to create ~/.vim/ftplugin/crontab.vim and add this one line:
set backupcopy=yesSave the file and you can try to add cron entry again.
XOAUTH2 authentication failed: AUTHENTICATE command error: BAD ['Client aborted AUTHENTICATE command. q205mb46565077wmb']. Data: MFNB2 AUTHENTICATE XOAUTH2
auth_mechanisms = LOGIN
$ sudo vim.tiny /etc/network/interfacesYou'll see few lines of basic configuration:
auto loiface lo inet loopbackiface eth0 inet dhcp
allow-hotplug wlan0iface wlan0 inet dhcpwpa-conf /etc/wpa_supplicant/wpa_supplicant.confiface default inet dhcp
$ sudo vim.tiny /etc/wpa_supplicant/wpa_supplicant.confJust copy and paste below script inside that file:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdevupdate_config=1network={ssid="YOURSSID"psk="YOURPASSWORD"
# Protocol type can be: RSN (for WP2) and WPA (for WPA1)proto=WPA
# Key management type can be: WPA-PSK or WPA-EAP (Pre-Shared or Enterprise)key_mgmt=WPA-PSK
# Pairwise can be CCMP or TKIP (for WPA2 or WPA1)pairwise=TKIP
#Authorization option should be OPEN for both WPA1/WPA2 (in less commonly used are SHARED and LEAP)auth_alg=OPEN
}Change ssid, psk, proto, key_mgmt, pairwise and auth_alg according to your wireless router setup.
$ sudo reboot7. Upon booting, unplug ethernet cable and try to access your Pi via wireless connection (check the IP from your wireless router DHCP client list)
$ sudo port install abook
set query_command = "abook --mutt-query '%s'"macro generic,index,pager \ca "<shell-escape>abook<return>" "launch abook"macro index,pager A "<pipe-message>abook --add-email<return>" "add the sender address to abook"A little explanation for above script:
$ sudo bash5. Type in your password
# mkdir -p ~/rpi/backups7. Check where your SD card is listed (e.g.: mine is listed as /dev/disk2s1)
# cd ~/rpi/backups
# df -h8. Eject your SD card:
# diskutil unmountDisk /dev/disk2s19. Backup your SD card to image file: (please note that you have to add 'r' before 'disk')
# dd if=/dev/rdisk2 of=~/rpi/backups/backup-today-rpi.img bs=1M10. When complete: (again, add 'r' before 'disk')
# diskutil eject /dev/rdisk2
# df -h3. Eject your SD card:
# diskutil unmountDisk /dev/disk2s14. Restore your image to new SD card:
# dd bs=1M if=~/rpi/backups/backup-today-rpi.img of=/dev/rdisk25. When complete:
# diskutil eject /dev/rdisk2
$ sudo raspi-config3. Choose 'Expand Filesystem"
$ sudo apt-get update5. Installing rpi-update:
$ sudo curl -L --output /usr/bin/rpi-update https://raw.github.com/Hexxeh/rpi-update/master/rpi-update && sudo chmod +x /usr/bin/rpi-update6. Updating the firmware:
$ sudo rpi-update7. Allocate more memory to GPU:
$ sudo raspi-config
$ sudo apt-get install libao-dev avahi-utils libavahi-compat-libdnssd-dev libva-dev youtube-dl9. Updating youtube-dl:
$ sudo youtube-dl --update10. Download rplay binary and install:
$ wget -O rplay-1.0.1-armhf.deb http://www.vmlite.com/rplay/rplay-1.0.1-armhf.deb
$ sudo dpkg -i rplay-1.0.1-armhf.deb
$ sudo /etc/init.d/rplay start
$ sudo /etc/init.d/rplay stop
$ sudo /user/bin/rplay
http://<ip-address-of-pi>:7100/admin
http://localhost:7100/admin (If you use the browser on the same Pi machine)
admin_password=adminpassword=onscreen_code=0 [or 1]fullscreen=0 [0r 1]license_key=1223dd-your-from-email
$ sudo apt-get install youtube-dl$ sudo youtube-dl –update
$ sudo /etc/init.d/rplay stop$ sudo dpkg -r rplay
$ sudo ip addr add 192.168.1.11/24 dev eth0And when you finished, you can just delete that temporary additional IP:
$ sudo ip addr del 192.168.1.11/24 dev eth0
auto eth0:1Then you set eth0:1 to be up:
iface eth0:1 inet DHCP
$ sudo ifup eth0:1Check to make sure you've got the correct IP address assignment:
$ sudo ifconfig -a | grep eth0
$ sudo blkidb. Backup /etc/fstab
$ sudo cp /etc/fstab /etc/fstab.$(date +%Y-%m-%d)c. Compare the two fstab files
$ cmp /etc/fstab /etc/fstab.$(date +%Y-%m-%d)d. Edit original /etc/fstab
# (identifier) (location) (format) (some settings)replace the ??? in UUID with the one you've got from blkid command for your HDD
UUID=??? /mnt/home ext3 defaults 0 2
$ sudo mkdir /mnt/homef. Reload the updated /etc/fstab
$ sudo mount -ag. Copy existing /home to new partition
$ sudo rscync -aXS --exclude='/*/.gvfs' /home/. /mnt/home/h. Confirm that all files and folders are copied successfully
$ sudo diff -r /home /mnt/homei. Edit /etc/fstab, preparing for switch
# (identifier) (location) (format) (some settings)j. Moving /home to /old_home
UUID=??? /home ext3 defaults 0 2
$ cd / && sudo mv /home /old_home && sudo mkdir /homek. Reload the updated /etc/fstab
$ sudo mount -a2. Configuring Samba:
security = userb. Restart Samba service
[share]
path = /home
browseable = yes
writable = yes
public = yes
guest ok = yes
$ service smb restart3. Adding User and share:
$ service nmb restart
$ useradd -s /sbin/nologin [username]b. Set samba password for new user:
$ smbpasswd -a [username]c. Put the new user in the user group:
$ usermod -a -G [username] [usergroup] (e.g. usermod -a -G andy andy)d. Set priviledge to certain folder only available to certain user/group:
$ chmod 775 /home/[username]
$ ls -lart /homeYou can see that each of that folder own by username, this way when another username access the samba share, they can see another user folder, but don't have the priviledge to access them. This config already tested in my office with many users using different OS (Windows, Mac, Linux).
$ sudo apt-get install python-software-properties2. Adding PPA (because Python2.6 is not available anymore on Ubuntu Server 12.04, by default):
$ sudo add-apt-repository ppa:fkrull/deadsnakes3. Update repository:
$ sudo apt-get update4. Installing Python2.6:
$ sudo apt-get install python2.6 python2.6-dev5. Change the symlink to Python2.6:
$ sudo ln -sfn /usr/bin/python2.6 /usr/bin/python6. Check the version:
$ python --version
$ sudo vi /etc/ssh/sshdLooking for this line, or you can add if it's not already there:
X11Forwarding yesSave that file and restart SSH service:
$ sudo /etc/init.d/ssh restartAllow Laptop to run X applications:
$ xhost 192.168.1.7Define default display:
$ export DISPLAY=192.168.1.1:0
$ ssh -X [username]@192.168.1.1 firefox
$ ssh -X [username]@192.168.1.1 oowriter
sudo addgroup webmasters
sudo chgrp -R webmasters /var/www
sudo find /var/www -type d -exec chmod g=rwxs "{}" \;
sudo find /var/www -type f -exec chmod g=rws "{}" \;
sudo gpasswd --add user webmasters
sudo gpasswd --add colleague1 webmasters
sudo gpasswd --add colleague2 webmasters
# etc.
$ sudo apt-get install mtp-tools mtpfs4. Configure 51-android.rules:
$ sudo vi /etc/udev/rules.d/51-android.rules5. Paste the following line into the file:
#LG - Nexus 4
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"6. Make the file executable:
$ sudo chmod +x /etc/udev/rules.d/51-android.rules7. Restart udev
$ sudo service udev restart8. Create mount point and permissions
$ sudo mkdir /media/nexus4
$ chmod 755 /media/nexus49. Plug in Nexus 4 and make sure MTP is enabled
$ sudo mtpfs -o allow_other /media/nexus411. And unmount it when you have completed your work:
$ sudo umount /media/nexus4
$ mtp-detect | grep idVendor
$ mtp-detect | grep idProductUse the information on step 5 above, and you're good to go :)
Also, you need to add ~/.urlview and put this line:macro index \cu |urlview\n # simulate the old browse-url functionmacro pager \cu |urlview\n
REGEXP (((http|https|ftp|gopher)|mailto)[.:][^ >"\t]*|www\.[-a-z0-9.]+)[^ .,;\t>">\):]
COMMAND <your-browser> %s
$ sudo apt-get install uif2iso2. Run command to convert .uif to .iso file
$ uif2iso file.uif file.iso3. Mount .iso file
$ mkdir ~/iso_fileThat's it! :)
$ sudo mount file.iso ~/iso_file -t iso9660 -o loop
sudo rm /var/lib/dpkg/info/oracle-java7-installer* sudo apt-get purge oracle-java7-installer* sudo rm /etc/apt/sources.list.d/*java* sudo apt-get update sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java7-installer
$ mv ~/.vim ~/.vim-bk2. Create new ~/.vim and ~/.vim/bundle (to contain your plugins)
$ mkdir -p ~/.vim/bundle3. Setup Vundle
$ git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle4. Configuring .vimrc
5. Get webapi-vim and vimplenote-vimset nocompatible " be iMproved filetype off " required! set rtp+=~/.vim/bundle/vundle/ call vundle#rc() " let Vundle manage Vundle " required! Bundle 'gmarik/vundle' " My Bundles here: " " original repos on github Bundle 'mattn/vimplenote'Bundle 'mattn/webapi'" ... filetype plugin indent on " required! " " Brief help " :BundleList - list configured bundles " :BundleInstall(!) - install(update) bundles " :BundleSearch(!) foo - search(or refresh cache first) for foo " :BundleClean(!) - confirm(or auto-approve) removal of unused bundles " " see :h vundle for more details or wiki for FAQ " NOTE: comments after Bundle command are not allowed..
$ git clone git://github.com/mattn/webapi-vim.git ~/.vim/bundle/webapi6. Running and installing bundle
$ git clone git://github.com/mattn/vimplenote-vim.git ~/.vim/bundle/vimplenote
$ vim7. Using Vimplenote (do it inside vim)
:BundleInstall
:Vimplenote -l " list of your Simplenote notes (you'll be prompted to fill in login credentials)And you're good to go :)
:Vimplenote -d " delete your current note
:Vimplenote -n " create new note
:Vimplenote -u " update current note
:Vimplenote -t " add a tag to a note
:Vimplenote -s " search a note
# df -h | grep internal
# pkill -SIGUSR1 cryptofs3. Unmount /media/internal
# umount /media/internal4. Verifying you have clean filesystem, before resizing (in my case, there are differences between boot sector and its backup, but I just choose 'no action' )
# /usr/sbin/fsck.vfat /dev/mapper/store-media5. Verify how much space used by /media/internal
# lvscan | grep media
# resizefat /dev/mapper/store-media 10.64G
# lvcreate -l 100%FREE -n ext3fs store9. Format the partition with ext3 filesystem
# mkfs.ext3 /dev/mapper/store-ext3fs10. Make the filesystem writable
# mount -o remount,rw /11. Make mount directory
# mkdir /media/ext3fs12. Add a line in /etc/fstab to automount ext3fs partition on boot up
# echo "/dev/mapper/store-ext3fs /media/ext3fs auto noatime 0 0" >> /etc/fstab13. Make the filesystem back to read-only
# mount -o remount,ro /14. Reboot
# reboot