All Projects → mviereck → runx

mviereck / runx

Licence: MIT license
Provide X server on MS Windows with cookie authentication.

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to runx

win-gpg-agent
[DEPRECATED] Windows helpers for GnuPG tools suite
Stars: ✭ 214 (+219.4%)
Mutual labels:  wsl, cygwin, msys2
WSL-Context-Menu-Manager
Manages the context menu for your Linux tools in WSL/WSL2 for Windows.
Stars: ✭ 25 (-62.69%)
Mutual labels:  wsl, wsl2
nix-config
NixOS configuration (also on WSL)
Stars: ✭ 51 (-23.88%)
Mutual labels:  wsl, wsl2
convey
Communication through a serial port or named pipe
Stars: ✭ 46 (-31.34%)
Mutual labels:  wsl, wsl2
WSLackware
Slackware for WSL!
Stars: ✭ 38 (-43.28%)
Mutual labels:  wsl, wsl2
proton wsl2
Proton Kernel for the Windows Subsystem for Linux 2 (WSL 2). Highly experimental and always at the mercy of Windows Update.
Stars: ✭ 23 (-65.67%)
Mutual labels:  wsl, wsl2
Tmux Yank
Tmux plugin for copying to system clipboard. Works on OSX, Linux and Cygwin.
Stars: ✭ 1,941 (+2797.01%)
Mutual labels:  wsl, cygwin
webi-installers
Primary and community-submitted packages for webinstall.dev
Stars: ✭ 421 (+528.36%)
Mutual labels:  wsl, wsl2
wsl-distrod
Distrod is a meta-distro for WSL 2 which installs Ubuntu, Arch, Debian, Gentoo, etc. with systemd in a minute for you. Distrod also has built-in auto-start feature on Windows startup and port forwarding ability.
Stars: ✭ 1,637 (+2343.28%)
Mutual labels:  wsl, wsl2
xpub
POSIX Shell script to get user's display environment variables of any TTY from anywhere.
Stars: ✭ 36 (-46.27%)
Mutual labels:  xauthority, x
dotfiles
Dotbot managed dotfiles for a polyglot dev using WSL. Includes PowerShell stuff for Windows Installation
Stars: ✭ 14 (-79.1%)
Mutual labels:  wsl, wsl2
dotfiles
Cross platform home directory settings
Stars: ✭ 17 (-74.63%)
Mutual labels:  wsl, wsl2
nvim-ghost.nvim
👻 GhostText plugin for Neovim with zero dependencies 🎉 Supports neovim running inside WSL too! 🥳 Windows/Linux/macOS supported out-of-the-box! 😄 (Other OSes need python3.6+ installed)
Stars: ✭ 32 (-52.24%)
Mutual labels:  wsl, wsl2
portabledevops
A portable devops tool set on windows, easy customization of cmder/console+msys2/cygwin/wsl
Stars: ✭ 53 (-20.9%)
Mutual labels:  wsl, cygwin
subsystemctl
Utility to run systemd in WSL2 with a Linux namespace
Stars: ✭ 313 (+367.16%)
Mutual labels:  wsl, wsl2
usbipd-win
Windows software for sharing locally connected USB devices to other machines, including Hyper-V guests and WSL 2.
Stars: ✭ 1,321 (+1871.64%)
Mutual labels:  wsl, wsl2
http
Basic HTTP primitives which can be shared by servers and clients.
Stars: ✭ 75 (+11.94%)
Mutual labels:  cookie
afl-cygwin
AFL "mostly" ported to cygwin
Stars: ✭ 24 (-64.18%)
Mutual labels:  cygwin
react-cookie-law
React Cookie Law is a cookie-info banner compliance with the GDPR and the EU cookie law. It allows the user to give consent in a granular way.
Stars: ✭ 103 (+53.73%)
Mutual labels:  cookie
macaroons-rs
Macaroons: bearer credentials with caveats for distributed authorization
Stars: ✭ 62 (-7.46%)
Mutual labels:  cookie

runx - Run Linux GUI applications on MS Windows

runx allows to easily run Linux GUI applications and desktops on MS Windows in Cygwin, MSYS2 or WSL.

  • This is especially of interest for WSL in Windows 10 that does not support graphical applications on itself.

Background:

  • runx starts an X server, either VcXsrv or XWin, to provide a graphical environment for Linux applications.
  • runx creates an authorization cookie to restrict access to the X server to allowed clients only.
  • runx runs the desired Linux GUI application with the credentials needed to access the X server.

For similar functionality on native Linux systems use x11docker with options --exe or --xonly.

Table of contents

Linux environments on MS Windows

runx can run in:

  • WSL: Windows subsystem for Linux.
  • Cygwin: Cygwin is a large collection of Open Source tools which provide functionality similar to a Linux distribution on Windows.
  • MSYS2: MSYS2 is a software distro and building platform for Windows and serves as a base for git for windows and MingW. It is mainly used by developers.

Installation

Installation in general:

  • Install an X server, VcXsrv or XWin.
  • Copy runx into folder /usr/local/bin and make it executeable with chmod +x /usr/local/bin/runx.
  • Install dependency xauth.

Installation of X server

runx needs an X server. Install on MS Windows one or both of:

  • VcXsrv to provide X server VcXsrv.
    • Easier to install than XWin.
  • Cygwin with packages xinit and xauth.
    • This provides X server XWin for Cygwin and WSL.
    • XWin has a better --gpu support than VcXsrv.

runx will automatically use XWin if available. You can specify the desired X server with options --xwin or --vcxsrv.

Installation in WSL

  • Run the following commands in WSL/Ubuntu terminal to install runx and its dependencies:
    sudo wget https://raw.githubusercontent.com/mviereck/runx/master/runx -O /usr/local/bin/runx
    sudo chmod +x /usr/local/bin/runx
    sudo apt update
    sudo apt install xauth
    

Installation in Cygwin

  • Run the Cygwin installer and install packages xinit, xauth and wget.
  • In Cygwin terminal run the commands:
    wget https://raw.githubusercontent.com/mviereck/runx/master/runx -O /usr/local/bin/runx
    chmod +x /usr/local/bin/runx
    

Installation in MSYS2

  • In MSYS2 terminal run the commands:
    mkdir /usr/local/bin
    wget https://raw.githubusercontent.com/mviereck/runx/master/runx -O /usr/local/bin/runx
    chmod +x /usr/local/bin/runx
    
  • Constraints in MSYS2:
    • MSYS2 does not provide xauth to create authentication cookies to restrict access to the X server. For that reason, using runix in MSYS2 is possible, but discouraged. You need option --no-auth.
    • In MSYS2 runx only supports X server VcXsrv, but not XWin.

GPU hardware acceleration

runx supports GPU hardware accelerated graphics with option --gpu.

  • GPU access can cause issues with X server VcXsrv, especially with NVIDIA cards. For that reason GPU usage is disabled by default in runx.
  • If you encounter issues with option --gpu, try X server XWin instead of VcXsrv.

Usage examples

  • File manager pcmanfm in WSL:
    • Installation:
      sudo apt update
      sudo apt install pcmanfm
      
    • Run:
      runx -- pcmanfm
      
  • Mate desktop environment in WSL:
    • Installation:
      sudo apt update
      sudo apt install mate-desktop-environment
      
    • Run:
      runx --desktop --gpu -- mate-session
      

Providing X server in background

You can make an entry in the file ~/.bashrc to have an X server always available. Possible entry in ~/.bashrc:

source /usr/local/bin/runx

In future runs of the terminal you can directly run Linux GUI applications, e.g.:

pcmanfm

Output of runx --help

runx - Run Linux GUI applications on MS Windows.
Provides an X server on MS Windows in Cygwin, MSYS2 or WSL.

Syntax:
  runx [OPTIONS]  --  [COMMAND]

Options:
  -h, --help                   Show this help.
  -d, --desktop                Open a parent window for desktop environments.
  -g, --gpu                    Enable GPU hardware acceleration. Can fail 
                               with NVIDIA cards. Works best with XWin.
      --size WIDTHxHEIGHT      Window size for option --desktop, e.g. 800x600.
      --vcxsrv                 Use X server VcXsrv.
      --xwin                   Use X server XWin.
      --clipboard [=yes|no]    Enable clipboard sharing yes/no. Default: yes.
      --display N              Use display number N for new X server.
                               Default: random number in range of 100...3376.
      --no-auth                Disable X cookie authentication. Discouraged.
      --cleanup                Stop all X servers and delete cookies.
  -v, --verbose                Be verbose.

Installation of runx in WSL:
 - Copy runx into /usr/local/bin/
 - Make runx executeable:        sudo chmod +x /usr/local/bin/runx
 - Install xauth:                sudo apt update
                                 sudo apt install xauth
 
Install an X server on Windows:
  runx supports two X servers: VcXsrv and XWin. Install at least one of them.
   - VcXsrv: Download and install from: 
       https://sourceforge.net/projects/vcxsrv/
   - XWin: Download and install Cygwin64 with packages: xinit xauth
       https://www.cygwin.com
VcXsrv is easier to install. XWin provides a better GPU support.

WSL, Cygwin:       runx starts XWin if available, otherwise it starts VcXsrv.
MSYS2 constraints: runx only supports VcXsrv without cookie authentication.

Usage:

Example to directly run an application with runx:
 - Install file manager pcmanfm: sudo apt update
                                 sudo apt install pcmanfm
 - Run pcmanfm with:             runx -- pcmanfm

Example to run Mate desktop:
 - Install Mate desktop with:    sudo apt install mate-desktop-environment
 - Run Mate desktop with:        runx --desktop -- mate-session
 
Example to get a Wayland environment:
 - Install Wayland compositor:   sudo apt install weston
 - Run Weston with:              XDG_RUNTIME_DIR=/tmp  runx -- weston

Providing an X server in background all the time:
 - Create an entry in ~/.bashrc: source /usr/local/bin/runx
 - In future terminal session you can directly run GUI commands.
   E.g. just type:  'pcmanfm'  instead of 'runx -- pcmanfm'.

Screenshot

runx running Mate desktop on MS Windows: Mate Desktop on MS Windows

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].