Shellshare: Difference between revisions
m →Setup |
m →Setup |
||
Line 68: | Line 68: | ||
mkdir -p ~/.local/bin/ && wget https://raw.githubusercontent.com/vitorbaptista/shellshare/master/public/bin/shellshare -O ~/.local/bin/shellshare && chmod +x ~/.local/bin/shellshare | mkdir -p ~/.local/bin/ && wget https://raw.githubusercontent.com/vitorbaptista/shellshare/master/public/bin/shellshare -O ~/.local/bin/shellshare && chmod +x ~/.local/bin/shellshare | ||
echo "alias shortname='shellshare --server linux.itcollege.ee:3000 --room roomname --password roompassword'" >> ~/.bash_aliases && source ~/.bash_aliases | echo "alias shortname='shellshare --server linux.itcollege.ee:3000 --room roomname --password roompassword'" >> ~/.bash_aliases && source ~/.bash_aliases | ||
From now on, it is enough to open the terminal and you can quickly use it by entering the specified short command name. When started, the terminal also says the address from which others can then see the commands entered in the terminal, in near real time. This address can also be shared with students in a timely manner, which students can then open during class. | From now on, it is enough to open the terminal and you can quickly use it by entering the specified short command name. When started, the terminal also says the address from which others can then see the commands entered in the terminal, in near real time. This address can also be shared with students in a timely manner, which students can then open during class. |
Revision as of 18:32, 27 February 2021
Eesti keeles
IT Kolledž: http://linux.itcollege.ee:3000
avalik teenus: https://shellshare.net/
Versioon 1.1.0 lisab MS Windowsi toetuse ilma emuleerimiseta.
Võimalus jagada käsurida Pythoni abil reaalajas veebipõhiselt ja võimaldada õppuritel paremini jälgida tunnis antud käske ja nende väljundit ja vältida ümberkirjutamisest tekkivaid vigu. Võimalus ka virtuaalmasinast otse käsurida edastada. Edastamine toimub vaid vaatamisrežiimis. Kui soovitakse muutmisrežiimis (aka collaborative hacking) siis näiteks Teleconsole võib huvi pakkuda.
Paigaldamine
Kiire paigaldus Linuxis
mkdir -p ~/.local/bin/ && wget https://raw.githubusercontent.com/vitorbaptista/shellshare/master/public/bin/shellshare -O ~/.local/bin/shellshare && chmod +x ~/.local/bin/shellshare
echo "alias lühikäsunimi='shellshare --server linux.itcollege.ee:3000 --room ruuminimi --password ruumisalasõna'" >> ~/.bash_aliases && source ~/.bash_aliases
Edaspidi piisab terminali avamisest ja saab määratud lühikäsunime sisestades kiirelt kasutada. Selle käivitamisel öeldakse terminalis ka aadress, mille pealt teised siis terminali sisestatud käske näevad, peaaegu reaalajas. Seda aadressi saab aegsasti ka tudengitele jagada, mida tunni ajal siis tudengid avada saavad.
- skripti allalaadimine https://github.com/vitorbaptista/shellshare/releases - valida Latest Release
- on olemas ka programmi koduleht kus allalaadimise viide kuid võib juhtuda, et see ei tööta
- lahtipakitud kaustast leiab skripti public/bin/shellshare - selle võib ka ringi nimetada shellshare.py ja kopeerida endale meelepärasesse asukohta, võib paralleelselt ka sobivasse kohta veebis paigutada, et kiirelt näiteks virtuaalmasinasse alla laadida
Edastamine
- käsurea reaalajas edastamise alustamiseks:
python /asukoht/shellshare.py --server linux.itcollege.ee:3000 --room ruuminimi --password salasõna
- asendada
- asukoht tegeliku shellshare.py asukohaga arvuti kõvakettal
- ruuminimi soovitud nimega
- salasõna soovitud salasõnaga
- terminali edastamine on nähtav peale ülalnimetatud käsu käivitamist käsureal näidatud aadressil http://linux.itcollege.ee:3000/r/ruuminimi kus ruuminimi asemel on valitud nimetus
- veebi edastatud käsud on kopeeritavad, ajalugu vaadatav tagasi kerides (ei ole soovitav käsurida vahepeal puhastada)
- ka käsureal avatavad failid, man-lehed jne on kuvatavad; liikumine, klaviatuuri abil teksti märkimine kuvatakse ka veebivoos
Toetatud on ka mitmest terminalist korraga samale aadressile käsurea edastamine - nii on võimalik samaaegselt edastada käsurida klassiarvutist, virtuaalmasinast jne korraga samale sessioonile - nii on õppuri jaoks info ühes kohas. Info tuleb ära kopeerida, sest edastamise lõppemisel ja akna sulgemisel ajalugu ei säili.
Kui kirjutada:
python /asukoht/shellshare.py --room ruuminimi --password salasõna
... siis edastatakse shellshare.net serveri kaudu kui see töötab.
Kiire kasutamine
Võimalus teha ka lühikäsk ehk alias (vt Alias bash shellis, .bash_aliases), skript vms käsurea jagamise kiireks käivitamiseks soovitud ruuminimega
Edastamise lõpetamine
Käsurea edastamise lõpetamine: exit+Enter, sageli toimib ka CTRL+D
Erilised tänud
Erilised tänud TTÜ IT Kolledži Linuxi administraatorile Veiko Tuul serveripoole käivitamise ja selle suurepärase võimaluse loomise eest!
Viited
in English
IT College: http://linux.itcollege.ee:3000
public service: https://shellshare.net/
Version 1.1.0 adds MS Windows support without emulation.
There is an option to share command-line over Internet in real time using Python. This allows for students to follow lecturer commands and its output and avoid mistakes of rewriting commands. Streaming is going only in read-only mode. If there is edit mode needed (aka collaborative hacking) then probably Teleconsole is one of the choices you may be interested in.
Setup
Quick install for newest version in Linux
mkdir -p ~/.local/bin/ && wget https://raw.githubusercontent.com/vitorbaptista/shellshare/master/public/bin/shellshare -O ~/.local/bin/shellshare && chmod +x ~/.local/bin/shellshare
echo "alias shortname='shellshare --server linux.itcollege.ee:3000 --room roomname --password roompassword'" >> ~/.bash_aliases && source ~/.bash_aliases
From now on, it is enough to open the terminal and you can quickly use it by entering the specified short command name. When started, the terminal also says the address from which others can then see the commands entered in the terminal, in near real time. This address can also be shared with students in a timely manner, which students can then open during class.
- download the appropriate script at https://github.com/vitorbaptista/shellshare/releases - choose Latest Release
- there is also program homepage where download command is described but it might happen that the site is offline
- from unpacked folder there can be found the script in public/bin/shellshare - this can be renamed to shellshare.py and copy whenever needed. There is also possible to copy unpacked shellshare script to somewhere in the web so you can quickly download e.g. into virtual machine.
Streaming
- to start streaming the command-line in real time:
python /location/shellshare.py --server linux.itcollege.ee:3000 --room roomname --password qwerty
- replace
- location with real shellshare.py location on computer hard drive
- roomname with wanted name
- qwerty with real password
- command-line streaming is visible at http://linux.itcollege.ee:3000/r/roomname after running mentioned command, where instead of roomname there is chosen name
- streamed commands online can be copied, history is reviewable by scrolling up (do not clear the screen in command-line)
- also files that can be opened in command-line, man-pages, etc; moving, marking text with keyboard are shown in web stream
Also streaming simultaneously from multiple command-line interfaces to the same address is supported. You can stream from classroom computer, virtual machine, etc to the same session - in that way all information is on the same place. The information should be copied to permanent place because after stopping the streaming and closing the window also history will be gone.
If to write:
python /asukoht/shellshare.py --room roomname --password qwerty
... then through the shellshare.net server will be streamed if it works.
Fast usage
There can be an alias created (see also .bash_aliases), script etc to start quickly streaming command-line with appropriate settings.
Stop streaming
To stop command-line streaming: exit+Enter, usually also CTRL+D works.
Special thanks
Special thanks goes to TUT IT College Linux administrator Veiko Tuul to set up server side and offering such a great opportunity!