Jump to content

# WPS Office

3 languages

- Español
- 日本語
- 中文（简体）

From ArchWiki

WPS Office for Linux is a proprietary alternative for Microsoft Office with a modern UI which supports cross-device file transfer and cloud backup. The suite contains Writer, Presentation and Spreadsheets.

## Installation

Install wps-officeAUR.

The fonts used by WPS Office are provided by the ttf-wps-fontsAUR package.

The programs in the suite can be run using:

Command | Program
--- | ---
`wps` | WPS Writer
`et` | WPS Spreadsheets
`wpp` | WPS Presentation
`wpspdf` | WPS PDF

## Tips and tricks

### Interface language

Official support is only for English and Chinese (wps-office-cnAUR).

Some languages have unofficial translations; you can install them from the AUR packages:

- wps-office-mui-frAUR
- wps-office-mui-ruAUR

Then set your language by selecting Review > Spell Check > Set Language to choose your language and restart WPS.

### Modify WPS file icon and file association

After installing WPS, the DOC, XLS, PPT and other files in the icon-theme you use will be replaced with the WPS text, ET form, WPP presentation and other icons that come with WPS Office. If you do not need it, you can modify the relevant mime configuration file yourself:

    /usr/share/mime/packages/wps-office-{wpp,wps,et}.xml
    /usr/share/mime/packages/freedesktop.org.xml #(Belongs to the package shared-mime-info)

And desktop files:

    /usr/share/applications/wps-office-{wpp,wps,et}.desktop

Processing strategy: WPS's own format is defined by `wps-office-{wpp,wps,et}.xml`, and others are defined by `freedesktop.org.xml`. Also modify the `MimeType` item of the `desktop` file.

Add the following statement to the `package` function in the PKGBUILD file:

    ##et wpp wps supported MimeType
        _etMT="MimeType=application\/wps-office.et;application\/wps-office.ett;application\/vnd.ms-excel;\
    application\/vnd.openxmlformats-officedocument.spreadsheetml.template;\
    application\/vnd.openxmlformats-officedocument.spreadsheetml.sheet;"
        _wppMT="MimeType=application\/wps-office.dps;application\/wps-office.dpt;application\/vnd.ms-powerpoint;\
    application\/vnd.openxmlformats-officedocument.presentationml.presentation;\
    application\/vnd.openxmlformats-officedocument.presentationml.slideshow;\
    application\/vnd.openxmlformats-officedocument.presentationml.template;"
        _wpsMT="MimeType=application\/wps-office.wps;application\/wps-office.wpt;\
    application\/msword;application\/rtf;application\/msword-template;\
    application\/vnd.openxmlformats-officedocument.wordprocessingml.template;\
    application\/vnd.openxmlformats-officedocument.wordprocessingml.document;"

        ##mime
        sed -i '3,31d' $pkgdir/usr/share/mime/packages/wps-office-et.xml
        sed -i '3,36d' $pkgdir/usr/share/mime/packages/wps-office-wpp.xml
        sed -i '3,30d' $pkgdir/usr/share/mime/packages/wps-office-wps.xml

        ##desktop
        #_et
        sed -i "s/^MimeType.*$/$_etMT/" $pkgdir/usr/share/applications/wps-office-et.desktop
        #_wpp
        sed -i "s/^MimeType.*$/$_wppMT/" $pkgdir/usr/share/applications/wps-office-wpp.desktop
        #_wps
        sed -i "s/^MimeType.*$/$_wpsMT/" $pkgdir/usr/share/applications/wps-office-wps.desktop

### Use GTK+ UI

The default UI of WPS is Qt. In fact, the bundled Qt is 4.7.4, so the themes such as qtcurve cannot be loaded normally because the versions do not match. But we can change it to GTK+ and add the parameter `-style gtk+` directly.

You can modify the et, wpp, and wps files in the `/usr/bin/` directory and delete it (if any):

    gOpt=

Then, add:

    gOpt="-style=gtk+"
    export GTK2_RC_FILES=/usr/share/themes/Breeze/gtk-2.0/gtkrc

#### Manually repair Kingsoft PDF startup script

The startup script provided by Kingsoft PDF is missing the custom configuration of GTK. You can add it at the beginning of its startup script `/usr/bin/wpspdf`:

    gOpt="-style=gtk+"
    export GTK2_RC_FILES=/usr/share/themes/Breeze/gtk-2.0/gtkrc

And add `${gOpt}` to the subsequent `run` function, the modified `run` function is as follows:

    function run()
    {
    	if [ -e "${gInstallPath}/office6/${gApp}" ] ; then
    		{ ${gInstallPath}/office6/${gApp} ${gOpt} "$@"; } >/dev/null 2>&1
    	else
    		echo "${gApp} does not exist!"
    	fi
    }

Note: Since each upgrade may result in the loss of file modifications, you may consider copying the et, wpp, and wps files to other directories (for example: `~/.local/bin/`) and adding them to Environment variables.

## Troubleshooting

### WPS Office overriding or breaking mime

Add `common\do_not_detect_file_association_while_startup=true` before `[kdcsdk]`:

    /home/your_user/.config/Kingsoft/Office.conf

    [6.0]
    ...
    common\do_not_detect_file_association_while_startup=true

    [kdcsdk]
    ...

Then save the file, and restart WPS Office.

### Zip template compressed packet garbled

Use the parameter `-O gb18030` with `unzip` when decompressing.

### Formula can not display normally

the display of most Mathematical formula need fonts show below:

    symbol.ttf webdings.ttf wingding.ttf wingdng2.ttf wingdng3.ttf monotypesorts.ttf MTExtra.ttf

ttf-wps-fontsAUR contain all of these fonts except monotypesorts.ttf, you can install it directly.

### Microsoft Office file in KDE Plasma is recognized as Zip

After installing WPS Office, Microsoft Office files will be recognized as zip and cannot open with WPS. You can change this kind of recognition by delete mime file in `/usr/share/packages/`:

    # rm /usr/share/mime/packages/wps-office-*.xml
    # update-mime-database /usr/share/mime

### Fcitx input method framework cannot input on WPS

add following lines to `/usr/bin/wps` `/usr/bin/et` `/usr/bin/wpp` separately to add fcitx to Writer, Spreadsheet and Presentation:

    export XMODIFIERS="@im=fcitx"
    export QT_IM_MODULE="fcitx"

### Bad integration with dark theme of KDE Plasma

Run the applications with:

    env GTK2_RC_FILES=/usr/share/themes/Breeze/gtk-2.0/gtkrc et -style gtk+

Breeze theme can be replaced with any light theme, i.e. Adwaita, Breath, etc.

After running the application, WPS will show a warning: 'Unable to open "gtk+"'. Ignore it and press Ok.

### WPSPDF functionality unavailable

Functions related to PDF export, opening, and other PDF-related features are all provided by WPSPDF. However, WPSPDF relies on libtiff5.so.5 to support its PDF functionality. After a system update, Arch Linux provides libtiff.so.6 or a newer version, which causes WPSPDF to malfunction. Solution: Install libtiff5AUR.

### Fonts are too bold

Version 11.1.0.11704-1 doesn't work well with freetype2 versions 2.13.1 and 2.13.2. Normally, freetype2 creates a bold variant if the chosen font does not have a bold version. This is called "fakebold", but in this case, wps-office is also making fonts bold on its own, and the result is that the text looks too bold.

To workaround this issue until a long term fix is provided, downgrade freetype2 to 2.13.0.

Note: An alternative is to add the environment varible to your path to old version of freetype2 in desktop file. See [1]

## See also

- WPS Office Community
- WPS For Linux (Chinese)

Category:

- Office