Base: Launch NotificationServer at session start-up

This commit is contained in:
Lucas CHOLLET 2022-07-24 15:30:48 +02:00 committed by Linus Groh
parent 1da9375400
commit b01822bdd4
4 changed files with 9 additions and 10 deletions

View file

@ -10,14 +10,6 @@ KeepAlive=true
User=lookup
SystemModes=text,graphical,self-test
[NotificationServer]
Socket=/tmp/portal/notify
SocketPermissions=600
Lazy=true
Priority=low
KeepAlive=true
User=anon
[WindowServer]
Socket=/tmp/portal/window,/tmp/portal/wm
SocketPermissions=660

View file

@ -45,6 +45,13 @@ SystemModes=graphical
MultiInstance=true
AcceptSocketConnections=true
[NotificationServer]
Socket=/tmp/user/%uid/portal/notify
SocketPermissions=600
Lazy=true
Priority=low
KeepAlive=true
[LaunchServer]
Socket=/tmp/user/%uid/portal/launch
SocketPermissions=600

View file

@ -164,7 +164,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto app = TRY(GUI::Application::try_create(arguments));
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/tmp/portal/notify", "rw"));
TRY(Core::System::unveil("/tmp/user/%uid/portal/notify", "rw"));
TRY(Core::System::unveil("/proc/net/adapters", "r"));
TRY(Core::System::unveil("/bin/SystemMonitor", "x"));
TRY(Core::System::unveil(nullptr, nullptr));

View file

@ -15,7 +15,7 @@ namespace GUI {
class ConnectionToNotificationServer final
: public IPC::ConnectionToServer<NotificationClientEndpoint, NotificationServerEndpoint>
, public NotificationClientEndpoint {
IPC_CLIENT_CONNECTION(ConnectionToNotificationServer, "/tmp/portal/notify"sv)
IPC_CLIENT_CONNECTION(ConnectionToNotificationServer, "/tmp/user/%uid/portal/notify"sv)
friend class Notification;