Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,22 @@ int main(int argc, char *argv[])

DbusFaceService w;
QDBusConnection connection = QDBusConnection::systemBus();
if (!connection.registerService(SERVERNAME)
|| !connection.registerObject(SERVERPATH,
if ( !connection.registerObject(SERVERPATH,
&w,
QDBusConnection::ExportAllSlots
| QDBusConnection::ExportScriptableProperties
| QDBusConnection::ExportAllSignals)) {
qDebug() << "dbus service already registered!";
qWarning() << "dbus object registere error!";
return -1;
}

auto reply = connection.registerService(SERVERNAME);
if (reply != QDBusConnectionInterface::ServiceRegistered)
{
qWarning() << "dbus service registere error!";
/* code */
return -1;
}

return a.exec();
}
3 changes: 1 addition & 2 deletions msic/dbus-services/org.deepin.dde.Face1.service
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[D-BUS Service]
Name=org.deepin.dde.Face1
User=root
Exec=/usr/libexec/deepin-face
Exec=/bin/false
SystemdService=deepin-face.service
2 changes: 1 addition & 1 deletion msic/systemd/deepin-face.service
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ After=dbus.socket
Type=dbus
User=deepin-daemon
SupplementaryGroups=video
BusName=com.deepin.face
BusName=org.deepin.dde.Face1
ExecStart=/usr/libexec/deepin-face

ProtectSystem=strict
Expand Down