- Run Linux GUI apps on the Windows Subsystem for Linux (preview)
- Install support for Linux GUI apps
- Prerequisites
- Fresh install — No prior WSL installation
- Existing WSL install
- Run Linux GUI apps
- Update the packages in your distribution
- Install Gedit
- Install GIMP
- Install Nautilus
- Install VLC
- Install X11 apps
- Install Google Chrome for Linux
- Install Microsoft Teams for Linux
- Install Microsoft Edge browser for Linux
- How to Install a Desktop (GUI) on an Ubuntu Server
- Update Repositories and Packages
- Select a Display Manager
- Choose a GUI for Your Server
- GNOME
- KDE Plasma
- Mate Core Server Desktop
- Lubuntu Core Server Desktop
- Xubuntu Server Core Desktop
- Xfce Desktop
- Switching Between GUIs
- Как в Linux запустить приложение с GUI из консоли?
Run Linux GUI apps on the Windows Subsystem for Linux (preview)
You can now preview Windows Subsystem for Linux (WSL) support for running Linux GUI applications (X11 and Wayland) on Windows in a fully integrated desktop experience.
WSL 2 enables Linux GUI applications to feel native and natural to use on Windows.
- Launch Linux apps from the Windows Start menu
- Pin Linux apps to the Windows task bar
- Use alt-tab to switch between Linux and Windows apps
- Cut + Paste across Windows and Linux apps
You can now integrate both Windows and Linux applications into your workflow for a seamless desktop experience.
Install support for Linux GUI apps
Prerequisites
You will need to be on Windows 11 Build 22000 or higher to access this feature. You can join the Windows Insiders Program to get the latest preview builds.
Installed driver for vGPU
To run Linux GUI apps, you should first install the preview driver matching your system below. This will enable you to use a virtual GPU (vGPU) so you can benefit from hardware accelerated OpenGL rendering.
Fresh install — No prior WSL installation
If you have not already done so, install WSL and set up a user name and password for your Linux distribution.
Open a command prompt with administrator privileges.
Select Start, type PowerShell, right-click Windows PowerShell, and then select Run as administrator.
Run this command and reboot your machine when prompted:
Once your machine has finished rebooting, installation will continue and you will be asked to enter a username and password. This will be your Linux credential for the Ubuntu distribution.
You’re now ready to begin using Linux GUI apps on WSL!
Existing WSL install
If you already have WSL installed on your machine, you can update to the latest version that includes Linux GUI support by running the update command from an elevated command prompt.
Select Start, type PowerShell, right-click Windows PowerShell, and then select Run as administrator.
Enter the WSL update command:
You will need to restart WSL for the update to take effect. You can restart WSL by running the shutdown command in PowerShell.
Linux GUI apps are only supported with WSL 2 and will not work with a Linux distribution configured for WSL 1. Read about how to change your distribution from WSL 1 to WSL 2.
Run Linux GUI apps
You can run the following commands from your Linux terminal to download and install these popular Linux applications. If you are using a different distribution than Ubuntu, it may use a different package manager than apt. Once the Linux application is installed, you can find it in your Start menu under the distribution name. For example: Ubuntu -> Microsoft Edge .
Update the packages in your distribution
Install Gedit
Gedit is the default text editor of the GNOME desktop environment.
To launch your bashrc file in the editor, enter: gedit
Install GIMP
GIMP is a free and open-source raster graphics editor used for image manipulation and image editing, free-form drawing, transcoding between different image file formats, and more specialized tasks.
To launch, enter: gimp
Install Nautilus
Nautilus, also known as GNOME Files, is the file manager for the GNOME desktop. (Similiar to Windows File Explorer).
To launch, enter: nautilus
Install VLC
VLC is a free and open source cross-platform multimedia player and framework that plays most multimedia files.
To launch, enter: vlc
Install X11 apps
X11 is the Linux windowing system and this is a miscellaneous collection of apps and tools that ship with it, such as the xclock, xcalc calculator, xclipboard for cut and paste, xev for event testing, etc. See the x.org docs for more info.
To launch, enter the name of the tool you would like to use. For example:
Install Google Chrome for Linux
To install the Google Chrome for Linux:
- Change directories into the temp folder: cd /tmp
- Use wget to download it: sudo wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- Get the current stable version: sudo dpkg -i google-chrome-stable_current_amd64.deb
- Fix the package: sudo apt install —fix-broken -y
- Configure the package: sudo dpkg -i google-chrome-stable_current_amd64.deb
To launch, enter: google-chrome
Install Microsoft Teams for Linux
To install Microsoft Teams for Linux:
- Change directories into the temp folder: cd /tmp
- Use curl to download the package: sudo curl -L -o «./teams.deb» «https://teams.microsoft.com/downloads/desktopurl?env=production&plat=linux&arch=x64&download=true&linuxArchiveType=deb»
- Use apt to install it: sudo apt install ./teams.deb -y
To launch, enter: teams
Install Microsoft Edge browser for Linux
Find information on how to install the Microsoft Edge browser for Linux using the command line on the Edge Insider site. Select Get instructions under the Command line installation section of the page.
Источник
How to Install a Desktop (GUI) on an Ubuntu Server
Home » SysAdmin » How to Install a Desktop (GUI) on an Ubuntu Server
Want to add a desktop environment after you install Ubuntu Server? It can be easily installed.
By default, Ubuntu Server does not include a Graphical User Interface (GUI). A GUI takes up system resources (memory and processor) that are used for server-oriented tasks. However, certain tasks and applications are more manageable and work better in a GUI environment.
This guide will show you how to install a desktop (GUI) graphical interface on your Ubuntu server.
- A server running Ubuntu Linux Server
- Access to a user account with sudo or root privileges
- The apt-get package manager, included by default
Update Repositories and Packages
Start by updating the repositories and package lists:
Press Y and hit Enter when asked if you want to continue.
This ensures you are working with the most recent software updates.
Next, install the tasksel manager utility:
Now it is time to install a desktop environment.
Note: Tasksel is a utility for installing multiple related packages at once. See the documentation for more details.
Select a Display Manager
A display manager is an application that starts the display server, launches the desktop, and manages user authentication. The default GDM3 (used with KDE-Plasma) is a resource-intensive display manager. If you need to conserve system resources, consider a lighter display manager, like SDDM, SLiM, or LightDM.
By default, only one display manager can manage a server. They can run simultaneously only if configured to manage different servers. This article assumes that you will be using a single default display manager.
To install a specific display manager, use the apt-get package manager:
To install SLiM:
To install LightDM:
The SDDM display manager can be installed from the tasksel menu during the KDE installation.
Choose a GUI for Your Server
GNOME is the default GUI for most Ubuntu installations and is (loosely) based on the Apple ecosystem.
KDE is another popular GUI, (loosely) based on the Microsoft ecosystem. If you want to have the look and feel of a regular Ubuntu system, choose one of these desktop environments.
GNOME
To install GNOME, start by launching tasksel:
A colorful interface will launch. Use the arrow key to scroll down the list and find Ubuntu desktop.
Use the Space key to select it, press Tab to select OK at the bottom, then press Enter .
The system will install the software and reboot, giving you a graphical login screen generated by your default display manager. In our case, it’s SLiM.
Enter your login credentials. Use F1 to switch between GUIs if you have multiple interfaces installed.
Below is a typical GNOME UI environment.
Note: If you are running Arch Linux, learn how to install and customize GNOME on Arch Linux.
KDE Plasma
To install KDE Plasma, use the following Linux command:
You may be prompted during the installation to select a default display manager. Use the arrow keys to make a selection, then press Enter .
Launch KDE Plasma with the command:
Instead of display_manager , type the name of the display manager you have installed (e.g., SLiM, lightDM, SDDM). Enter your credentials and log in.
Note: These traditional Ubuntu Server GUI applications require substantial system resources. They may impact the functionality of your server. If you need to maximize your server resources, consider one of the lighter GUI applications listed below.
Mate Core Server Desktop
Mate is a popular and lightweight graphical interface. Install it by executing the following command:
Wait for tasksel to complete the action. Once complete, launch the desktop interface with the command:
Instead of display_manager , type the name of the display manager you have installed (e.g., SLiM, lightDM, SDDM). You’ll be prompted to log in.
To exit the GUI, open the command line and enter:
Note: You may need to press Ctrl-Alt-F1 to get back to the server’s command line interface. Also note, this process automatically installs and uses the lightdm display manager.
Lubuntu Core Server Desktop
Lubuntu is a very lightweight GUI. Use this application if you need a graphical interface, but want to minimize the impact on system memory and processor.
To install Lubuntu, enter the following:
Alternately, you can install from the tasksel menu with the command:
Use the arrow keys to highlight the Lubuntu GUI you want to use. Press the Space bar to select, then Tab to the OK button and press Enter .
Launch the GUI with:
Exit the GUI by opening a terminal window and entering the following:
Xubuntu Server Core Desktop
Xubuntu is a derivative of Ubuntu that uses the Xfce desktop environment.
Install Xubuntu by entering the following:
Launch it by entering:
Xfce Desktop
The Xfce desktop environment can be used by itself. It’s designed to be responsive, lightweight and user-friendly.
Install Xfce with the following:
Launch Xfce by entering:
Note: The Xfce GUI is compatible with the SLiM display manager only.
Switching Between GUIs
If you have several GUIs installed you can select which one to use. Once you start your display manager, you will be prompted to log in. However, that screen also allows you to pick which GUI you want to enable.
The image above represents SLiM’s login screen. Switch between GUIs by pressing F1. The interface will toggle between sessions (or GUIs). Log in once you toggle to the GUI of your choice.
There are many GUI desktops available for Ubuntu Server. Most can be installed using the apt-get package manager or the tasksel tool, as detailed in this guide.
If you’ve worked extensively with conventional operating systems, it can be challenging to have to work in a command-line interface. Fortunately, Ubuntu – like many Linux systems – is open-source, thus there are many GUIs available.
Источник
Как в Linux запустить приложение с GUI из консоли?
Можно, но надо знать как устроен обчный linux.
startx запускает X11, который запускает оконный менеджер,из которого запускают приложения.
Если хочется сделать, чтобы работало одно приложения и ничего другого запустить было нельзя, то в самом простом варианте надо вместо оконного менеджера запустить нужное приложение, но.
Если приложение открывает дополнительные окна, то будет очень неудобно с ним работать.
Или же выбрать из множества оконных менеджеров подходящий и настроить его на автоматический запуск и перезапуск одного приложения. Ну и надо не забыть про механизм выключения компа, это тоже надо повесить на какие-нибудь кнопки.
Вообще это называется «режим киоска».
Я как-то не могу придумать пример приложения, которое нельзя запустить в режиме киоска.
Забыл отметить, что приложения для киоска надо писать достаточно аккуратно, чтобы оно не вызывало какие угодно системные приложения, вроде xterm или другие, дающие доступ к командной строке, иначе такой киоск быстро взломают.
Я обычно пишу приложение на Tcl/Tk, в качестве оконного менеджера использую xmonad со своей конфигурацией. В приложение обязательно добавляю функцию «Выход» (приложение управляет аппаратурой, которая может сбойнуть, так что надо иметь возможность перезапустить приложение для чистоты проверки сбоя). Оконный менеджер перезапускает приложение, в случае, если оно вышло и умеет по комбинации кнопок запускать «sudo poweroff». Если нет клавиатуры, то функцию выключения питания добавляю в меню программы рядом с функцей «Выход».
Рекомендую также запускать вместе с программой какую-нибудь панельку (например, xmobar), на которой отображать время, статус сети и загрузку процессора — это позволяет определить, в случае необходимости, что зависла программа и почему (например, нагрузка на процессор).
Источник