diff --git a/docs/ivanx/setup/a2cloud-aliases.txt b/docs/ivanx/setup/a2cloud-aliases.txt new file mode 100644 index 0000000..caee9cb --- /dev/null +++ b/docs/ivanx/setup/a2cloud-aliases.txt @@ -0,0 +1,87 @@ +# A2CLOUD aliases: + +alias a2cloud-setup='wget -qO /tmp/a2cloud-setup ivanx.com/a2cloud/setup/; source /tmp/a2cloud-setup' +alias a2cloud-help='(IFS=""; while read thisLine; do [[ ${#thisLine} -eq 0 ]] && echo || echo "$(tput bold)${thisLine%% *}$(tput sgr0) ${thisLine#* }"; done < /usr/local/etc/a2cloud-help.txt | more)' +alias a2cloud-version='cat /usr/local/etc/A2CLOUD-version' +alias a2cloud-update='a2cloud-setup' + +alias system-shutdown='sudo shutdown -h now' +alias system-restart='sudo shutdown -r now' + + +alias raspi-config='[[ -f /usr/bin/raspi-config ]] && sudo /usr/bin/raspi-config || echo "raspi-config not found. Are you using a Raspberry Pi with Raspbian?"' +alias appleiipi-update="sudo apt-get -y update && sudo apt-get -y --force-yes install a2pi apple2user gsport" +alias raspbian-update='wget -qO /tmp/raspbian-update ivanx.com/a2cloud/setup/raspbian-update.txt; source /tmp/raspbian-update' +alias rasppleii-update='raspbian-update a2cloud a2server' + + +alias welcome-message-edit='sudo nano /etc/motd' + +alias showip='ifconfig eth0 | grep "inet\ addr" | cut -d: -f2 | cut -d" " -f1' +alias showmac='ifconfig eth0 | grep "HWaddr" | cut -dH -f2 | cut -c7-23' +alias showip-wifi='ifconfig wlan0 | grep "inet\ addr" | cut -d: -f2 | cut -d" " -f1' +alias showmac-wifi='ifconfig wlan0 | grep "HWaddr" | cut -dH -f2 | cut -c7-23' +alias ifreset='sudo rm /etc/udev/rules.d/70-persistent-net.rules; echo Interfaces removed. You should system-restart now.' + +alias adtpro-stop='sudo pkill -f [A]DTPro' + + +alias adtpro-restart='sudo pkill -f [A]DTPro; while [[ $(ps aux | grep [A]DTPro) ]]; do sleep 1; done; adtpro-start' + +alias usblogin-off='sudo sed -i "s/^\(.*-scanttyUSB\)/#\1/" /etc/inittab; sudo init q; sudo pkill -f [g]etty' +alias usblogin-on='sudo sed -i "s/^#\(.*-scanttyUSB\)/\1/" /etc/inittab; sudo init q' + + + +alias term='source term' + + + + + + +alias vsd1='source /usr/local/bin/vsd -d1' +alias vsd2='source /usr/local/bin/vsd -d2' +forfloppy () { [[ $1 ]] && { mv "$1" /usr/local/adtpro/disks && echo "moved $1 to /usr/local/adtpro/disks" || echo "Unsuccessful. $1 was not moved."; } || echo "Usage: forfloppy imageFileName"; } + +alias vsdsync='adtpro-restart' + +alias nulib=nulib2 + + + + + + + +alias a2cat='acmd -l' + + + + + + + + +VSD1=$(readlink /usr/local/adtpro/disks/Virtual.po) +VSD2=$(readlink /usr/local/adtpro/disks/Virtual2.po) +ADTDISKS=/usr/local/adtpro/disks; A2DISKS=/usr/local/adtpro/disks +A2CLOUD=/usr/local/adtpro/disks/A2CLOUD.HDV +GSDISKS=/usr/local/share/gsdisks +GSHD=/usr/local/share/gsdisks/gsoshd.hdv + + + + + + + + + + +ttytter () { ( ansi=; seven=; [[ $(grep ttyUSB <<< $myTTY) || $(grep ttyAMA <<< $myTTY) ]] && { seven="-seven"; [[ $TERM=="ansi" || $TERM=="pcansi" ]] && ansi="-ansi"; }; [[ -f /usr/bin/ttytter ]] && /usr/bin/ttytter -ssl $seven $ansi $@ || /usr/local/bin/ttytter -ssl $seven $ansi $@ ); } + + +alias raspple-update='rasppleii-update' +alias rasappleii-update='rasppleii-update' +alias rasapple-update='rasppleii-update' diff --git a/docs/ivanx/setup/a2cloud-help.txt b/docs/ivanx/setup/a2cloud-help.txt new file mode 100644 index 0000000..b39ce76 --- /dev/null +++ b/docs/ivanx/setup/a2cloud-help.txt @@ -0,0 +1,87 @@ + A2CLOUD commands: + (note : new commands may be added; use a2cloud-setup to refresh) + +a2cloud-help : show this list of commands +a2cloud-version : see installed version of A2CLOUD +a2cloud-update : update A2CLOUD, or add features + +system-shutdown : shut down the A2CLOUD machine (or VM) +system-restart : shut down and restart the A2CLOUD machine (or VM) + + Raspberry Pi commands, if you're using one: +raspi-config : configure Raspberry Pi +appleiipi-update : update Apple II Pi and GSport +raspbian-update : update Raspbian operating system +rasppleii-update : update Raspbian OS, A2CLOUD, A2SERVER, Apple II Pi + Apple II Pi: for help, visit http://schmenk.is-a-geek.com/wordpress + +welcome-message-edit : change the welcome message + +showip : show the current ethernet IP address of the server +showmac : show the MAC (Ethernet hardware) address of the server +showip-wifi : show the current wifi IP address of the server +showmac-wifi : show the MAC (wifi hardware) address of the server +ifreset : reset all network interfaces (requires restart) + +adtpro-stop : stop the ADTPro service +adtpro-start : start the ADTPro service + (note: autostarts on appearance of eligible USB-to-serial adapter) +adtpro-restart : restart the ADTPro service + +usblogin-off : disable shell login for USB-to-serial adapter +usblogin-on : enable shell login with USB-to-serial adapter on upper + USB port or hub attached to it, or highest-numbered port on hub + attached to lower USB port + +term [-d] mono : use VT-100 (mostly monochrome) emulation in serial + shell login for ProTERM, Spectrum, Z-Link, etc. (-d sets default) +term [-d] color : use ANSI color and PC graphic text in serial shell + login for Spectrum or other PC-ANSI terminal (-d sets default) +baud : show or set serial port shell baud rate +screen : switch between multiple terminal screens + +vsd1 : show or set the disk image assigned to virtual drive 1 +vsd2 : show or set the disk image assigned to virtual drive 2 +forfloppy : move the disk image to the ADTPro disk images folder + (/usr/local/adtpro/disks) in preparation for transfer +vsdsync : update ADTPro server with the current virtual drive images + +nulib2 : create, extract, and work with NuFX (ShrinkIt) archive files +sciibin : decode BinSCII file (they start with 'FiLeStArTfIlEsTaRt') +unblu/usq/unbit/unexec : decode Binary II, Squeezed, Executioner, + or monitor hex entry EXEC file (old Apple II distribution formats) + +unar : extract non-Apple II archive files (multiformat) +lsar : list contents of non-Apple II archive files (multiformat) + +a2cat: catalog Apple II disk image (any format) +acmd : do stuff with files inside Apple II disk images +mkpo : make blank ProDOS disk image file +dos2pro: copy files from DOS 3.3 disk image to ProDOS disk image +dopo : convert DOS-ordered disk image to ProDOS, or vice-versa +cppo : catalog and copy files from ProDOS image file (slow, but works) +shk2image : extract files from ShrinkIt archive to disk image file + + environment variables : +$VSD1 = disk image currently "inserted" in virtual drive 1 +$VSD2 = disk image currently "inserted" in virtual drive 2 +$ADTDISKS = ADTPro disks directory (/usr/local/adtpro/disks) +$A2CLOUD = 800K A2CLOUD disk (/usr/local/adtpro/disks/A2CLOUD.HDV) +$GSDISKS = GSport/KEGS disks directory (/usr/local/share/gsdisks) +$GSHD = GSport/KEGS hard drive (/usr/local/share/gsdisks/gsoshd.hdv) + + internet tools: +ftp : connect to an FTP site (command line operation) +cftp : connect to an FTP site (full screen operation) +lynx : browse the web (in text only, of course) +links : browse the web (alternative to lynx; press ESC for menu) +wget : download a single URL from an FTP or web site +irssi : IRC chat (general purpose) +a2chat : IRC chat (automatically opens to Apple II channel) +a2news : read and post on Usenet discussions (default Apple II topics) +ttytter : tweet like there's no tomorrow + + emulators: +gsport : GSport Apple IIgs emulator +kegs : KEGS Apple IIgs emulator +linapple : LinApple Apple IIe emulator diff --git a/docs/ivanx/setup/a2cloudrc.txt b/docs/ivanx/setup/a2cloudrc.txt new file mode 100644 index 0000000..aee7c12 --- /dev/null +++ b/docs/ivanx/setup/a2cloudrc.txt @@ -0,0 +1,34 @@ +source /usr/local/etc/a2cloud-aliases + +if [[ -f /usr/local/java/bin/java ]]; then + export JAVA_HOME=/usr/local/java +elif [[ -f /usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt/bin/java ]]; then # RPi + export JAVA_HOME=/usr/lib/jvm/jdk-8-oracle-arm-vfp-hflt +elif [[ -f /usr/lib/jvm/java-8-oracle/bin/java ]]; then # webupd8 + export JAVA_HOME=/usr/lib/jvm/java-8-oracle +elif [[ -f /usr/lib/jvm/java-8-oracle/jre/bin/java ]]; then # Ubuntu 14.04 RPi2 + export JAVA_HOME=/usr/lib/jvm/java-8-oracle/jre +elif [[ -f /usr/lib/jvm/jdk-7-oracle-armhf/bin/java ]]; then # RPi + export JAVA_HOME=/usr/lib/jvm/jdk-7-oracle-armhf +elif [[ -f /usr/lib/jvm/jdk-7-oracle/bin/java ]]; then # webupd8 + export JAVA_HOME=/usr/lib/jvm/jdk-7-oracle +fi +[[ ! $(grep java <<< $PATH) ]] && PATH=$PATH:$JAVA_HOME/bin + +if [[ -f /usr/local/etc/a2cloud-lang ]]; then + lang8bit=$(cat /usr/local/etc/a2cloud-lang) +else + lang8bit=C +fi +if [[ ${TERM:0:6} == "screen" ]]; then + myTTY=$(ps hp $(ps hp $(ps hp $$ -o ppid) -o ppid) -o tty) +else + myTTY=$(tty) + export ttyTERM="$TERM" +fi +if [[ $(grep ttyUSB <<< $myTTY) || $(grep ttyAMA <<< $myTTY) ]]; then + LANG=$lang8bit +fi +if [[ ${TERM:0:6} == "screen" ]]; then + TERM=$ttyTERM +fi