How to install and config X11 on Mac
2015-09-19 09:36
507 查看
First go to https://xquartz.macosforge.org/trac to get the release version of X11. After you finish the installment, you should do the following steps to config your X11 on your Mac.
Launch the Terminal application (found in your Utilities folder).
Start by making a copy of the
SSH daemon.
The
Edit the original file we just made a backup copy of using your preferred text editor. Be sure to use a plain text editor such as
BBEdit, pico or vi in order to preserve the integrity of the file. In this case, using pico.
The contents of the
The final line should look like:
make sure you have seen this:X11Forwarding yes in your termal.
grep X11Forwarding /etc/sshd_config
Open X11 in your Utilities folder. A window that looks deceptively like the Terminal will open.
In the new xterm window, use the following command to remotely login to a second computer (Mac OS X, Linux or other *nix):
Type
Launch the Terminal application (found in your Utilities folder).
Start by making a copy of the
/etc/sshd_configfile which is the configuration file for the
SSH daemon.
sudo cp /etc/sshd_config sshd_config.orig
The
sudocommand will allow you to execute the
cp(copy) command with root permissions giving you full read/write access to the filesystem. You will need an administrator password. Enter it when prompted.
Edit the original file we just made a backup copy of using your preferred text editor. Be sure to use a plain text editor such as
BBEdit, pico or vi in order to preserve the integrity of the file. In this case, using pico.
sudo vi /etc/sshd_config
The contents of the
sshd_configfile should now be visible in your Terminal window. Locate that line that reads
#X11Forwarding noand change it to remove the octothorp character at the beginning of the line to activate it. We also need to change the line to replace
nowith
yes.
The final line should look like:
X11Forwarding yes
You can check if the step 4 with the command:
grep X11Forwarding /etc/sshd_config
make sure you have seen this:X11Forwarding yes in your termal.
grep X11Forwarding /etc/sshd_config
Connecting To Remote Servers
Now that we have X11 configured, if you have a second computer available you can test a remote connection.Open X11 in your Utilities folder. A window that looks deceptively like the Terminal will open.
In the new xterm window, use the following command to remotely login to a second computer (Mac OS X, Linux or other *nix):
ssh -X [USERNAME]@[IPADDRESS].
Type
exitin the xterm window when you are done. This will disconnect you from the remote server.
相关文章推荐
- 【CS学习】——《软件工程》总结
- 用POI读取Excel表格中的值并存储为TXT文件
- 计算机网络之IP协议族
- 计算机网络之IP地址
- Android基础复习之基本控件
- 计算机网络之IP地址
- 计算机网络之IP协议族
- C语言中的参数传递
- Linux系统EXT文件系统
- POJ - 3009 Curling 2.0(DFS,模拟)
- UVA - 10905 Children's Game
- Ubuntu 11.10 (Oneiric)上编译带utrace补丁的内核 转
- SAP R3 BASIS 教程系列 SAP中文包的安装
- java类名问题
- 黑马程序员——ios开发基础之OC中Foundation框架(二)、copy以及单例
- Java基础知识强化26:Object类之hashCode()方法、getClass()方法
- 进程/线程同步的方式和机制,进程间通信
- 注意:编程中的一个注意事项!!不能以Con命名类
- 转发与重定向的区别
- 由浅入深探究mysql索引结构原理、性能分析与优化