Skip to content
This repository has been archived by the owner on Mar 23, 2021. It is now read-only.

Commit

Permalink
feat(docker): 使用WPS pdf功能
Browse files Browse the repository at this point in the history
  • Loading branch information
zjZSTU committed Oct 5, 2019
1 parent 95ba2d2 commit 8bf790b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
26 changes: 26 additions & 0 deletions dockerfiles/wps/pdf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

xhost + > /dev/null

START=$(docker ps -q --filter="name=wpspdf")
STOP=$(docker ps -aq --filter="name=wpspdf")

if [ -n "${START}" ]
then
docker exec -u user $START wpspdf > /dev/null
elif [ -n "${STOP}" ]
then
docker restart ${STOP} > /dev/null
else
docker run -d \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e DISPLAY=unix$DISPLAY \
-e LOCAL_USER_ID=`id -u $USER` \
-e XMODIFIERS="@im=fcitx" \
-e QT_IM_MODULE="fcitx" \
-e GTK_IM_MODULE="fcitx" \
-v $HOME/docs:/home/user/Documents \
--name wpspdf \
zjzstu/wps:latest \
wpspdf > /dev/null
fi
7 changes: 4 additions & 3 deletions docs/source/docker/gui/[Docker][Ubuntu]WPS运行.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@

官网地址:[WPS](http://wps-community.org/downloads)

主要使用其中的`3`项功能:
`4`项功能:

1. `wps for word`
2. `wps for ppt`
3. `wps for excel`
4. `wps for pdf`

## Windows字体

Expand Down Expand Up @@ -180,11 +181,11 @@ fi

可将脚本置于主机`/usr/local/bin`目录下,这样就可以随时启动`wps`

*`wpp.sh``et.sh`脚本类似*
*`wpp.sh``et.sh``pdf.sh`脚本类似*

## 启动器设置

`wps`安装时已生成启动器文件,进入容器`/usr/share/applications`,将`wps-office-wps.desktop``wps-office-wpp.desktop``wps-office-et.desktop`复制到挂载点
`wps`安装时已生成启动器文件,进入容器`/usr/share/applications`,将`wps-office-wps.desktop``wps-office-wpp.desktop``wps-office-et.desktop``wps-office-pdf.desktop`复制到挂载点

```
$ docker exec -it 3657 bash
Expand Down

0 comments on commit 8bf790b

Please sign in to comment.