Skip to content

Run on Server

Weitian Leung edited this page Oct 30, 2020 · 1 revision

You have to install the dummy video driver:

  • ArchLinux: run pacman -S xf86-video-dummy
  • Ubuntu Server: run apt install xserver-xorg-video-dummy

Next, create a configuration file, such as:

Section "Monitor"
        Identifier "dummy_monitor"
        HorizSync 28.0-80.0
        VertRefresh 48.0-75.0
        Modeline "1920x1080" 172.80 1920 2040 2248 2576 1080 1081 1084 1118
EndSection

Section "Device"
        Identifier "dummy_card"
        VideoRam 256000
        Driver "dummy"
EndSection

Section "Screen"
        Identifier "dummy_screen"
        Device "dummy_card"
        Monitor "dummy_monitor"
        SubSection "Display"
        EndSubSection
EndSection

Save to a file, dummy.conf for example.

Now start the Xorg (with root):

X :0 -config dummy.conf

If everything goes well, you can run pywpsrpc now, for example:

export DISPLAY=:0
convertto.py README.md -f pdf

Please note that you have to accept the EULA display by WPS Office, otherwise you may failed to run pywpsrpc. You can find how to accept it without showing the WPS Office interface.

Clone this wiki locally