JustToThePoint English Website Version
JustToThePoint en español
Colaborate with us

Access Your Arch Linux GNOME VM Remotely and Enhance Your Shell Experience with Zsh and Ollama

The real problem of humanity is the following: We have Paleolithic emotions, medieval institutions and godlike technology. And it is terrifically dangerous, and it is now approaching a point of crisis overall, Edward O. Wilson.

Proxmox

This article is part two of a series. In part one, we set up an Arch Linux virtual machine with the GNOME desktop in Proxmox VE. If you haven’t read it, you can find it here: Learn how to set up an Arch Linux virtual machine with the GNOME desktop in Proxmox VE..

In this post, we’ll focus on improving how you can access and use that VM —covering remote desktop access via SPICE and transforming your shell environment with Zsh and Oh My Zsh.

Remote Desktop Access to GNOME via SPICE in Proxmox

You can always click the Proxmox Console and get a noVNC session in your browser. It’s fine for installation and quick tasks, but it doesn’t support 3D acceleration fully. SPICE is an alternative remote display protocol that offers a smoother, more integrated remote desktop experience closer to working on a physical machine (clipboard sharing, dynamic resolution, etc.) Let’s set up SPICE for our Arch Linux GNOME VM:

  1. We need a working Arch Linux VM with GNOME, network connectivity (ip a), and QEMU Guest Agent (navigate to the VM’s Options and ensure that QEMU Guest Agent is enabled). In the Proxmox web UI, shut down the VM (if it’s running), open the Hardware tab for your Arch Linux VM and edit the Display device. Change the Graphic card type to SPICE (instead of Standard VGA or default).
  2. Install the SPICE vdagent in the Arch Linux VM which is responsible for things like dynamic display resolution and clipboard sharing: sudo pacman -S spice-vdagent, sudo reboot.
  3. On your local machine (client), download and install a SPICE client application to connect, such as virt-viewer for Windows (Win x86 MSI, it provides the remote viewer program), sudo apt install virt-viewer (Ubuntu/Debian), brew install virt-viewer (macOS using Homebrew).
  4. Launching the console. In the Proxmox web UI, select your Arch VM and open the console via SPICE by clicking the Console dropdown menu and selecting SPICE. Your browser will download a connection file (with a .vv extension, e.g., pve-spice.vv).
  5. Double-click the downloaded .vv file on your Windows machine. virt-viewer should launch and connect your local machine (client) to the Virtual Machine and display the GNOME desktop of your VM.

Remote Desktop Access to GNOM

Client side: Passwordless SSH

To manage your VM or server more conveniently, you can configure passwordless SSH. It uses public-key cryptography so you no longer need to type your password each time.

To copy your SSH key to the remote server (192.168.1.106) for your user, you can use the ssh-copy-id command. This command appends your public key (from ~/.ssh/id_rsa.pub) into the remote user's ~/.ssh/authorized_keys, allowing secure, password-free, and time saving login.

sudo pacman -Syu # Ensure the system is up to data
sudo pacman -S --needed openssh networkmanager # Install NetworkManager and OpenSSH client (if not already present)
sudo systemctl enable --now NetworkManager # Enable NetworkManager
# Ensure the remote host is reachable and SSH server is running
sudo systemctl enable --now sshd.service
# On your client machine, verify you can reach the server
ping -c 3 192.168.1.106
# Copy your public key to the remote VM
ssh-copy-id nmaximo7@192.168.1.106
# Test your passwordless access to the server
ssh nmaximo7@192.168.1.106

After trying to copy your SSH key to a VM in Proxmox ssh-copy-id nmaximo7@192.168.1.41, you may find yourself with this error:

/run/current-system/sw/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/nmaximo7/.ssh/id_rsa.pub"
/run/current-system/sw/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed

/run/current-system/sw/bin/ssh-copy-id: ERROR: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
ERROR: @    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
ERROR: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
ERROR: IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
ERROR: Someone could be eavesdropping on you right now (man-in-the-middle attack)!
ERROR: It is also possible that a host key has just been changed.
ERROR: The fingerprint for the ED25519 key sent by the remote host is
ERROR: SHA256:rzxJwHcIloyKZpeljnzfAHwD7nC9owYYstokwvZFwkw.
ERROR: Please contact your system administrator.
ERROR: Add correct host key in /home/nmaximo7/.ssh/known_hosts to get rid of this message.
ERROR: Offending ECDSA key in /home/nmaximo7/.ssh/known_hosts:16
ERROR: Host key for 192.168.1.41 has changed and you have requested strict checking.
ERROR: Host key verification failed.

It indicates that the remote host's identity has changed since the last time you connected. This is a security feature in SSH to prevent man-in-the-middle attacks.

SSH checks the fingerprint of the server’s host key against the stored keys in your known_hosts file. If the fingerprint doesn’t match (e.g., the VM was reinstalled or the SSH keys were regenerated), SSH raises a warning and refuses to connect.

Open the known_hosts file where the offending entry is located (e.g., 192.168.1.41): nvim /home/nmaximo7/.ssh/known_hosts. Find and remove the line that corresponds to the IP address 192.168.1.41. Run the command again to copy your SSH key: ssh-copy-id nmaximo7@192.168.1.41.

First-Boot Post-Installation Setup

Your Arch Linux VM should boot up to either a login prompt (tty) or a display manager if you selected one in archinstall. Once you’ve logged into your freshly installed Arch Linux GNOME VM, there are a few housekeeping steps and handy tools to install.

  # Update your package database and upgrade all packages
  sudo pacman -Syu
  ping google.com # Ensure you have internet access
  #  Installing some essential Packages
  sudo pacman -S neovim fzf alacritty fastfetch flameshot gimp ripgrep

neovim is an extensible text editor that improves upon Vim. It has better support for plugins and modern features. fzf is a command-line fuzzy finder. It allows you to quickly search and filter through files, command history, and more. alacritty is an OpenGL terminal emulator that focuses on performance. fastfetch is a command-line utility that displays system information in a visually appealing way. flameshot is a powerful screenshot tool that allows you to capture, annotate, and save images easily. gimp is a free, open-source, and yet very powerful image editor. ripgrep (rg) is a command-line search tool that recursively searches your current directory for a regex pattern. It’s faster than grep and has more features.

Now that your VM is set up and “clean”, consider taking a Proxmox snapshot (if the VM storage supports it). This lets you quickly revert to this clean state if you ever need it.

ZSH and Oh My Zsh

A shell is a command-line interpreter. It sits between the kernel (core) of an operating system and the user, and exposes the operating system’s services to a human user or other programs. In other words, a shell is a command-line user interface for accessing the services of the operating system. Some example of shells are: Power Shell, cmd, Bash, fish, and Zsh.

Zsh (Z shell) is a popular alternative to the default Bash shell. It is an extended shell designed for interactive use, known for its extensive customization options, plugin ecosystem, theme support, and advanced features that improve the user experience. Zsh offers everything Bash does and more.

Oh My Zsh is a delightful, open source, widely-used, community-driven, but somehow bloated, framework for managing your Zsh configuration. It comes bundled with thousands of helpful functions, helpers, plugins, and themes and gives you reasonable defaults that are much more useful than Bash’s default settings. It can save time and avoid reinventing the wheel.

Install the corresponding packages: sudo pacman -S git curl zsh zsh-completions unzip fontconfig. Change your default shell to Zsh: chsh -s /bin/zsh. Restart your terminal/SSH session, select 0, quit and do nothing.

fontconfig provides the necessary tools to manage fonts (fc-cache).

Zsh’s configuration file (~/.zshrc) is the main file that gets read whenever you start a new interactive Zsh shell.

# Check Zsh installation
zsh --version
# Run the Oh My Zsh install script
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# Install zsh-autosuggestions
# As you type a command, it will suggest completions based on your command history,
# allowing you to recall and re-run previous commands without typing them fully and saving you precious time.
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

# Install zsh-syntax-highlighting
# It brings syntax highlighting to your command line. It will colorize the command you're writing in real time.
# For example, if you type something that’s not a command, it will show it in red.
git clone https://github.com/zsh-users/zsh-syntax-highlighting ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

# Install Fantasque Nerd Font
# Starship make use of special characters. To see these properly, we need to install a Nerd Font.
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.3.0/FantasqueSansMono.zip
unzip FantasqueSansMono.zip
# Create Font Directory (if it doesn't exist).
mkdir -p ~/.local/share/fonts
# Move Font Files.
mv *.ttf ~/.local/share/fonts/
rm FantasqueSansMono.zip
# Update Font Cache: This makes the system aware of the newly installed fonts.
fc-cache -fv

# Installing Starship
sudo pacman -S starship
---------------------------------------
vim .zshrc:
---------------------------------------

# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"

# Set name of the theme to load.
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="robbyrussell"

# This disables the occasional prompt Oh My Zsh gives to update itself.
DISABLE_UPDATE_PROMPT=true
# Enable command auto-correction.
ENABLE_CORRECTION="true"

# Display red dots while waiting for completion.
COMPLETION_WAITING_DOTS="true"

# Plugins to load.
# After installing them, add them wisely, as too many plugins will slow down shell startup.
plugins=(
  zsh-autosuggestions
  zsh-syntax-highlighting
  sudo
  docker
)

# Load Oh My Zsh.
source $ZSH/oh-my-zsh.sh

# User configuration

# Aliases (shortcuts) for common commands.
alias ll='ls -la'
alias la='ls -A'
alias l='ls -CF'
alias cls='clear'
alias df='df -h'
alias du='du -h'
alias mkdir='mkdir -p'
alias ports='netstat -tulanp'

# Arch Linux-specific aliases.
alias update='sudo pacman -Syu'
alias cleanup='sudo pacman -Rns $(pacman -Qdtq)'
alias pkglist='pacman -Qqe > pkglist.txt'
alias install='sudo pacman -S'
alias remove='sudo pacman -Rns'
alias search='pacman -Ss'
alias orphaned='pacman -Qdt'
alias mirrors='sudo reflector --latest 10 --sort rate --save /etc/pacman.d/mirrorlist'

# Set language environment.
export LANG=en_US.UTF-8

# Preferred editor for local and remote sessions.
if [[ -n $SSH_CONNECTION ]]; then
  export EDITOR='nvim'
else
  export EDITOR='nvim'
fi

# Enable color support for ls and grep.
if [ -x /usr/bin/dircolors ]; then
  test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
  alias ls='ls --color=auto'
  alias grep='grep --color=auto'
  alias fgrep='fgrep --color=auto'
  alias egrep='egrep --color=auto'
fi

# History configuration.
HISTFILE=~/.zsh_history # where to save your history
HISTSIZE=10000  # number of commands to keep in memory
SAVEHIST=10000 # number of commands to save to history file
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_FIND_NO_DUPS
setopt HIST_SAVE_NO_DUPS
setopt INC_APPEND_HISTORY
setopt SHARE_HISTORY

# Enable auto-suggestions based on history.
source ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh

# Enable syntax highlighting.
source ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

# Load local customizations if they exist.
if [ -f ~/.zshrc_local ]; then
  source ~/.zshrc_local
fi

unsetopt correct # Permanently Disable Spell Correction
# Zsh is suggesting a correction for ollama/qwen2.5:latest to .ollama/qwen2.5:latest.
---------------------------------------

# It initializes Starship for Zsh, replacing the default prompt with Starship’s prompt.
eval "$(starship init zsh)"
exec zsh

Installing and Using Ollama on Arch Linux

Ollama is a lightweight, extensible framework for building and running large language models (LLMs) on your local machine. It makes it easy to get up and running models such as Llama 3.3, Phi 4, Gemma 2, and other large language models.

# Install Ollama
curl -fsSL https://ollama.com/install.sh | sh
# Enable and start the Ollama service
sudo systemctl enable --now ollama.service
# Check the status of the Ollama service and verify that is running
systemctl status ollama.service
● ollama.service - Ollama Service
     Loaded: loaded (/etc/systemd/system/ollama.service; enabled; preset
: disabled)
     Active: active (running) since Tue 2025-05-06 11:35:45 CEST; 1min 33s ago
[...]
# List available local models
ollama list
# These models require plenty of resources
# Install a model, e.g., llama3.3, qwen
ollama pull llama3.3
ollama pull phi4
ollama pull qwen:4b
# Qwen 3 is the latest generation of large language models in Qwen series, offering a comprehensive suite of dense and mixture-of-experts (MoE) models.
# Run an interactive session
ollama run qwen:4b
>>> What is Ollama (the framework for running LLMs)?
Ollama is a Python framework for training large language models (LLMs) [...]
>>> /bye

sudo systemctl stop ollama.service # Stop the Ollama service.

ShellGPT is a command-line tool that lets you query LLMs via various backends, such as OpenAI, Ollama, etc.

sudo pacman -S --needed python-pipx
pipx ensurepath
Success! Added /home/nmaximo7/.local/bin to the PATH environment variable.

# Install ShellGPT
pipx install shell-gpt
# By default, ShellGPT uses OpenAI's API. You'll need an API key. OpenAI API is not free of charge.
# If you have an OPENAI API KEY, nvim .zshrc:
export OPENAI_API_KEY="sk-…"
# Otherwise...
export OPENAI_API_KEY=none
export SGPT_LLM_PROVIDER=ollama
export PATH="$PATH:/home/nmaximo7/.local/bin"

# Edit ~/.config/shell_gpt/.sgptrc to:
DEFAULT_MODEL=ollama/qwen:4b
# Use a valid Ollama model name, ollama/[model_name]
OPENAI_USE_FUNCTIONS=false
USE_LITELLM=true
# ShellGPT is designed to quickly analyse and retrieve information.
# Inject the litellm package. This lets ShellGPT talk directly to Ollama’s local endpoint:
~ pipx install litellm
  installed package litellm 1.68.0, installed using Python 3.13.3
  These apps are now globally available
    - litellm
done! ✨ 🌟 ✨
~ pipx inject shell-gpt litellm

  injected package litellm into venv shell-gpt
done! ✨ 🌟 ✨

nmaximo7 in 🌐 hyperArch in ~ took 5s
# Query your Ollama model
➜  ~ sgpt --model ollama/qwen:4b "Who are you?"
I am a large language model created by Alibaba Cloud. I am called Qwen.

image info

Bitcoin donation

JustToThePoint Copyright © 2011 - 2025 Anawim. ALL RIGHTS RESERVED. Bilingual e-books, articles, and videos to help your child and your entire family succeed, develop a healthy lifestyle, and have a lot of fun. Social Issues, Join us.

This website uses cookies to improve your navigation experience.
By continuing, you are consenting to our use of cookies, in accordance with our Cookies Policy and Website Terms and Conditions of use.