Wednesday, 15 May 2013

Friday, 10 May 2013

Launch czt-ide from the Eclipse and Create a new project

1. After successful import and build of CZT in Ubuntu, we can launch the czt ide from the Eclipse.
  • Select the "net.sourceforge.czt.eclipse.repository" project, and right click the czt-ide.launch file, select the "Run As -> czt-ide"
  • An error about "-XstartOnFirstThread" is not a recognized option for java
  • Just open the Run configuration edit dialog and delete this option in the "Arguments -> VM Arguments"
  • Then launch again. Succeed.
2. Create a new project circus2bcsp
  • Create a new "Java Project" from the Eclipse
    • Input the name "Main" and Package "net.sourceforge.czt.circus2bcsp"
    • Copy the content of Main.java in z2b project and paste to Main.java in this project
  • There's some errors such as "import  net.sourceforge.czt.session.Filesource can be resolved"
  • Open the project properties of circus2bcsp, and go to the Project tab of Java Build Path, add the necessary projects to build together.
  • Then the error will be disappeared

Enable SSH X11Forwarding to access Ubuntu from the local Mac OS X

X11Forwarding config in ssh can enable the remote desktop access from the local client. This is a set up of access between Ubuntu server and local Mac Client.

1. Ubuntu Server
  • make sure the X11Forwarding option in /etc/ssh/sshd_config is set to yes. If not, set it to yes, and restart the sshd service by "sudo service ssh restart"
  • test X11Forwarding in server
    • Open a terminal in Ubuntu, and "ssh -v -X localhost" to establish the ssh connection with X11Forwarding. 
    • Check if there's a line with "Requesting X11 Forward" shown in the debug output
    • Check DISPLAY environment variables by "echo $DISPLAY" and it should be localhost:10.0
2. Mac OS X client
Reference: http://ruepprich.wordpress.com/2013/01/08/x11-forwarding-on-os-x-10-8-2-mountain-lion/
  •  Install  XQuarz for Mac OS
  • Open iTerm and add remote server to access list by "sudo xhost + 192.168.56.101"
    • There's an error about 'xhost: unable to open display ""' 
    • And ssh -X user@192.168.56.101 also failed to take X running
  • Open XQuarz, and open "Terminal" in Application Menu
    • bash-3.2$ xhost + 192.168.56.101
      192.168.56.101 being added to access control list
    • bash-3.2$ ssh -X rye@192.168.56.101
    • rye@rye-desktop:~$ echo $DISPLAY
      localhost:11.0
    • xclock works