diff --git a/Telegram/SourceFiles/core/sandbox.cpp b/Telegram/SourceFiles/core/sandbox.cpp index 0dbe35261..45362220e 100644 --- a/Telegram/SourceFiles/core/sandbox.cpp +++ b/Telegram/SourceFiles/core/sandbox.cpp @@ -122,6 +122,10 @@ int Sandbox::start() { } } +#ifdef Q_OS_LINUX + _localServer.setSocketOptions(QLocalServer::AbstractNamespaceOption); +#endif + connect( &_localSocket, &QLocalSocket::connected, diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp index 2f8e5061a..b0a54d483 100644 --- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp @@ -557,7 +557,14 @@ void SetApplicationIcon(const QIcon &icon) { } QString SingleInstanceLocalServerName(const QString &hash) { +#ifdef Q_OS_LINUX + if (KSandbox::isSnap()) { + return u"snap.telegram-desktop."_q + hash; + } + return hash + '-' + cGUIDStr(); +#else // Q_OS_LINUX return QDir::tempPath() + '/' + hash + '-' + cGUIDStr(); +#endif // !Q_OS_LINUX } std::optional IsDarkMode() {