![OpenSUSE 的 GUI 窗口](https://linux22.com/image/1534743/OpenSUSE%20%E7%9A%84%20GUI%20%E7%AA%97%E5%8F%A3.png)
根据问题“在 Linux 中从后台服务启动 GUI 程序“我保存了包含以下内容的 a.desktop:
[Desktop Entry]
Version=1.0
Type=Application
Name=Foo Viewer
Comment= The best viewer !
TryExec=fooview %F
Actions=Edit;Inverse
Icon=fooview.png
MimeType=image/x-foo
X-KDE-Library=libfooview
X-KDE-FactoryName=fooviewfactory
X-KDE-ServiceType=FooService
{Desktop Action Inverse]
Exec=fooview --inverse %f
Name=Foo Viewer (inverse image)
[Desktop Action Edit]
Exec=fooview --edit %f
Name=Foo Viewer (edit image)
Icon=fooview-edit.png
并尝试执行我的脚本:systemctl start serviceName.service 但它给了我以下状态:
linux-y78i:~/Desktop/Test # systemctl status RDPAutoStart.service -l
RDPAutoStart.service - RDPAutoRestart
Loaded: loaded (/etc/systemd/system/RDPAutoStart.service; disabled)
Active: active (running) since Tue 2016-06-14 19:17:20 IST; 18s ago
Main PID: 1728 (java)
CGroup: /system.slice/RDPAutoStart.service
└─1728 /usr/bin/java -jar /root/Desktop/Test/Test.jar
Jun 14 19:17:21 linux-y78i.site java[1728]: Started
Jun 14 19:17:21 linux-y78i.site java[1728]: Current PortID :: gnu.io.CommPortIdentifier@7b98a1f4
Jun 14 19:17:30 linux-y78i.site java[1728]: AC06927#1
Jun 14 19:17:31 linux-y78i.site java[1728]: Connection String::jdbc:sqlserver://xxx.xx.xx.116\cmsserver2012;databaseName = xxxxxxxxxx;user=xxxx;password=xxxxxxxxx
Jun 14 19:17:32 linux-y78i.site java[1728]: connection created
Jun 14 19:17:32 linux-y78i.site java[1728]: File already exist
Jun 14 19:17:32 linux-y78i.site java[1728]: Employee is : AC06927 ALPA A PATEL SQLServerBlob:1
Jun 14 19:17:32 linux-y78i.site java[1728]: Entering to Web
Jun 14 19:17:32 linux-y78i.site java[1728]: Setting to Headless Mode::false
Jun 14 19:17:32 linux-y78i.site java[1728]: No protocol specified
我关心的是 GUI 窗口,但它显示没有指定协议错误
我需要在哪里进行更改才能通过服务获得 GUI 窗口?