This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| web:eclipse [2024/10/31 14:32] – [Settings] Bernard Condrau | web:eclipse [2026/01/29 13:31] (current) – [Setup] Bernard Condrau | ||
|---|---|---|---|
| Line 12: | Line 12: | ||
| < | < | ||
| + | ===== WSL Settings ===== | ||
| + | - To change the default setting of WSL (WSL1/WSL2) to allow file permissions on mounted Windows drives add the file '' | ||
| + | options=" | ||
| + | - Stop wsl from the Windows command line:< | ||
| + | - Start wsl from the Windows command line:< | ||
| + | - Check wsl instances from the Windows command line:< | ||
| + | |||
| + | ===== Install Eclipse IDE on WSL2 ===== | ||
| + | From the next chapter onwards this guide explains how to use Eclipse IDE under Windows. Installing Eclipse within Debian and running it from Windows through an X-Server has the huge advantage that the file permissions are maintained propberly. This chapter is taken from [[https:// | ||
| + | networkingMode=mirrored</ | ||
| + | ==== Setup ==== | ||
| + | [[https:// | ||
| + | |||
| + | Access WSL2 using putty | ||
| + | Run Eclipse on WSL2 Ubuntu, displaying the Eclipse UI on VcXsrv running on Windows | ||
| + | Connecting to VcXsrv directly from WSL2 | ||
| + | Using SSH X11 forwarding, with network connection initiated from Windows to WSL2 Ubuntu, which is particularly useful on company laptops that refuse all incoming network connections on Windows. | ||
| + | Prerequisites: | ||
| + | |||
| + | WSL2 up and running | ||
| + | Putty, Plink & PuttyGen installed on Windows | ||
| + | WSL2 Ubuntu: Install & configure OpenSSH | ||
| + | |||
| + | sudo apt install openssh-server | ||
| + | |||
| + | Edit / | ||
| + | |||
| + | X11Forwarding yes | ||
| + | X11DisplayOffset 10 | ||
| + | X11UseLocalhost no | ||
| + | sudo ssh-keygen -A | ||
| + | |||
| + | sudo service ssh start | ||
| + | |||
| + | Auto-start SSH daemon: | ||
| + | |||
| + | WSL2 Ubuntu: mkdir -p ~/bin ; echo "sudo service ssh start" >> ~/ | ||
| + | Windows: Create scheduled task that runs on user logon, running C: | ||
| + | Windows: Configure SSH public key authentication using PuttyGen: | ||
| + | |||
| + | See https:// | ||
| + | Run PuttyGen | ||
| + | Generate new key pair, or convert existing key pair | ||
| + | Save private key to ppk file; this will used later when connecting to WSL2 Ubuntu using Putty or PLink | ||
| + | Add the SSH public key to ~/ | ||
| + | Windows: Create putty profile to connect to WSL2 Ubuntu: | ||
| + | |||
| + | Session | ||
| + | Host Name: localhost | ||
| + | Port: 22 (or whatever OpenSSH port you configured on WSL2 Ubuntu) | ||
| + | Connection -> Data: | ||
| + | Auto-login username: <your user name> | ||
| + | Connection -> SSH -> Auth: | ||
| + | Private key file for authentication: | ||
| + | Connection -> SSH -> X11: | ||
| + | Enable X11 forwarding (if you want to start X11 programs) | ||
| + | X display location: 127.0.0.1: | ||
| + | Windows: Install & configure VcXsrv: | ||
| + | |||
| + | Download & install https:// | ||
| + | Copy config.xlaunch as shown below to the Startup folder (Win+R: shell: | ||
| + | Launch config.xlaunch to start the X Server manually for now | ||
| + | WSL2 Ubuntu: Install Eclipse & prerequisites: | ||
| + | |||
| + | sudo apt-get install openjdk-11-jdk | ||
| + | sudo apt-get install libgtk-3-0 | ||
| + | Download and unpack Eclipse for Linux to ~/eclipse | ||
| + | Windows: Eclipse shortcut using SSH X11 tunnel: | ||
| + | |||
| + | Manually try starting Eclipse from Windows by running the following command: | ||
| + | plink.exe -batch -X -i <path to .ppk from step #2> <Ubuntu username> | ||
| + | Copy silent.vbs and plink-silent.cmd (see attached files) to the directory where PLink.exe is installed | ||
| + | Create a new shortcut that runs the following command: | ||
| + | C: | ||
| + | Double-click the shortcut; if all is well you should see the Eclipse UI after a couple of seconds | ||
| + | Windows: Eclipse shortcut using direct XServer connection: | ||
| + | |||
| + | Add the following lines to ~/.profile on WSL2 Ubuntu (create file if it doesn' | ||
| + | export DISPLAY=:0 | ||
| + | export LIBGL_ALWAYS_INDIRECT=1 | ||
| + | Note that having these lines in .bashrc won't work as .bashrc is only loaded for interactive shells | ||
| + | Create a new shortcut that runs the following command: | ||
| + | C: | ||
| ===== LAMP with Xdebug ===== | ===== LAMP with Xdebug ===== | ||
| * Follow [[deb12: | * Follow [[deb12: | ||
| ===== Eclipse IDE ===== | ===== Eclipse IDE ===== | ||
| + | |||
| + | ==== PHP ==== | ||
| + | * Make sure '' | ||
| ==== Java ==== | ==== Java ==== | ||