logo
search
list

Table of Content

Confirm WPS Can Open the File Before Changing Defaults
Identify Exact Desktop File IDs
GUI Method (When It Sticks)
Which MIME Types Matter for Everyday Office Files
Terminal Method With xdg-mime (Reliable When GUI Fights You)
When GUI Defaults Keep Jumping Back to Wine / MS Office
Clear Stale Kingsoft MIME Overrides (Carefully)
Browsers, Mail Clients, and Mixed LibreOffice Defaults
Verify Success
After Defaults Stick: Open Office Files Directly in WPS
FAQ
Free Office Download

How to Make WPS Office Default in Ubuntu

Posted by Algirdas Jasaitis

calendar

2026-07-27

views

870

likes

4

To make WPS Office the default Office apps on Ubuntu, set the MIME defaults for each file type you care about—DOCX, XLSX, PPTX, and optionally PDF—using Ubuntu’s Open With UI or xdg-mime with the exact WPS .desktop files installed on your system. GUI toggles sometimes fail to stick when Wine/MS Office entries, leftover Kingsoft MIME overrides, or conflicting mimeapps.list lines keep winning.

Shortest path: confirm WPS opens a sample file manually → identify desktop file IDs → set defaults for the MIME types you need → verify with xdg-mime query default and a Files double-click. Success means double-clicking a DOCX opens WPS Writer (and the same idea for sheets/decks) as your normal user.

Make WPS Office default on Ubuntu
Set MIME defaults with confirmed WPS .desktop files, then verify with xdg-mime.
100% secure

For the main Ubuntu terminal install path, start with How to Install WPS Office via Terminal.

Confirm WPS Can Open the File Before Changing Defaults

Defaults only launch what already works. Right-click a DOCX → Open With → pick WPS Writer once. If that fails, fix install/launch issues first—do not chase MIME files while Writer cannot start.

dpkg -l wps-office 2>/dev/null
snap list 2>/dev/null | grep -i wps
ls /usr/share/applications/*wps* ~/.local/share/applications/*wps* /var/lib/snapd/desktop/applications/*wps* 2>/dev/null

If WPS is missing from Open With entirely, the desktop files were not installed or the session needs a logout after install. Launch Writer from the app grid once, then revisit Files. Setting xdg-mime to a desktop id that does not exist will appear to succeed in some cases and still fail on double-click.

Identify Exact Desktop File IDs

Ubuntu’s xdg-mime tool expects a desktop file id such as something.desktop, not a full path. Names are build-dependent. List candidates and open them to confirm Name=/Exec= lines:

grep -H "^Name=" /usr/share/applications/*wps* 2>/dev/null
grep -H "^MimeType=" /usr/share/applications/*wps* 2>/dev/null | head

Note separate desktop files for Writer, Spreadsheets, Presentation, and PDF when your build ships them. Snap installs may live under /var/lib/snapd/desktop/applications/—still pass only the basename to xdg-mime.

Example names you might see include variants of wps-office-wps.desktop, wps-office-et.desktop, and wps-office-wpp.desktop, but you must confirm on your machine. Guessing a name from a blog post written for another WPS version is a common reason defaults appear to set while Files still opens LibreOffice.

GUI Method (When It Sticks)

  1. In Files, right-click a .docx → Properties → Open With (wording varies by Ubuntu flavor).
  2. Select the WPS Writer entry → Set as default.
  3. Repeat for .xlsx and .pptx with the matching WPS apps.
  4. Open a new file of each type from Files to verify.

On GNOME, you can also use Settings → Default Applications for some categories, but Office formats often still need per-type Open With defaults.

On Kubuntu/Plasma, use the file Properties dialog or System Settings default application pages where available, then still verify with xdg-mime query default. GUI labels differ by flavor; the MIME verification commands do not. If the GUI appears to save but double-click behavior does not change, move to the terminal method immediately instead of repeating the same Properties click path.

Which MIME Types Matter for Everyday Office Files

Modern Microsoft formats use Office Open XML MIME types. Legacy binary formats use older types. Set both if you still receive .doc/.xls/.ppt files:

  • DOCX: application/vnd.openxmlformats-officedocument.wordprocessingml.document
  • DOC: application/msword
  • XLSX: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
  • XLS: application/vnd.ms-excel
  • PPTX: application/vnd.openxmlformats-officedocument.presentationml.presentation
  • PPT: application/vnd.ms-powerpoint
  • PDF (optional): application/pdf

You do not need to memorize them if you copy from this list, but you do need to set the ones you actually open weekly. Skipping legacy types is fine when you never see those extensions.

Terminal Method With xdg-mime (Reliable When GUI Fights You)

Per the Ubuntu xdg-mime manual, set defaults as your desktop user:

xdg-mime default WPS-WRITER.desktop application/vnd.openxmlformats-officedocument.wordprocessingml.document
xdg-mime default WPS-WRITER.desktop application/msword
xdg-mime default WPS-ET.desktop application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
xdg-mime default WPS-ET.desktop application/vnd.ms-excel
xdg-mime default WPS-WPP.desktop application/vnd.openxmlformats-officedocument.presentationml.presentation
xdg-mime default WPS-WPP.desktop application/vnd.ms-powerpoint

Replace WPS-WRITER.desktop, WPS-ET.desktop, and WPS-WPP.desktop with the real filenames you listed. Optional PDF:

xdg-mime default WPS-PDF.desktop application/pdf

Verify:

xdg-mime query default application/vnd.openxmlformats-officedocument.wordprocessingml.document
xdg-mime query default application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
xdg-mime query default application/vnd.openxmlformats-officedocument.presentationml.presentation

Expected result: each query prints your WPS desktop id.

If you are unsure which desktop file maps to Writer versus Spreadsheets, search by MIME type claims and visible names:

grep -l "wordprocessingml\|msword" /usr/share/applications/*wps* 2>/dev/null
grep -l "spreadsheetml\|ms-excel" /usr/share/applications/*wps* 2>/dev/null
grep -l "presentationml\|ms-powerpoint" /usr/share/applications/*wps* 2>/dev/null
grep -l "application/pdf" /usr/share/applications/*wps* 2>/dev/null

Those greps only work when the desktop files declare MimeType lines. If a build omits them, Open With may still list the app from Name=/Exec= metadata, but xdg-mime default can be stricter—another reason to confirm with a manual open before fighting defaults. If you switch from Snap to Deb (or the reverse), redo the defaults carefully—the desktop file names almost always change afterward. Remove the channel you do not use so Open With lists stay readable.

When GUI Defaults Keep Jumping Back to Wine / MS Office

Ask Ubuntu users who installed both Wine MS Office and WPS report that Properties/Open With keeps restoring Microsoft entries for DOCX/XLSX/PPTX after newer WPS builds. Fixes that helped:

  1. Set the WPS default again via GUI or xdg-mime.
  2. Open ~/.config/mimeapps.list (show hidden files in your home folder).
  3. Under [Default Applications], remove leftover lines that still point at Wine/MS Office desktop ids for the Office MIME types.
  4. Save, then re-query with xdg-mime.
test -f ~/.config/mimeapps.list && grep -nE "wordprocessingml|spreadsheetml|presentationml|msword|ms-excel|ms-powerpoint" ~/.config/mimeapps.list

Delete only the conflicting assignment lines you recognize. Do not wipe the entire file blindly. After editing, run the xdg-mime default commands again so the file contains explicit WPS lines you trust.

Clear Stale Kingsoft MIME Overrides (Carefully)

Some reports mention Kingsoft install scripts writing files under ~/.local/share/mime that override system instructions. If defaults still refuse to stick after mimeapps cleanup:

ls ~/.local/share/mime

Back up that directory first. Community advice sometimes removes stray files while leaving subfolders—only do this if you understand you are deleting user MIME overrides, then log out/in and reset xdg-mime defaults again.

cp -a ~/.local/share/mime ~/mime-backup-$(date +%F)
# inspect before deleting any files

After cleanup, re-run your xdg-mime default commands and confirm with xdg-mime query default before testing Files again. If the backup is large, keep it for a day until you are sure Office formats open correctly.

Browsers, Mail Clients, and Mixed LibreOffice Defaults

Making WPS default for Microsoft formats does not automatically change ODT/ODS handling. If you still want LibreOffice for OpenDocument files, leave those MIME types alone. Mixed defaults are normal and often preferable on Ubuntu when coworkers send both DOCX and ODT.

Browsers may keep their own download actions. After system defaults are correct, check the browser’s download/open settings for DOCX/PDF. System xdg-mime results will not override an explicit browser “always open with” choice. In Firefox or Chrome-based browsers, clear a remembered DOCX helper once, download a fresh sample file, and choose WPS Writer with “always open similar files” only after system MIME defaults already point at WPS.

Thunderbird, Evolution, and third-party file managers may cache handlers. After changing defaults, open an attachment once through the client’s own Open With menu if double-click from Files already works but mail attachments do not. Nemo, Dolphin, and Nautilus/Files all honor xdg-mime in slightly different UI ways, but the verification commands stay the same. If one file manager respects WPS and another does not, re-query defaults and check for a second mimeapps file under the older ~/.local/share/applications/mimeapps.list path.

Verify Success

  1. xdg-mime query default shows WPS desktop ids for the MIME types you set.
  2. Double-click DOCX/XLSX/PPTX in Files opens the matching WPS app.
  3. Optional: confirm PDF if you set it.
  4. Re-test after logout if the session cached old handlers.

After Defaults Stick: Open Office Files Directly in WPS

Once MIME defaults point at the correct WPS .desktop files, everyday DOCX, XLSX, and PPTX should open in Writer, Spreadsheet, or Presentation—not Wine leftovers or another suite by accident.

WPS Office for Linux is the suite those defaults should land on: familiar ribbon apps, strong Microsoft Office compatibility, and PDF tools when you need a fixed export.

WPS Office Writer on a Linux desktop editing a DOCX with a familiar ribbon toolbar
WPS Writer on Linux: after MIME defaults point to WPS, double-click DOCX and related files to open them in the suite you just configured.
What you need nextWhat WPS gives you
Make double-click open WPS for everyday Office filesStrong .docx / .xlsx / .pptx / PDF workflow fidelity on Ubuntu and across Windows handoffs
One place for notes, sheets, slides, and PDFsFree core suite: Writer, Spreadsheet, Presentation, plus PDF view/edit/convert tools
A familiar desktop UIRibbon-style apps with a lighter footprint than many heavy suites
A trusted install pathOfficial DEB (Ubuntu/Debian/Mint) and RPM packages from the vendor

If WPS is missing or outdated, download the current package from the official WPS Office for Linux download page, install with sudo apt install ./wps-office_VERSION_amd64.deb, confirm the desktop IDs, then re-check xdg-mime so defaults stay on WPS.

WPS WriterWPS PresentationWPS SpreadsheetWPS PDF
Set WPS Office as Default on Ubuntu Free

FAQ

Can I set one default for all Office files in a single click?

Usually no. Set Writer, Spreadsheets, and Presentation MIME types separately.

Should I run xdg-mime as root?

No. The Ubuntu man page recommends using it inside your desktop user session.

Why does LibreOffice keep winning?

It is still registered for those MIME types. Explicitly set WPS defaults and remove conflicting mimeapps lines.

Do defaults survive a WPS update?

Often yes if desktop ids stay the same; after a channel change, re-verify.

What if Open With does not list WPS?

The desktop file may be missing or the install is broken—repair the install before MIME edits.

Can defaults differ per user on a shared PC?

Yes. xdg-mime and ~/.config/mimeapps.list are per-user. Each Ubuntu account must set WPS defaults separately on a shared PC.

Should CSV files also open in WPS Spreadsheets?

Only if you want that. CSV often stays with a text editor or LibreOffice by choice—set the text/csv MIME type deliberately if you change it to WPS Spreadsheets.

Do I need to set defaults again after every reboot?

No. Correct MIME defaults persist across reboots for that user account. Re-check only after reinstalling WPS, switching Deb or Snap channels, or editing mimeapps.list again.

Free Office Download

WPS WriterWPS PresentationWPS SpreadsheetWPS PDF
  • Use Word, Excel, and PPT for FREE, No Ads.

  • Edit PDF files with the powerful PDF toolkit.

  • Microsoft-like interface. Easy to learn. 100% Compatibility.

  • Boost your productivity with WPS's abundant free Word, Excel, PPT, and CV templates.

100% secure
Algirdas Jasaitis

15 years of office industry experience, tech lover and copywriter. Follow me for product reviews, comparisons, and recommendations for new apps and software.