I was wondering this same thing, and you were SO close ... but, here's the answer, at least for 4.14.14_08_11_13_42 (see below). FYI, I did a bunch of searching and NO ONE else seems to have figured this out for Mac, so I hope I get credit for being the first ... ;-)
First, start the League client and log in as normal. Then, in terminal:
$ cd "/Applications/League of Legends.app/Contents/LoL/RADS/solutions/lol_game_client_sln/releases/0.0.0.131/deploy/LeagueOfLegends.app/Contents/MacOS"
$ riot_launched=true "/Applications/League of Legends.app/Contents/LoL/RADS/solutions/lol_game_client_sln/releases/0.0.0.131/deploy/LeagueOfLegends.app/Contents/MacOS/LeagueofLegends" 8394 LoLLauncher "/Applications/League of Legends.app/Contents/LoL/RADS/projects/lol_air_client/releases/0.0.0.140/deploy/bin/LolClient" "spectator [ip:port] [token] [number] [region]"
This worked for me. The only problem is after spectating the game, the lobby doesn't reset properly -- the "game has ended" event doesn't seem to register properly when the spectator client is launched this way. So, I just close the app and relaunch ... but, at least this way I can spectate games of people who I'm not "friends" with.
After much fiddling around, I finally figured out the right combination of things to use for a fully usable terminal.
tl;dr: FTDI-based usb/serial adapter, terminal set to VT220 with flow control both ways, special settings in /etc/gettytab
The details
Hardware
I got a new USB/Serial cable. This one has the FTDI, rather than the Prolific chipset. This is important since OSX comes with the FTDI drivers in the box, rather than having to install the third party Prolific drivers. This made troubleshooting much easier, since the serial port stopped getting stuck after each experiment, meaning no more reboots to become usable again.
If you're going to try this yourself, the cable I used was the StarTech Industrial USB RS232 Serial Adapter. This was in conjunction with a random DB9/DB25 adapter, and a gender changer since the ports on the back of the terminal are female.
Note: A previous version of this guide suggested using a different cable - this particular cable will let us use the modem port on the terminal, correcting some various display glitches!
This cable should be connected to the MODEM port on the terminal.
System Configuration
Ignore any guide that suggests you use /etc/ttys
, since this file is ignored in modern versions of OS X. This would be the way to go on Linux/BSD, but not here.
I was left wondering how to set the terminal type for the login, since as described above, just using the std.19200
that's provided in /etc/gettytab
left the terminal set to su
for some reason, and nothing worked.
I added a line as follows:
std.ttyUSB:\
:np:im=\r\n:sp#57600:tt=vt220:
This sets the login banner to a simple CRLF, sets the line speed to 57600 baud, and most importantly, sets the terminal to vt220
. This will become important later.
Now we need to actually start this. As described elsewhere, you can't just run getty
, since that's restricted to launchd
. We have to make and load a daemon plist.
To /Library/LaunchDaemons
, I added a serialconsole.plist
with the following contents:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>serialconsole</string>
<key>ProgramArguments</key>
<array>
<string>/usr/libexec/getty</string>
<string>std.ttyUSB</string>
<string>cu.usbserial-AI02GVBH</string>
</array>
</dict>
</plist>
If you do this yourself, the third string will almost certainly be different, since this is the serial number of the adapter. The second line references the line we just added to to /etc/gettytab
. Also note the setting of KeepAlive
to true
- this means that when the process exits (say, we log out), a new instance will spawn. Without this, you have to manually start the job.
Terminal Settings
Finally, the terminal itself has to be configured. This is a Wyse WY50, but it can emulate many other terminal types. I find that VT220 mode gives the best experience.
To enter setup mode on the terminal from factory settings, hit Shift + Setup.
Pressing F1 to enter the DISP
menu, I set:
- Columns to 132
- lines to 42,
- Autopage OFF
- 80/132 CLR ON. (Clears the screen if the character mode changes)
F2 to the General screen.
- Personality set to VT220-8 important!
- Scrl set to Jump (screen scrolling goes ridiculously slow on other settings)
- RCV CR set to CR (transmits just a CR, rather than a CRLF)
- Enhance set to ON (accepts enhanced control codes)
- Autoscrl set to ON (self explanatory - scrolls the screen rather than overwriting it)
- Monitor set to OFF
- Recognize DEL set to ON
F3 to the KEYCODE screen
- Keycode set to ASCII
- Corner key set to META (also known as Alt)
F4 to the COMM screen
More super important stuff:
- Comm set to FDX (full duplex)
- MDM RC HSK set to Both (receive flow control)
- Send Ack set to On
- MDM XMT HSK set to Xon-Xoff
One more - F5 to the PORTS screen
- MDM BAUD RATE set to 57600
- AUX Data/Parity set to 8/None
- AUX stop bits set to 1
Everything else I left at factory defaults.
Hit F12, then Space to set Save to Yes, and then F12 once more to save settings.
Putting it all together
We're ready to go. Make sure the terminal is on and plugged in to the port, verify the settings are as described above both gettytab
and the plist file you created.
We load the created plist into launchd:
launchctl load -w /Library/LaunchDaemons/serialconsole.plist
And finally start it:
launchctl start serialconsole.plist
And in a moment, you should have a login prompt on your terminal! Some photos:
Display glitches
You might notice that certain applications still write garbage onto the screen, especially if they do anything fancy like bold text or certain ASCII characters. Most recent machines, macs included, use UTF-8 for their character set. But this venerable glass terminal has no idea what that is! You'll need to set the locale to the appropriate legacy codepage for your region. In the USA, this is en_US.ISO-8859-1
. Have a look at the output of locale
, and work the command export LC_ALL='en_US.ISO-8859-1'
into a login script that checks your $TERM
variable. You really don't want to set this system wide, but only on sessions where your glass terminal is being used.
Best Answer
Press Ctrl+C to terminate the program and get back to the shell prompt.
If you want a program to run in the background and return you to a shell prompt, append an ampersand (
&
) to the end of the command. For example: