From d0ad98ff2beb8ebc2b2edf517af7ea219f2e328e Mon Sep 17 00:00:00 2001 From: medusa Date: Sun, 31 Mar 2024 19:30:44 +0000 Subject: [PATCH] Update docs/tech_docs/linux/remote_linux.md --- docs/tech_docs/linux/remote_linux.md | 163 +++++++++++++++++++-------- 1 file changed, 114 insertions(+), 49 deletions(-) diff --git a/docs/tech_docs/linux/remote_linux.md b/docs/tech_docs/linux/remote_linux.md index 4555aa8..8933f90 100644 --- a/docs/tech_docs/linux/remote_linux.md +++ b/docs/tech_docs/linux/remote_linux.md @@ -1,8 +1,21 @@ -## QT Version with LXQT +After reviewing the entire conversation and considering the goal of providing a streamlined system setup with essential power tools for productivity and development work using Vim with Python, here's the final guide: -1. Start with a minimal Debian or Ubuntu installation. +# Lightweight Desktop Environment Setup Guide for VDI -2. Add the Wezterm APT repository and install Wezterm: +This guide provides instructions for setting up a lightweight desktop environment for VDI (Virtual Desktop Infrastructure) using either the Qt-based LXQT or the GTK+-based XFCE. The guide also covers the configuration of PulseAudio for optimal audio performance and includes essential tools for productivity and development work. + +## Prerequisites + +- A minimal Debian or Ubuntu installation +- Ensure that the system is updated and upgraded to the latest packages: + +```bash +sudo apt update && sudo apt upgrade -y +``` + +## Common Steps + +1. Add the Wezterm APT repository and install Wezterm: ```bash curl -fsSL https://apt.fury.io/wez/gpg.key | sudo gpg --yes --dearmor -o /usr/share/keyrings/wezterm-fury.gpg @@ -10,76 +23,128 @@ echo 'deb [signed-by=/usr/share/keyrings/wezterm-fury.gpg] https://apt.fury.io/w sudo apt update && sudo apt install wezterm -y ``` -3. Configure Wezterm by creating a `.wezterm.lua` file in your home directory with the desired configuration. +2. Configure Wezterm by creating a `.wezterm.lua` file in your home directory with the desired configuration. Refer to the Wezterm documentation for configuration options and examples. -4. Install the core LXQT components, essential tools, power user tools, and development packages: +3. Install essential tools, power tools, and development tools: ```bash -sudo apt install lxqt-core lxqt-config openbox pcmanfm-qt qterminal featherpad falkon tint2 sddm xscreensaver x2goserver x2goserver-xsession git curl htop neofetch screenfetch scrot unzip p7zip-full policykit-1 ranger mousepad firefox libreoffice qpdfview lximage-qt mpv vlc xarchiver qps screengrab keepassxc geany retext gimp pandoc tmux xfce4-power-manager pavucontrol rofi build-essential cmake pkg-config gdb python3 python3-pip python3-venv python3-dev openssh-server libssl-dev libffi-dev rsync -y +sudo apt install x2goserver x2goserver-xsession git wget curl htop neofetch screenfetch scrot unzip p7zip-full policykit-1 ranger mousepad firefox libreoffice mpv vlc xarchiver keepassxc geany retext gimp pandoc tmux pavucontrol rofi build-essential cmake pkg-config gdb python3 python3-pip python3-venv python3-dev openssh-server libssl-dev libffi-dev rsync vim-nox exuberant-ctags ripgrep fd-find fzf silversearcher-ag -y ``` -5. Configure and enable SDDM (display manager): +4. Configure Vim for Python development by creating a `.vimrc` file in your home directory with the desired configuration. Consider using a Vim configuration manager like Vundle or vim-plug to manage plugins. + +5. Install and configure essential Vim plugins for Python development, such as: + - Syntastic or ALE for syntax checking + - YouCompleteMe or Jedi-Vim for autocompletion + - NERDTree or vim-vinegar for file browsing + - vim-fugitive for Git integration + +6. Configure and enable the display manager: + +```bash +sudo systemctl enable +sudo systemctl set-default graphical.target +``` + +Replace `` with the appropriate display manager for your desktop environment (`sddm` for LXQT, `lightdm` for XFCE). + +7. Reboot the system: + +```bash +sudo reboot +``` + +8. After reboot, log in to the desktop environment and fine-tune settings using the respective configuration tools. + +9. Configure X2Go for remote access: + - Install the X2Go client on your local machine. + - Connect to the VM using the X2Go client, specifying the IP address, username, and the desktop environment as the session type. + - Ensure that the necessary ports for X2Go (e.g., TCP port 22 for SSH) are open and accessible. + +10. Customize the panel, theme, and shortcuts as desired. + +11. Test the VDI setup by connecting from a remote client and verifying that the desktop environment, applications, and audio function as expected. + +## Qt-based LXQT Setup + +1. Install the core LXQT components: + +```bash +sudo apt install lxqt-core lxqt-config openbox pcmanfm-qt qterminal featherpad falkon tint2 sddm xscreensaver qpdfview lximage-qt qps screengrab -y +``` + +2. Configure and enable SDDM (display manager): ```bash sudo systemctl enable sddm -sudo systemctl set-default graphical.target ``` -6. Reboot the system: +3. If you encounter issues with SDDM, refer to the SDDM documentation and logs for troubleshooting guidance. + +## GTK+-based XFCE Setup + +1. Install the core XFCE components: ```bash -sudo reboot +sudo apt install xfce4 xfce4-goodies xfce4-terminal evince ristretto xfce4-taskmanager xfce4-screenshooter -y ``` -7. After reboot, log in to the LXQT desktop environment and fine-tune settings using the LXQT Configuration Center. - -8. Configure X2Go for remote access: - - Install the X2Go client on your local machine. - - Connect to the VM using the X2Go client, specifying the IP address, username, and LXQT as the session type. - -9. Customize the LXQT panel, theme, and shortcuts as desired. - -## GTK+ Version with XFCE - -1. Start with a minimal Debian or Ubuntu installation. - -2. Add the Wezterm APT repository and install Wezterm: - -```bash -curl -fsSL https://apt.fury.io/wez/gpg.key | sudo gpg --yes --dearmor -o /usr/share/keyrings/wezterm-fury.gpg -echo 'deb [signed-by=/usr/share/keyrings/wezterm-fury.gpg] https://apt.fury.io/wez/ * *' | sudo tee /etc/apt/sources.list.d/wezterm.list -sudo apt update && sudo apt install wezterm -y -``` - -3. Configure Wezterm by creating a `.wezterm.lua` file in your home directory with the desired configuration. - -4. Install the core XFCE components, essential tools, power user tools, and development packages: - -```bash -sudo apt install xfce4 xfce4-goodies x2goserver x2goserver-xsession git curl htop neofetch screenfetch scrot unzip p7zip-full policykit-1 ranger mousepad firefox libreoffice evince ristretto mpv vlc xarchiver xfce4-taskmanager xfce4-screenshooter keepassxc geany retext gimp pandoc tmux pavucontrol rofi build-essential cmake pkg-config gdb python3 python3-pip python3-venv python3-dev openssh-server libssl-dev libffi-dev rsync -y -``` - -5. Configure and enable LightDM (display manager): +2. Configure and enable LightDM (display manager): ```bash sudo systemctl enable lightdm -sudo systemctl set-default graphical.target ``` -6. Reboot the system: +3. If you encounter issues with LightDM, refer to the LightDM documentation and logs for troubleshooting guidance. + +## PulseAudio Configuration for VDI + +1. Install PulseAudio and the necessary modules: ```bash -sudo reboot +sudo apt install pulseaudio pulseaudio-module-zeroconf pulseaudio-module-native-protocol-tcp -y ``` -7. After reboot, log in to the XFCE desktop environment and fine-tune settings using the XFCE Settings Manager. +2. Configure PulseAudio to enable network access by editing `/etc/pulse/default.pa`. Add or uncomment the following line: -8. Configure X2Go for remote access: - - Install the X2Go client on your local machine. - - Connect to the VM using the X2Go client, specifying the IP address, username, and XFCE as the session type. +``` +load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.0.0/16 +``` -9. Customize the XFCE panel, theme, and shortcuts as desired. +Replace `192.168.0.0/16` with the appropriate IP range for your VDI network. -This updated guide includes the refined list of development packages discussed earlier, such as essential build tools, version control, debugging tools, Python development packages, security and network tools, terminal multiplexer, and essential libraries. +3. Adjust PulseAudio's latency and buffering settings in `/etc/pulse/daemon.conf`. Uncomment and modify the following lines: -The list has been optimized to provide a powerful yet lightweight development environment suitable for a wide range of tasks. The guide maintains its clear and concise structure, focusing on setting up the desktop environment (LXQT or XFCE) with Wezterm as the primary terminal emulator, along with the necessary tools and utilities for productivity and development. \ No newline at end of file +``` +default-fragments = 2 +default-fragment-size-msec = 10 +``` + +4. Restart the PulseAudio daemon: + +```bash +pulseaudio -k +pulseaudio --start +``` + +5. Configure your remote desktop client to enable audio forwarding and select the appropriate audio backend (e.g., PulseAudio, ALSA) in the client settings. + +6. Test audio playback and recording using the `paplay` and `parec` commands. + +7. If you encounter audio quality issues or distortions, try adjusting the resampling method in PulseAudio's configuration file (`/etc/pulse/daemon.conf`). Uncomment and modify the following line: + +``` +resample-method = speex-float-1 +``` + +Experiment with different resampling methods (e.g., `speex-float-3`, `speex-float-5`, `speex-float-7`, `speex-float-10`) to find the one that provides the best audio quality for your VDI environment. + +8. Monitor PulseAudio's log files (`/var/log/syslog` or `/var/log/user.log`) for any error messages or indications of audio issues. + +9. Use the `pactl` command-line tool to query and control PulseAudio's runtime behavior. + +## Conclusion + +This comprehensive guide provides a streamlined setup for a lightweight desktop environment using either Qt-based LXQT or GTK+-based XFCE, optimized for VDI with PulseAudio configuration. It includes essential tools for productivity and development work, focusing on Vim and Python. + +Remember to thoroughly test your setup, monitor system logs, and refer to the respective documentation for troubleshooting and further optimization. This setup serves as a solid starting point for a power user's VDI environment, which can be further customized and extended based on specific needs and preferences. \ No newline at end of file