Skip to content
Snippets Groups Projects
Commit f7a464c6 authored by Michael Blaschek's avatar Michael Blaschek :bicyclist:
Browse files

Add WinApps configuration and setup instructions for IMGW

parent 17495979
Branches
Tags
No related merge requests found
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
# Adapted Version of Winapps to IMGW @UNIVIE # Adapted Version of Winapps to IMGW @UNIVIE
**Be warned this does not work well on Laptop with too little Memory. 4GB for Windows is required.**
Run Windows applications (including [Microsoft 365](https://www.microsoft365.com/) and [Adobe Creative Cloud](https://www.adobe.com/creativecloud.html)) on GNU/Linux with `KDE Plasma`, `GNOME` or `XFCE`, integrated seamlessly as if they were native to the OS. Run Windows applications (including [Microsoft 365](https://www.microsoft365.com/) and [Adobe Creative Cloud](https://www.adobe.com/creativecloud.html)) on GNU/Linux with `KDE Plasma`, `GNOME` or `XFCE`, integrated seamlessly as if they were native to the OS.
...@@ -280,12 +281,16 @@ Contributing to the list of supported applications is encouraged through submiss ...@@ -280,12 +281,16 @@ Contributing to the list of supported applications is encouraged through submiss
### IMGW setup ### IMGW setup
Please folow these steps to make it work: Please follow these steps to make it work:
1. install podman and podman compose for the Virtualization of Windows 1. install podman and podman compose for the Virtualization of Windows
2. Download preconfigured windows+office image 2. Download preconfigured windows+office image (IMGW only)
3. install winapps on your computer 3. install winapps on your computer
It is necessary to install podman on your system. It is necessary to install a container manager (here: podman) on your system. The advantage is that we can use these containers as user, not root required.
The example here gives commands for Ubuntu, other distributions should work as well.
```sh ```sh
# install podman and its dependencies # install podman and its dependencies
# maybe find information here: https://podman.io/docs/installation # maybe find information here: https://podman.io/docs/installation
...@@ -293,6 +298,8 @@ It is necessary to install podman on your system. ...@@ -293,6 +298,8 @@ It is necessary to install podman on your system.
# for ubuntu: # for ubuntu:
sudo apt-get install podman slirp4netns sudo apt-get install podman slirp4netns
# install dependencies for winapps (or see below for other distros) # install dependencies for winapps (or see below for other distros)
# if you can not install freerdp3 then use the flatpak version (see below)
sudo apt-get install dialog freerdp3-x11 iproute2 libnotify-bin netcat-openbsd sudo apt-get install dialog freerdp3-x11 iproute2 libnotify-bin netcat-openbsd
# install podman compose script # install podman compose script
pip3 install --user podman-compose pip3 install --user podman-compose
...@@ -337,12 +344,33 @@ X/Twitter: @Podman_io ...@@ -337,12 +344,33 @@ X/Twitter: @Podman_io
Mastodon: @Podman_io@fosstodon.org Mastodon: @Podman_io@fosstodon.org
``` ```
now you are ready to download the specific windows and office image now you are ready to download the specific windows and office image. Open a terminal and run the following commands.
```sh
# get the bootstrap script and execute
curl -o bootstrap_winapps.sh http://fileserverup.devx1.img.univie.ac.at/bootstrap_winapps.sh
# execute the script using bash in a terminal
bash bootstrap_winapps.sh
# this will do a lot.
```
now you should be finished. There should be a few new apps on your desktop:
![](icons/winapps-desktop.png)
1. WinApps
2. Windows
3. Excel
4. Word
5. Powerpoint
6. Explorer
7. Publisher
The WinApps desktop application is just a wrapper for you to start up and shutdown the windows virtual machine. So what WinApps does, is to launch a VM inside a container and allow forwarding a virtual desktop for just the applications (e.g. Word, ...). They will seem native.
### Normal Setup
### Step 1: Configure a Windows VM #### Step 1: Configure a Windows VM
Both `Docker` and `Podman` are recommended backends for running the Windows virtual machine, as they facilitate an automated Windows installation process. WinApps is also compatible with `libvirt`. While this method requires considerably more manual configuration, it also provides greater virtual machine customisation options. All three methods leverage the `KVM` hypervisor, ensuring excellent virtual machine performance. Ultimately, the choice of backend depends on your specific use case. Both `Docker` and `Podman` are recommended backends for running the Windows virtual machine, as they facilitate an automated Windows installation process. WinApps is also compatible with `libvirt`. While this method requires considerably more manual configuration, it also provides greater virtual machine customisation options. All three methods leverage the `KVM` hypervisor, ensuring excellent virtual machine performance. Ultimately, the choice of backend depends on your specific use case.
The following guides are available: The following guides are available:
...@@ -351,7 +379,7 @@ The following guides are available: ...@@ -351,7 +379,7 @@ The following guides are available:
If you already have a Windows VM or server you wish to use with WinApps, you will need to merge `install/RDPApps.reg` into the Windows Registry manually. If you already have a Windows VM or server you wish to use with WinApps, you will need to merge `install/RDPApps.reg` into the Windows Registry manually.
### Step 2: Install Dependencies #### Step 2: Install Dependencies
Install the required dependencies. Install the required dependencies.
- Debian/Ubuntu: - Debian/Ubuntu:
```bash ```bash
...@@ -378,7 +406,7 @@ Install the required dependencies. ...@@ -378,7 +406,7 @@ Install the required dependencies.
> ``` > ```
> However, if you have weird issues like [#233](https://github.com/winapps-org/winapps/issues/233) when running Flatpak, please compile FreeRDP from source according to [this guide](https://github.com/FreeRDP/FreeRDP/wiki/Compilation). > However, if you have weird issues like [#233](https://github.com/winapps-org/winapps/issues/233) when running Flatpak, please compile FreeRDP from source according to [this guide](https://github.com/FreeRDP/FreeRDP/wiki/Compilation).
### Step 3: Create a WinApps Configuration File #### Step 3: Create a WinApps Configuration File
Create a configuration file at `~/.config/winapps/winapps.conf` containing the following: Create a configuration file at `~/.config/winapps/winapps.conf` containing the following:
```bash ```bash
################################## ##################################
...@@ -488,7 +516,7 @@ FREERDP_COMMAND="" ...@@ -488,7 +516,7 @@ FREERDP_COMMAND=""
> [!NOTE] > [!NOTE]
> If you wish to use an alternative WinApps backend (other than `Docker`), uncomment and change `WAFLAVOR="docker"` to `WAFLAVOR="podman"` or `WAFLAVOR="libvirt"`. > If you wish to use an alternative WinApps backend (other than `Docker`), uncomment and change `WAFLAVOR="docker"` to `WAFLAVOR="podman"` or `WAFLAVOR="libvirt"`.
#### Configuration Options Explained ##### Configuration Options Explained
- If using a pre-existing Windows RDP server on your LAN, you must use `RDP_IP` to specify the location of the Windows server. You may also wish to configure a static IP address for this server. - If using a pre-existing Windows RDP server on your LAN, you must use `RDP_IP` to specify the location of the Windows server. You may also wish to configure a static IP address for this server.
- If running a Windows VM using `libvirt` with NAT enabled, leave `RDP_IP` commented out and WinApps will auto-detect the local IP address for the VM. - If running a Windows VM using `libvirt` with NAT enabled, leave `RDP_IP` commented out and WinApps will auto-detect the local IP address for the VM.
- For domain users, you can uncomment and change `RDP_DOMAIN`. - For domain users, you can uncomment and change `RDP_DOMAIN`.
...@@ -498,7 +526,7 @@ FREERDP_COMMAND="" ...@@ -498,7 +526,7 @@ FREERDP_COMMAND=""
- If you enable `DEBUG`, a log will be created on each application start in `~/.local/share/winapps/winapps.log`. - If you enable `DEBUG`, a log will be created on each application start in `~/.local/share/winapps/winapps.log`.
- If using a system on which the FreeRDP command is not `xfreerdp` or `xfreerdp3`, the correct command can be specified using `FREERDP_COMMAND`. - If using a system on which the FreeRDP command is not `xfreerdp` or `xfreerdp3`, the correct command can be specified using `FREERDP_COMMAND`.
### Step 4: Run the WinApps Installer #### Step 4: Run the WinApps Installer
Run the WinApps installer. Run the WinApps installer.
```bash ```bash
bash <(curl https://gitlab.phaidra.org/imgw/winapps/-/raw/main/setup.sh) bash <(curl https://gitlab.phaidra.org/imgw/winapps/-/raw/main/setup.sh)
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
# For documentation, FAQ, additional configuration options and technical help, visit: https://github.com/dockur/windows # For documentation, FAQ, additional configuration options and technical help, visit: https://github.com/dockur/windows
# Modified for IMGW
name: "winapps" # Docker Compose Project Name. name: "winapps" # Docker Compose Project Name.
volumes: volumes:
# Create Volume 'data'. # Create Volume 'data'.
...@@ -46,3 +48,8 @@ services: ...@@ -46,3 +48,8 @@ services:
- /dev/kvm # Enable KVM. - /dev/kvm # Enable KVM.
#- /dev/sdX:/disk1 # Uncomment to mount a disk directly within the Windows VM (Note: 'disk1' will be mounted as the main drive). #- /dev/sdX:/disk1 # Uncomment to mount a disk directly within the Windows VM (Note: 'disk1' will be mounted as the main drive).
#- /dev/sdY:/disk2 # Uncomment to mount a disk directly within the Windows VM (Note: 'disk2' and higher will be mounted as secondary drives). #- /dev/sdY:/disk2 # Uncomment to mount a disk directly within the Windows VM (Note: 'disk2' and higher will be mounted as secondary drives).
#annotations:
# Maybe this allows the container to be correctly shutdown.
#org.systemd.property.KillMode: "none"
#org.systemd.property.TimeoutStopSec: 420
icons/winapps-desktop.png

32.5 KiB

...@@ -1294,6 +1294,62 @@ Comment=Microsoft Windows RDP Session" ...@@ -1294,6 +1294,62 @@ Comment=Microsoft Windows RDP Session"
echo -e "${DONE_TEXT}Done!${CLEAR_TEXT}" echo -e "${DONE_TEXT}Done!${CLEAR_TEXT}"
} }
# Name: 'waConfigureWinApps'
# Role: Create an application entry for launching the WinApps container
function waConfigureWinApps() {
# Print feedback.
echo -n "Creating an application entry for WinApps... "
# Declare variables.
local WIN_DESKTOP="" # Stores the '.desktop' file to launch a Windows RDP session.
local WIN_BASH="" # Stores the bash script to launch a Windows RDP session.
# Determine the compose command.
case "$WAFLAVOR" in
"docker") COMPOSE_COMMAND="docker compose" ;;
"podman") COMPOSE_COMMAND="podman-compose" ;;
esac
WIN_BASH="\
#!/usr/bin/env bash
if ${WAFAVOR} ps | grep -q 'WinApps'; then
read -p 'WinApps is running. Would you like to stop it? [y/N] ' -r
if [[ \$REPLY =~ ^[Yy]\$ ]]; then
echo 'Stopping WinApps...this might take a bit (up 2min)'
${COMPOSE_COMMAND} --file ${SOURCE_PATH}/compose.yaml down
fi
else
echo 'Launching WinApps...'
${COMPOSE_COMMAND} --file ${SOURCE_PATH}/compose.yaml up -d
fi"
# Populate variables.
WIN_DESKTOP="\
[Desktop Entry]
Name=WinApps
Exec=${BIN_PATH}/winapps-container
Terminal=false
Type=Application
Icon=${APPDATA_PATH}/icons/winapps.svg
StartupWMClass=Microsoft Windows
Comment=Microsoft Windows RDP Session"
# Copy the 'Windows' icon.
$SUDO cp "./icons/winapps.svg" "${APPDATA_PATH}/icons/winapps.svg"
# Write the desktop entry content to a file.
echo "$WIN_DESKTOP" | $SUDO tee "${APP_PATH}/winapps.desktop" &>/dev/null
# Write the bash script to a file.
echo "$WIN_BASH" | $SUDO tee "${BIN_PATH}/winapps-container" &>/dev/null
# Mark the bash script as executable.
$SUDO chmod a+x "${BIN_PATH}/winapps-container"
# Print feedback.
echo -e "${DONE_TEXT}Done!${CLEAR_TEXT}"
}
# Name: 'waConfigureApp' # Name: 'waConfigureApp'
# Role: Create application entries for a given application installed on Windows. # Role: Create application entries for a given application installed on Windows.
function waConfigureApp() { function waConfigureApp() {
...@@ -1659,6 +1715,7 @@ function waInstall() { ...@@ -1659,6 +1715,7 @@ function waInstall() {
# Configure the Windows RDP session application launcher. # Configure the Windows RDP session application launcher.
waConfigureWindows waConfigureWindows
waConfigureWinApps
if [ "$OPT_AOSA" -eq 1 ]; then if [ "$OPT_AOSA" -eq 1 ]; then
# Automatically configure all officially supported applications. # Automatically configure all officially supported applications.
...@@ -1707,7 +1764,7 @@ function waUninstall() { ...@@ -1707,7 +1764,7 @@ function waUninstall() {
# Remove the 'WinApps' bash scripts. # Remove the 'WinApps' bash scripts.
$SUDO rm -f "${BIN_PATH}/winapps" $SUDO rm -f "${BIN_PATH}/winapps"
$SUDO rm -f "${BIN_PATH}/winapps-setup" # $SUDO rm -f "${BIN_PATH}/winapps-setup"
# Remove WinApps configuration data, temporary files and logs. # Remove WinApps configuration data, temporary files and logs.
rm -rf "$USER_APPDATA_PATH" rm -rf "$USER_APPDATA_PATH"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment