Remote X Tutorial

本文介绍如何将Stanford大学的Linux开发环境远程连接到个人电脑上,包括Windows、MacOSX和Linux系统的具体步骤,并演示如何使用Emacs编辑器。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

In this class, we're using the open source, UNIX-like operating system known as Linux for all of our development. For most, the transition from developing in Visual Studio or Eclipse to developing in UNIX is rough, at best. All of a sudden, you have to learn a slew of new commands just to be able to access your files, and on top of that, you have to learn the ins and outs of a new editor, Emacs. While it's helpful to go to the cluster and work directly on the machines using Emacs in a graphical window, it isn't always convenient. In this tutorial, I'll explain how to bring the UNIX environment on Stanford's machines to your own computer, as if it were running natively on your computer. That way, Emacs will appear as another window on your screen, just as if it were a graphical word processor on your system. The steps I detail are cleaner and faster than VNC, an alternative way of connecting to Stanford's machines graphically. Obviously, you still have to learn the UNIX commands, but this will definitely make your life a bit easier. Feel free to stop by my (Ryan's) office hours anytime if you run into trouble with these directions.

The basic idea of what we're doing is as follows. In UNIX, graphical applications are commonly run on top of a system known as X. X was designed for a "client/server" model which means the computer that stores and runs the application does not have to be the same computer that is displaying the application to the user. In this tutorial, we will show you how to run a UNIX terminal from a Stanford cluster computer on your very own machine. This terminal can then be used to explore your code and launch your editor (here we use Emacs).

Note that in this tutorial I assume you're using the 'myth' cluster of workstations. These are the workstations located in room B08 of the Gates basement. The Myth machines are a personal favorite of mine due to all of MY happy 107 memories, but these instructions also work for the other farmshare computers such as 'corn' and 'barley'. To use an alternate cluster, simply substitute its name wherever you see 'myth'.

To begin, select your operating system.

Windows XP/Vista/Win7:

Here we will download and install an open source program known as Xming, which is an implementation of X for Windows.

  1. Click here to download the installer for Xming.
  2. You should be able to run through the installer with the default values. At the end it should summarize the install like this: 
     
    Click install and let it do its thing.
  3. After it's done, it should have created an entry for 'Xming' in your Start menu. Go into the folder and click 'XLaunch' to bring up the wizard that will let you create a shortcut to launch the remote terminal.
  4. Select the default 'Multiple windows'
  5. On the next screen, select 'Start a program'
  6. Next, type 'gnome-terminal' (yes...gnome) as the program to start. Then select 'Using PuTTY (plink.exe)'. Enter 'myth.stanford.edu' as the computer to connect. Finally, type your SUNet ID (ie jsmith) with your password. (XMing won't accept a password longer then 14 characters here, but just leave the password field blank, and you will be able to type it in later when you launch.) Then click next.
  7. The next screen should look like the picture below. Just click next.
  8. On the next screen, click 'Save Configuration'. In the window that pops up navigate to your desktop and type the filename 'myth.xlaunch' as shown in the picture. Then click save and finish the XLaunch wizard. Notice that it has placed a shortcut to launch the remote terminal on your desktop.
  9. For some people, Xming will launch itself and start running in the background after the installer completes. If this is the case, launching the shortcut will ask you for your password and then do nothing. Before going on to the next step, ensure that there is not a little black and orange X in the system tray at the bottom right of your screen.
  10. Launch the shortcut ('myth.xlaunch') on your desktop. It should probably ask you for your password again. Enter it and after a few seconds a terminal something like the one below should appear.
  11. Congratulations! You've got your spiffy new remote X terminal working. Please proceed to the section entitled 'What to do with your shiny new X Terminal'.

MacOS X

The cool thing about OS X is that it's build on UNIX. That's right...all of you cool Mac people are already even cooler UNIX people and you probably didn't even know it! Because of this, it's pretty simple to get X working on MacOS X.

  1. If you don't already know, check what version of OS X you're running by clicking the Apple menu and selecting 'About This Mac'.
  2. The good news is, if you're running 10.5 (Leopard) X most likely was installed by default when your operating system was installed. You can open the Terminal from Applications/Utilities and skip to Step 3. If you're running 10.4 (Tiger) then follow the directions here and afterwards launch your X terminal by opening 'X11' from Applications/Utilities. Continue on to step 3 with the 'xterm' window that shows up in place of the standard OS X Terminal.
  3. By this point, you should have an X enabled terminal in front of you. Now we're going to log into a Stanford machine. Type 'ssh -Y your_sunet_id@myth.stanford.edu' (without the quotes and with your SUNet in the right spot). The picture below gives the general idea. Type 'yes' if asked to accept a public key (this connection is encrypted!) and type your password when prompted (don't worry if nothing shows up on the screen when you type your password).
  4. Congrats! You've logged in. Please proceed to the section entitled 'What to do with your shiny new X Terminal'

Linux

If you're already running Linux (hooray for you!) then it's super easy to remote into Stanford's machines.

  1. Open up a terminal (in Ubuntu/Debian it's under Applications/Accessories).
  2. To log into Stanford's machine, just type 'ssh -Y your_sunet_id@myth.stanford.edu' (without the quotes and with your SUNet in the right spot).
  3. Type 'yes' if asked to accept a public key (hooray for encryption!) and type your SUNet password when prompted (don't worry if nothing shows up on the screen when you type your password).
  4. Your whole session should look something like this:

What to do with your shiny new X Terminal

Now, by whatever method, you've got a fully functional X enabled terminal in front of you. Here you can do all of the UNIX commands for moving around the computer and running programs.

  1. Type 'xcalc&' (with the & at the end) to open a simple calculator. The '&' at the end tells a program to run in the background. This is useful if you're running a graphical application as it gives you back control of the terminal after the application opens.
  2. The picture below illustrates how to open Emacs, a powerful but not entirely intuitive text editor for coding. To open a file named 'myfile.c' in emacs just enter the command 'emacs myfile.c&'.
  3. Emacs launched in this way looks something like this (depending on your OS).
  4. That's it! Look back on the main site for further documentation of Emacs and the bountiful joys of coding in UNIX!
基于开源大模型的教学实训智能体软件,帮助教师生成课前备课设计、课后检测问答,提升效率与效果,提供学生全时在线练习与指导,实现教学相长。 智能教学辅助系统 这是一个智能教学辅助系统的前端项目,基于 Vue3+TypeScript 开发,使用 Ant Design Vue 作为 UI 组件库。 功能模块 用户模块 登录/注册功能,支持学生和教师角色 毛玻璃效果的登录界面 教师模块 备课与设计:根据课程大纲自动设计教学内容 考核内容生成:自动生成多样化考核题目及参考答案 学情数据分析:自动化检测学生答案,提供数据分析 学生模块 在线学习助手:结合教学内容解答问题 实时练习评测助手:生成随练题目并纠错 管理模块 用户管理:管理员/教师/学生等用户基本管理 课件资源管理:按学科列表管理教师备课资源 大屏概览:使用统计、效率指数、学习效果等 技术栈 Vue3 TypeScript Pinia 状态管理 Ant Design Vue 组件库 Axios 请求库 ByteMD 编辑器 ECharts 图表库 Monaco 编辑器 双主题支持(专业科技风/暗黑风) 开发指南 # 安装依赖 npm install # 启动开发服务器 npm run dev # 构建生产版本 npm run build 简介 本项目旨在开发一个基于开源大模型的教学实训智能体软件,帮助教师生成课前备课设计、课后检测问答,提升效率与效果,提供学生全时在线练习与指导,实现教学相长。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值