How to Build a Cloud-based Library

This article records how to build your own library with an idle computer. The main operation in terms of software is to install and run Calibre on a Debian 12 virtual machine in Proxmox VE, including configuring X11 forwarding and resolving Qt platform plugin errors.

1. Create and configure Debian 12 virtual machine#

  1. Log in to the Proxmox VE web interface.
  2. Create a virtual machine:
    • Click on "Create VM".
    • Enter the basic information of the virtual machine, such as the name.
    • Select "Linux" in the "OS" tab and choose the Debian 12 ISO file (which can be downloaded from the Debian official website).
    • Configure hardware settings, including CPU, memory, hard disk, and network.
    • Complete the wizard and create the virtual machine.
  3. Start the virtual machine and follow the prompts to install Debian 12.

2. Update the system and install necessary software#

Log in to the Debian 12 virtual machine and update the system packages, and install necessary software packages.

sudo apt update
sudo apt upgrade -y
sudo apt install -y xorg openbox xauth x11-apps libxcb-xinerama0

3. Install Calibre#

Install the latest version of Calibre using the officially recommended script.

sudo -v && wget -nv -O- | sudo sh /dev/stdin

4. Configure X11 forwarding#

On the local computer#

  • Windows:
    • Install Xming or VcXsrv:
    • Configure PuTTY:
      • Open PuTTY.
      • In the "Session" page, enter your virtual machine's IP address.
      • Navigate to "Connection -> SSH -> X11" in the left menu.
      • Check "Enable X11 forwarding".
      • Go back to the "Session" page and connect to the virtual machine.
  • macOS/Linux:
    • Install and start XQuartz (macOS):

    • Connect and enable X11 forwarding using SSH:

      ssh -X user@your-debian-vm-ip

On the Debian virtual machine#

  1. Verify the DISPLAY variable:

    echo $DISPLAY

    Confirm that the output is similar to localhost:10.0 or :0.

  2. Run X11 application test:


    Confirm that the X11 application window is displayed correctly.

5. Run Calibre and resolve Qt plugin errors#

If you encounter Qt plugin errors when running Calibre, make sure that the necessary dependencies are installed.

  1. Run Calibre:


    If you still encounter errors, install the following library:

    sudo apt install -y libxcb-xinerama0
  2. Run Calibre again:


6. Access the graphical interface using VNC (optional)#

If X11 forwarding still has issues, you can use VNC to access the graphical interface.

  1. Install VNC server:

    sudo apt install -y tightvncserver
  2. Start VNC server:

    vncserver :1
  3. Configure VNC client:

    • Install a VNC client on your local computer (such as TightVNC Viewer).
    • Connect to the virtual machine's VNC server with the address format your-debian-vm-ip:5901.
  4. Run Calibre in the VNC session:


By following these specific steps, you should be able to successfully install and run Calibre on the Debian 12 virtual machine in Proxmox VE. If you encounter any issues, carefully check the configuration of each step to ensure that all dependencies are correctly installed.

When setting up X11 forwarding with PuTTY, you can follow the steps below to ensure that you can successfully run graphical interface programs on a remote Linux server and display their graphical interfaces on your local Windows system.

Step 1: Server-side configuration#

  1. Install necessary software packages:
    • On the Linux server, make sure that xterm (or other graphical interface programs) and xauth program are installed. These programs can usually be installed using package managers like yum or apt-get.

    • For example, on CentOS, you can use the following command to install:

      sudo yum install xterm xauth
    • On Ubuntu, you can use the following command to install:

      sudo apt-get install xterm xauth
  2. Configure SSH service:
    • Edit the configuration file of the SSH service /etc/ssh/sshd_config to enable X11 forwarding. Find the line X11Forwarding and set its value to yes.
    • Restart the SSH service to apply the changes. This can usually be done by executing a command like sudo systemctl restart sshd (the exact command depends on your Linux distribution).

Step 2: Desktop-side configuration#

  1. Download and install Xming:
    • Xming is an X server that runs on Windows, allowing you to run graphical interface programs on a remote Linux server via SSH and display their graphical interfaces on your local Windows system.
    • You can download the Xming installer from the official website (such as or the SourceForge page (such as
    • Once downloaded, follow the instructions of the installer to install Xming.
  2. Configure PuTTY for X11 forwarding:
    • Open the PuTTY program.
    • Enter the IP address or hostname of the remote Linux server in the "Host Name (or IP address)" field.
    • In the left navigation pane, expand "Connection" -> "SSH" -> "X11".
    • In the right panel, check the "Enable X11 forwarding" checkbox.
    • (Optional) In the "X display location" field, enter localhost:0.0 or localhost:10.0 (depending on your configuration and requirements). Typically, localhost:0.0 is the default setting, but in some cases, you may need to use a different value.
    • Click the "Open" button to establish the SSH connection.

Step 3: Test X11 forwarding#

  1. Log in to the remote server:
    • Log in to the remote Linux server using the credentials you set in PuTTY (username and password or private key).
  2. Run a graphical interface program:
    • Once logged in to the remote server, you can try running a graphical interface program like xterm to test if X11 forwarding is successful.
    • Enter the xterm command in the terminal and press Enter. If everything is working correctly, you should see a new xterm window popping up on your local Windows system.

If you successfully see the xterm window or other graphical interface programs, congratulations, you have successfully configured PuTTY for X11 forwarding! Now you can run any graphical interface program on the remote Linux server via SSH and display their graphical interfaces on your local Windows system.

This article was originally published on CG Art Lab. Feel free to subscribe to the newsletter for free.

Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.