Pedro P. Irazoqui 6/30/2015 Python Installation on Mac OS X

Total Page:16

File Type:pdf, Size:1020Kb

Pedro P. Irazoqui 6/30/2015 Python Installation on Mac OS X Pedro P. Irazoqui 6/30/2015 Python installation on Mac OS X: 1. Install Xquartz First you’ll need to install a UNIX windows manager. Mac OS X is a UNIX-based operating system running a window manager called Aqua by default. Installing XQuartz will allow you to really take advantage of your machine and open up a world of free (e.g. Gimp for photoshop-like image processing; Octave for a free implementation of Matlab; and countless others) and paid software (e.g. Matlab for scientific computing; Cadence for microchip design, simulation, and layout; and many others). Download the XQuartz installer from here: http://xquartz.macosforge.org/landing/ Follow the instructions, and drag the XQuartz icon onto your dock. You’ll be using it a lot! As an engineer you should really know your way around a UNIX terminal. You can get there in an afternoon by going through this tutorial once you’ve installed XQuartz: http://linuxcommand.org/learning_the_shell.php After you do that, you’ll want to configure both your xterm environment and your shell to work best with python. My own xinitrc and bashrc files are located in the same directory as this document. They’re a good place to start, and you can modify from there. When they’re ready, you should put them in your home directory and prefix them with a “.” so you’ll have a .xinitrc and .bashrc files. Once you do this, you’ll no longer see them if you type “ls” at the prompt. Use “ls -a” instead. Finally, you’ll want to settle on a text editor to write your programs. I think most people use emacs, but old-school guys like me use vi. Both are already installed on your Mac, and you can start them by typing $ emacs or $ vi at the terminal prompt. Note that the prompt here is assumed to be “$”, don’t type that, just type the part after the “$”. If you’ve used my .bashrc file above, your prompt will end in “>>”. vi is definitely a little cryptic at first, but I think it’s well worth it if you get the hang of it. That’s up to you though. If you decide you want to learn vi, go through this quick tutorial: http://www.unix-manuals.com/tutorials/vi/vi-in-10-1.html 2. vi configuration (optional) First you’ll want to install Python-mode for vi. Note: vim is a newer version of vi, when you type vi at the prompt, you’re actually running vim. Essentially vim has replaced vi, and the two terms are used interchangeably with most everyone using vim and calling it vi. The easiest way to install Python-mode is to use pathogen. At the prompt, type: $ mkdir -p ~/.vim/autoload ~/.vim/bundle $ curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim $ cd ~/.vim/bundle $ git clone git://github.com/klen/python-mode.git !1 of !5 Pedro P. Irazoqui 6/30/2015 Then create a .vimrc file in your home directory. You should use the vimrc file I’ve included in the same directory as this document as a template. Remember to prefix my vimrc with a “.” so it’s .vimrc, then re-start XQuartz to have it take effect. This file will customize your vi editor so that it color codes your python programs, error checks your syntax, etc… Makes for a very nice development environment. Everybody has their own preferences, and that’s part of the beauty of UNIX, so feel free to change and customize your .xinitrc, .bashrc, and .vimrc files after you have everything up and running. 3. Install Python 3.X Go to the main python.org website: http://www.python.org/getit/ And download dmg for the most recent version of Python. I used the Python 3.4.3 Mac OS X 64-bit/32-bit x86-64/i386 Installer. Your machine or operating system may differ. Please follow the installation instructions. Now when you wish to run python type the following at the prompt $ python3 Note that this won’t work unless you’ve added the .bashrc file in step 1 above, since the command python3 is an alias pointing to the location of the Python 3.4.3 installation. If all this UNIX stuff is giving you a headache, don’t worry, you don’t need to understand what I just said, just make sure you follow the directions in step 1 above. 4. Install pip for Python 3.X pip is the package manager that links with PyPi to download and install packages, as well as uninstall or upgrade them down the road. $ curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py $ sudo python3 get-pip.py Now you need to add the path to your .bashrc file by adding to or editing the line at the top of that file to include at least this: export PATH="$PATH:/usr/local/bin:/Library/Frameworks/Python.framework/Versions/ 3.4/bin" Any additional directories you want in you path should be appended to that line and separated by colons so the PATH is of this form: export PATH = “$PATH:path1:path2:path3:pathN” After installing pip for python 3.X, restart your X Windows server and type pip3 at the prompt: $ pip3 You’ll see a list of the commands that go with pip3. Note that if you type pip rather than pip3, you’ll run the installation of pip that goes with the default Python 2.7 installation that came with !2 of !5 Pedro P. Irazoqui 6/30/2015 OSX. Installing packages with pip will install them for Python 2.7, installing them with pip3 will install them for Python 3.X. So be sure to use pip3. You’ll find a few commands particularly useful. “list” will give you a list of the packages you’ve already installed: $ pip3 list “show” will tell you about package_name, including the most current version number: $ pip3 show package_name “install” will install the package named package_name: $ pip3 install package_name “uninstall” will uninstall the package named package_name: $ pip3 uninstall package_name The “--upgrade option” will upgrade the package named package_name: $ pip3 install package_name --upgrade 5. Install packages Now that you have pip, there are loads of packages to choose from. For starters, make sure you install NumPy, SciPy and matplotlib to allow you to do everything from signal processing to data presentation: $ pip3 install numpy $ pip3 install scipy $ pip3 install matplotlib 6. Install iPython iPython is not a required package, but it is a much nicer command-line environment to work from than the default that comes with your Python installation. Also, iPython comes with notebook which is truly awesome. $ pip3 install ipython From there, you’ll want to install some basic dependencies to enable the full functionality of iPython. First install readline, for command-line editing, tab completion and other ease-of-use capabilities: $ pip3 install readline You’ll want to install nose: $ pip3 install nose And you’ll want to install pexpecgt $ pip3 install pexpect-u !3 of !5 Pedro P. Irazoqui 6/30/2015 You’ll definitely want to have notebook installed, which requires you to enable parallel computing by installing PyZMQ $ pip3 install pyzmq For notebook, you’ll also need to install Tornado: $ pip3 install tornado And finaly, you’ll also need to install Jinja: $ pip3 install jinja2 7. Learning Python Please work your way through the entire Python tutorial: http://docs.python.org/3.4/tutorial/ Now that you’ve learned the basics, you can begin to explore iPython and notebook by going through the tutorial here: http://ipython.org/ipython-doc/stable/interactive/tutorial.html iPython is what I use every time for my interactive shell. Highly recommended. Congratulations, you are now ready for BME 301: Bioelectricity!!! 8. Extras There are a few other packages you may be interested in. Don’t feel like you have to install them all from the get go, I’m just mentioning them here so you’ll know where to begin if you’re interested. C++: If you’re interested in writing hardware interfaces (or anything really) using Objective-C and want to run those code segments in Python, install PyObjC: $ pip3 install -U pyobjc-core $ pip3 install -U pyobjc GUIs: If you’re interested in creating graphical user interfaces (buttons, windows, etc…), you can choose from Tkinter, PyQT, and wxPython among others. Most of what I’ve read recommends PyQT. Head on over to: http://qt-project.org/downloads and download the installer (I used the offline one). Mount the dmg (by double clicking it), and launch the Qt installer. This will install Qt in your home directory. If you wish to run the QT Creator app, it won’t be in your applications folder, instead: $ cd ~/Qt5.2.0 $ open Qt\ Creator.app/ Before going further, add the Qt bin directory to the PATH in your .bashrc: PATH=$PATH:/Users/your_home_dir_name/Qt5.2.0/5.2.0/clang_64/bin !4 of !5 Pedro P. Irazoqui 6/30/2015 Now that you have Qt installed, get to know the software (note: you can launch Qt Designer from within Qt Creator as shown on this link): http://qt-project.org/doc/qt-5/designer-to-know.html Then, go through a tutorial: http://qt-project.org/doc/qt-5/designer-quick-start.html And finally, you can explore the manual: http://qt-project.org/doc/qt-5/qtdesigner-manual.html After you’ve installed the Qt libraries and modified the PATH in your .bashrc (remember to restart XQuartz so the changes take effect), you’ll need to install SIP.
Recommended publications
  • Connecting to Cat5 Via X2go from Macos Before Connecting to Cat5 the First Time, Please Follow the “First Time Only” Steps Below
    Brought to you by DES Computing Services Questions? [email protected] Connecting to Cat5 via X2Go from macOS Before connecting to Cat5 the first time, please follow the “First Time Only” steps below. Connecting to Cat5 1. From the Applications menu in Finder, run the “x2goclient” application. 2. Click on the white box on the right that says “cat5.” 3. Enter your Cat5 password as prompted and click OK. 4. The first time you connect, it will ask if you trust the host key. To verify the secure connection, check that the provided “hash” exactly matches one of these lines: • 5e:c1:1a:7a:3d:07:72:64:d3:fc:fe:0a:cc:c5:0f:c8:d1:92:aa:0a • 55:87:cd:ef:80:dc:9d:e8:1d:14:87:27:40:00:01:4a If it matches one of those, then click “Yes” to connect. If it doesn't match either of them, then please check Cat5 Host Key Fingerprints on the DES website for more possible hash values. Do not accept an unverified host key! Disconnecting from Cat5 1. To properly close your session, click on the “System” menu (within the Cat5 desktop) and then click “Log out <name>...” 2. If you just close the window, it will pause your session. You should be able to reconnect later to resume where you left off, but sometimes this might not work. To be safe, follow step 1. First Time Only Steps Install XQuartz You must have the “XQuartz” X-Window system installed before you install X2Go. You may have already installed it for another class.
    [Show full text]
  • Release Notes for X11R6.8.2 the X.Orgfoundation the Xfree86 Project, Inc
    Release Notes for X11R6.8.2 The X.OrgFoundation The XFree86 Project, Inc. 9February 2005 Abstract These release notes contains information about features and their status in the X.Org Foundation X11R6.8.2 release. It is based on the XFree86 4.4RC2 RELNOTES docu- ment published by The XFree86™ Project, Inc. Thereare significant updates and dif- ferences in the X.Orgrelease as noted below. 1. Introduction to the X11R6.8.2 Release The release numbering is based on the original MIT X numbering system. X11refers to the ver- sion of the network protocol that the X Window system is based on: Version 11was first released in 1988 and has been stable for 15 years, with only upwardcompatible additions to the coreX protocol, a recordofstability envied in computing. Formal releases of X started with X version 9 from MIT;the first commercial X products werebased on X version 10. The MIT X Consortium and its successors, the X Consortium, the Open Group X Project Team, and the X.OrgGroup released versions X11R3 through X11R6.6, beforethe founding of the X.OrgFoundation. Therewill be futuremaintenance releases in the X11R6.8.x series. However,efforts arewell underway to split the X distribution into its modular components to allow for easier maintenance and independent updates. We expect a transitional period while both X11R6.8 releases arebeing fielded and the modular release completed and deployed while both will be available as different consumers of X technology have different constraints on deployment. Wehave not yet decided how the modular X releases will be numbered. We encourage you to submit bug fixes and enhancements to bugzilla.freedesktop.orgusing the xorgproduct, and discussions on this server take place on <[email protected]>.
    [Show full text]
  • Working with System Frameworks in Python and Objective-C
    Working with System Frameworks in Python and Objective-C by James Barclay Feedback :) j.mp/psumac2015-62 2 Dude, Where’s My Source Code? CODE https://github.com/futureimperfect/psu-pyobjc-demo https://github.com/futureimperfect/PSUDemo SLIDES https://github.com/futureimperfect/slides 3 Dude, Where’s My Source Code? CODE https://github.com/futureimperfect/psu-pyobjc-demo https://github.com/futureimperfect/PSUDemo SLIDES https://github.com/futureimperfect/slides 3 Dude, Where’s My Source Code? CODE https://github.com/futureimperfect/psu-pyobjc-demo https://github.com/futureimperfect/PSUDemo SLIDES https://github.com/futureimperfect/slides 3 Agenda 1. What are system frameworks, and why should you care? 2. Brief overview of the frameworks, classes, and APIs that will be demonstrated. 3. Demo 1: PyObjC 4. Demo 2: Objective-C 5. Wrap up and questions. 4 What’s a System Framework? …and why should you care? (OS X) system frameworks provide interfaces you need to write software for the Mac. Many of these are useful for Mac admins creating: • scripts • GUI applications • command-line tools Learning about system frameworks will teach you more about OS X, which will probably make you a better admin. 5 Frameworks, Classes, and APIs oh my! Cocoa CoreFoundation • Foundation • CFPreferences - NSFileManager CoreGraphics - NSTask • Quartz - NSURLSession - NSUserDefaults • AppKit - NSApplication 6 CoreFoundation CoreFoundation is a C framework that knows about Objective-C objects. Some parts of CoreFoundation are written in Objective-C. • Other parts are written in C. CoreFoundation uses the CF class prefix, and it provides CFString, CFDictionary, CFPreferences, and the like. Some Objective-C objects are really CF types behind the scenes.
    [Show full text]
  • Macspeechx.Py MODULE and ITS USE in an ACCELERATOR CONTROL SYSTEM Noboru Yamamoto*, J-PARC Cener, KEK and JAEA, Ibaraki, JAPAN
    Proceedings of ICALEPCS2013, San Francisco, CA, USA TUPPC109 MacspeechX.py MODULE AND ITS USE IN AN ACCELERATOR CONTROL SYSTEM Noboru Yamamoto*, J-PARC cener, KEK and JAEA, Ibaraki, JAPAN Abstract With additional functionality such as user interface or macspeechX.py[1] is a Python module to accels speech selection of voices for specified UDP ports, this program synthesis library on MacOSX. This module have been can fit one or two pages of the paper used in the vocal alert system in KEKB[2] and J- While this system running without serious problem PARC[3] accelerator control system. Recent upgrade of until MacOSX came to the market. In Python on this module allow us to handle non-English lanugage, MacOSX does not includes macspeech.py as a its such as Japanese, through this module. Implementation components. It means we need to develop our own detail will be presented as an example of Python program solution before old Mac hardware would be replaced by accessing system library. new hardware which just runs MacOSX. SPEECH SYNTHESIS IN CONTROL In the next section, we will see several ways to write SYSTEMS Python module which bridges C/C++ library. In some control system, alerts to the operators can be sent as vocal messages. It used be require the special hardware or software to generate vocal message from computers in the system. When we started commissioning of KEKB accelerator, such an alert system was requested. We picked up: • speech synthesis library includes as one of standard libraries on Macintosh OS from Apple. • Macspeech.py module distributed as one of standard module with Python programming Langauge Figure 1: Software overview of KEKB/J-PARC vocal With these two components, we could build a very low alert system.
    [Show full text]
  • An Introduction to the X Window System Introduction to X's Anatomy
    An Introduction to the X Window System Robert Lupton This is a limited and partisan introduction to ‘The X Window System’, which is widely but improperly known as X-windows, specifically to version 11 (‘X11’). The intention of the X-project has been to provide ‘tools not rules’, which allows their basic system to appear in a very large number of confusing guises. This document assumes that you are using the configuration that I set up at Peyton Hall † There are helpful manual entries under X and Xserver, as well as for individual utilities such as xterm. You may need to add /usr/princeton/X11/man to your MANPATH to read the X manpages. This is the first draft of this document, so I’d be very grateful for any comments or criticisms. Introduction to X’s Anatomy X consists of three parts: The server The part that knows about the hardware and how to draw lines and write characters. The Clients Such things as terminal emulators, dvi previewers, and clocks and The Window Manager A programme which handles negotiations between the different clients as they fight for screen space, colours, and sunlight. Another fundamental X-concept is that of resources, which is how X describes any- thing that a client might want to specify; common examples would be fonts, colours (both foreground and background), and position on the screen. Keys X can, and usually does, use a number of special keys. You are familiar with the way that <shift>a and <ctrl>a are different from a; in X this sensitivity extends to things like mouse buttons that you might not normally think of as case-sensitive.
    [Show full text]
  • Chapter 1. Origins of Mac OS X
    1 Chapter 1. Origins of Mac OS X "Most ideas come from previous ideas." Alan Curtis Kay The Mac OS X operating system represents a rather successful coming together of paradigms, ideologies, and technologies that have often resisted each other in the past. A good example is the cordial relationship that exists between the command-line and graphical interfaces in Mac OS X. The system is a result of the trials and tribulations of Apple and NeXT, as well as their user and developer communities. Mac OS X exemplifies how a capable system can result from the direct or indirect efforts of corporations, academic and research communities, the Open Source and Free Software movements, and, of course, individuals. Apple has been around since 1976, and many accounts of its history have been told. If the story of Apple as a company is fascinating, so is the technical history of Apple's operating systems. In this chapter,[1] we will trace the history of Mac OS X, discussing several technologies whose confluence eventually led to the modern-day Apple operating system. [1] This book's accompanying web site (www.osxbook.com) provides a more detailed technical history of all of Apple's operating systems. 1 2 2 1 1.1. Apple's Quest for the[2] Operating System [2] Whereas the word "the" is used here to designate prominence and desirability, it is an interesting coincidence that "THE" was the name of a multiprogramming system described by Edsger W. Dijkstra in a 1968 paper. It was March 1988. The Macintosh had been around for four years.
    [Show full text]
  • Release and Installation Notes
    CSD Release and Installation Notes 2016 CSDS Release Copyright © 2016 Cambridge Crystallographic Data Centre Registered Charity No 800579 Conditions of Use The Cambridge Structural Database System (CSD System) comprising all or some of the following: ConQuest, Quest, PreQuest, deCIFer, Mercury, (Mercury CSD and CSD-Materials [formerly known as the Solid Form or Materials module of Mercury], Mercury DASH), Mogul, IsoStar, DASH, SuperStar, web accessible CSD tools and services, WebCSD, CSD Java sketcher, CSD data file, CSD-UNITY, CSD-MDL, CSD-SDFile, CSD data updates, sub files derived from the foregoing data files, documentation and command procedures, test versions of any existing or new program, code, tool, data files, sub-files, documentation or command procedures which may be available from time to time (each individually a Component) is a database and copyright work belonging to the Cambridge Crystallographic Data Centre (CCDC) and its licensors and all rights are protected. Use of the CSD System is permitted solely in accordance with a valid Licence of Access Agreement or Products Licence and Support Agreement and all Components included are proprietary. When a Component is supplied independently of the CSD System its use is subject to the conditions of the separate licence. All persons accessing the CSD System or its Components should make themselves aware of the conditions contained in the Licence of Access Agreement or Products Licence and Support Agreement or the relevant licence. In particular: The CSD System and its Components are licensed subject to a time limit for use by a specified organisation at a specified location. The CSD System and its Components are to be treated as confidential and may NOT be disclosed or re-distributed in any form, in whole or in part, to any third party.
    [Show full text]
  • Qtile Documentation Release 0.15.1
    Qtile Documentation Release 0.15.1 Aldo Cortesi Apr 14, 2020 Contents 1 Getting started 1 1.1 Installing Qtile..............................................1 1.2 Configuration...............................................5 2 Commands and scripting 25 2.1 Commands API............................................. 25 2.2 Scripting................................................. 28 2.3 qshell................................................... 28 2.4 iqshell.................................................. 30 2.5 qtile-top.................................................. 31 2.6 qtile-run................................................. 31 2.7 qtile-cmd................................................. 31 2.8 dqtile-cmd................................................ 34 3 Getting involved 37 3.1 Contributing............................................... 37 3.2 Hacking on Qtile............................................. 38 4 Miscellaneous 43 4.1 Reference................................................. 43 4.2 Frequently Asked Questions....................................... 107 4.3 License.................................................. 108 Index 109 i ii CHAPTER 1 Getting started 1.1 Installing Qtile 1.1.1 Distro Guides Below are the preferred installation methods for specific distros. If you are running something else, please see In- stalling From Source. Installing on Arch Linux Stable versions of Qtile are currently packaged for Arch Linux. To install this package, run: pacman -S qtile Please see the ArchWiki for more information on
    [Show full text]
  • Python for the C# Developer
    {SDD} 2014 Software Design & Development Python for the C# developer Michael Kennedy @mkennedy http://blog.michaelckennedy.net Objectives • Introduce the basics of the Python language • Review what is awesome about C# and .NET • Explore Python's version of each C# / .NET feature DEVELOPMENTOR Michael Kennedy | @mkennedy | blog.michaelckennedy.net What is Python? • High-level programming language • Interpreted (sometimes JIT compiled) • Object-oriented (especially Python 3) • Strongly-typed with dynamic semantics • Syntax emphasizes readability • Supports modules and packages • Batteries included (large standard library [1]) DEVELOPMENTOR Michael Kennedy | @mkennedy | blog.michaelckennedy.net The ‘shape’ of a Python program • Python defines code blocks (known as suites in Python) using whitespace and colons. Things to note: def somemethod(name): • No semicolons if name == "Michael": print("Hi old friend") • Code blocks start with ‘:’ else: • Whitespace really really matters print("Nice to meet you") • There are no braces print("My name is … ") • There are no parentheses • Tabs are not your friend def main(): somemethod() Code suites DEVELOPMENTOR Michael Kennedy | @mkennedy | blog.michaelckennedy.net Python language demo DEVELOPMENTOR Michael Kennedy | @mkennedy | blog.michaelckennedy.net What's awesome about C# and .NET? System.Object: Everything is an object. LINQ IEnumerable + foreach loops Visual Studio / IDEs Class properties ( int Age {get; set;} ) Side-by-side execution (isolation) Anonymous types Iterator methods / yield return
    [Show full text]
  • Bleak Documentation Release 0.12.1
    bleak Documentation Release 0.12.1 Henrik Blidh Jul 07, 2021 Contents 1 Features 3 1.1 Installation................................................3 1.2 Scan/Discover..............................................4 1.3 Usage...................................................6 1.4 Bleak backends..............................................6 1.5 Interfaces, exceptions and utils......................................8 1.6 Troubleshooting............................................. 24 1.7 Contributing............................................... 28 1.8 Credits.................................................. 29 1.9 Changelog................................................ 30 2 Indices and tables 43 Python Module Index 45 Index 47 i ii bleak Documentation, Release 0.12.1 Bleak is an acronym for Bluetooth Low Energy platform Agnostic Klient. • Free software: MIT license • Documentation: https://bleak.readthedocs.io. Bleak is a GATT client software, capable of connecting to BLE devices acting as GATT servers. It is designed to provide a asynchronous, cross-platform Python API to connect and communicate with e.g. sensors. Contents 1 bleak Documentation, Release 0.12.1 2 Contents CHAPTER 1 Features • Supports Windows 10, version 16299 (Fall Creators Update) or greater • Supports Linux distributions with BlueZ >= 5.43 (See Linux backend for more details) • OS X/macOS support via Core Bluetooth API, from at least OS X version 10.11 Bleak supports reading, writing and getting notifications from GATT servers, as well as a function for discovering BLE devices. Contents: 1.1 Installation 1.1.1 Stable release To install bleak, run this command in your terminal: $ pip install bleak This is the preferred method to install bleak, as it will always install the most recent stable release. If you don’t have pip installed, this Python installation guide can guide you through the process. 1.1.2 From sources The sources for bleak can be downloaded from the Github repo.
    [Show full text]
  • Proceedings of the FREENIX Track: 2002 USENIX Annual Technical Conference
    USENIX Association Proceedings of the FREENIX Track: 2002 USENIX Annual Technical Conference Monterey, California, USA June 10-15, 2002 THE ADVANCED COMPUTING SYSTEMS ASSOCIATION © 2002 by The USENIX Association All Rights Reserved For more information about the USENIX Association: Phone: 1 510 528 8649 FAX: 1 510 548 5738 Email: [email protected] WWW: http://www.usenix.org Rights to individual papers remain with the author or the author's employer. Permission is granted for noncommercial reproduction of the work for educational or research purposes. This copyright notice must be included in the reproduced paper. USENIX acknowledges all trademarks herein. XCL : An Xlib Compatibility Layer For XCB Jamey Sharp Bart Massey Computer Science Department Portland State University Portland, Oregon USA 97207–0751 fjamey,[email protected] Abstract 1 The X Window System The X Window System [SG86] is the de facto standard technology for UNIX applications wishing to provide a graphical user interface. The power and success of the X model is due in no small measure to its separation of The X Window System has provided the standard graph- hardware control from application logic with a stable, ical user interface for UNIX systems for more than 15 published client-server network protocol. In this model, years. One result is a large installed base of X applica- the hardware controller is considered the server, and in- tions written in C and C++. In almost all cases, these dividual applications and other components of a com- programs rely on the Xlib library to manage their inter- plete desktop environment are clients.
    [Show full text]
  • How To: X11 Forwarding
    written by Nate Book, `14 on 12/08/2011 updated 12/09/2011 How To: X11 Forwarding or, how to get Matlab through SSH Introduction SSH allows you to remotely access the cycle computers to test code for C (gcc, make), Prolog (pl), and Scheme (racket). All of these are accessible via the command-line. If you’re on Windows, you are familiar with something simple like PuTTY. On Linux or Mac, a command like ssh name@host brings it up for you. It’s command-line only and you’re stuck wondering, is there something better? Is there some way to access the familiar Dr. Racket interface as opposed to just racket? Is there a way to get the graphical Matlab environment (typing matlab just gives an error about a missing display— this is correct since it doesn’t know about your display. You might as well ssh from a non-graphical OS for all it cares)? Yes! The trick is X11 Forwarding. Linux and X11 X11 is the 11th version of the X Windows Server (not related to Windows in any way), a protocol allowing window managers to display GUIs on many Linux distributions such as Fedora or Ubuntu. X11 is a server in that applications “connect” to it and send it abstracted GUI information. It also allows remote computers to do the same through, for example, SSH. To actually do this on any OS you need two things, OpenSSH and X.Org. The following sections detail this for common operating systems. Linux/Unix-based This is astoundingly easy to do on any distribution that comes with X Windows.
    [Show full text]