WPS Office

From ArchWiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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.

Running

The programs in the suite can be run using:

Command Program
wps WPS Writer
et WPS Spreadsheets
wpp WPS Presentation
wpspdf WPS PDF

Language aids

Tango-view-refresh-red.pngThis article or section is out of date.Tango-view-refresh-red.png

Reason: Packages no longer exist (Discuss in Talk:WPS Office)

Interface language

To change interface language of WPS you can install wps-office-mui-frAUR for French, wps-office-mui-ja-jpAUR[broken link: package not found] for Japanese, etc. Then set your language by selecting Review->Spell Check->Set Language to choose your language and restart WPS.

Spell checking

For spell checking, you need to install wps-office-extension-german-dictionaryAUR[broken link: package not found]for German, wps-office-extension-french-dictionaryAUR[broken link: package not found]for French, etc. Then, customize spell check by selecting Tool -> Options -> Language -> choose to choose your language and restart WPS.

Tips and tricks

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/Breaks Mime

To Fix this problem you need to edit Office.conf in your home directory /home/<youruser>/.config/Kingsoft/Office.conf

# cd /home/<youruser>/.config/Kingsoft

or

# cd ~/.config/Kingsoft

Note: The second command for the sake of convenience

After that find Office.conf and open it using your text editor Then add the following before [kdcsdk]:

common\do_not_detect_file_association_while_startup=true

Example

[6.0]
......
common\do_not_detect_file_association_while_startup=true

[kdcsdk]
......

Then save it, 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 in AUR 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 any of the apps 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 app, WPS will show a warning: 'Unable to open "gtk+"'. Ignore it and press Ok.

Fcitx5 cannot input Chinese

This problem appeared in some users after the Chinese version (wps-office-cnAUR) 11.1.0.9604-1 was updated, and it was fixed in wps-office-cnAUR 11.1.0.9615-1, but some users still need to modify the environment variables (such as .xprofile) file) [1]:

export QT_IM_MODULE=fcitx5

See also