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#
- Log in to the Proxmox VE web interface.
- 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.
- 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- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin
4. Configure X11 forwarding#
On the local computer#
- Windows:
- Install Xming or VcXsrv:
- Download and install Xming or Download and install VcXsrv.
- Start 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.
- Install Xming or VcXsrv:
- macOS/Linux:
-
Install and start XQuartz (macOS):
- Download and install XQuartz.
- Start XQuartz.
-
Connect and enable X11 forwarding using SSH:
ssh -X user@your-debian-vm-ip
-
On the Debian virtual machine#
-
Verify the DISPLAY variable:
echo $DISPLAY
Confirm that the output is similar to
localhost:10.0
or:0
. -
Run X11 application test:
xeyes
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.
-
Run Calibre:
calibre
If you still encounter errors, install the following library:
sudo apt install -y libxcb-xinerama0
-
Run Calibre again:
calibre
6. Access the graphical interface using VNC (optional)#
If X11 forwarding still has issues, you can use VNC to access the graphical interface.
-
Install VNC server:
sudo apt install -y tightvncserver
-
Start VNC server:
vncserver :1
-
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
.
-
Run Calibre in the VNC session:
calibre
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#
- Install necessary software packages:
-
On the Linux server, make sure that
xterm
(or other graphical interface programs) andxauth
program are installed. These programs can usually be installed using package managers likeyum
orapt-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
-
- Configure SSH service:
- Edit the configuration file of the SSH service
/etc/ssh/sshd_config
to enable X11 forwarding. Find the lineX11Forwarding
and set its value toyes
. - 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).
- Edit the configuration file of the SSH service
Step 2: Desktop-side configuration#
- 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 http://www.straightrunning.com/XmingNotes/) or the SourceForge page (such as http://sourceforge.net/projects/xming/).
- Once downloaded, follow the instructions of the installer to install Xming.
- 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
orlocalhost: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#
- 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).
- 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 newxterm
window popping up on your local Windows system.
- Once logged in to the remote server, you can try running a graphical interface program like
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.