centOS 服务器 openoffice 无头
我正在尝试将 openOffice 作为 CentOS(非图形)服务器上的服务启动。
soffice -headless -nologo -nofirststartwizard -accept="socket,host=127.0.0.1,port=8100;urp" & > /dev/null 2>&1
我怎么会遇到以下错误
Set DISPLAY environment variable, use -display option
or check permissions of your X-Server
(See "man X" resp. "man xhost" for details)
[1]+ Done soffice -headless -nologo -nofirststartwizard -accept="socket,host=127.0.0.1,port=8100;urp"
这个命令在 Ubuntu 中运行得很好。
您能否建议我如何在 CentOS 服务器上将 OpenOffice 作为服务启动?
I am trying to start openOffice as a service on CentOS(non-graphical) server.
soffice -headless -nologo -nofirststartwizard -accept="socket,host=127.0.0.1,port=8100;urp" & > /dev/null 2>&1
How ever I am getting below error
Set DISPLAY environment variable, use -display option
or check permissions of your X-Server
(See "man X" resp. "man xhost" for details)
[1]+ Done soffice -headless -nologo -nofirststartwizard -accept="socket,host=127.0.0.1,port=8100;urp"
This command works just fine in Ubuntu.
Can you please suggest how can I start OpenOffice as a service on CentOS server?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这对我在 CentOS 5 上有效:
That works for me on CentOS 5:
我不能 100% 确定这是否是问题所在,但可能是您的程序无法联系 X11 服务器,因为它是从 CLI 启动的。试试这个:
这使得 Xorg 能够用于从 CLI 启动的应用程序。
我不确定它是否必须以 root 身份运行(IIRC,您不能以 root 身份运行它)。
I'm not 100% sure if this is the problem, but it might be that your program cannot contact the X11 server because it was launched from the CLI. Try this:
That enables the use of Xorg for apps launched from the CLI.
I am not sure if it has to be ran as root or not (IIRC, you must NOT run it as root).