[GH-ISSUE #4511] telegram-desktop: program does not shutdown #2689

Closed
opened 2026-05-05 09:21:00 -06:00 by gitea-mirror · 8 comments
Owner

Originally created by @asakura42 on GitHub (Sep 5, 2021).
Original GitHub issue: https://github.com/netblue30/firejail/issues/4511

Write clear, concise and in textual form.

Bug and expected behavior

  • Describe the bug.

firejail doesn't exit after closing telegram-desktop

  • What did you expect to happen?

Close telegram-desktop, firejail container closes automatically (as usual)

No profile and disabling firejail

  • What changed calling firejail --noprofile /path/to/program in a terminal?

Parent is shutting down, bye...

  • What changed calling the program by path (e.g. /usr/bin/vlc)?

Everything is OK.

Reproduce

Steps to reproduce the behavior:

  1. Run in shell firejail telegram-desktop
  2. Press on tray telegram icon
  3. Click on 'Quit'
  4. You can see that firejail still works an doesn't exit.

Environment

  • Linux distribution and version (ie output of lsb_release -a, screenfetch or cat /etc/os-release)

Arch Linux 5.13.12-arch1-1

  • Firejail version (output of firejail --version) exclusive or used git commit (git rev-parse HEAD)

firejail version 0.9.66

Additional context

Other context about the problem like related errors to understand the problem.

Checklist

  • The profile (and redirect profile if exists) hasn't already been fixed upstream.
  • The program has a profile. (If not, request one in https://github.com/netblue30/firejail/issues/1139)
  • I have performed a short search for similar issues (to avoid opening a duplicate).
  • If it is a AppImage, --profile=PROFILENAME is used to set the right profile.
  • Used LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 PROGRAM to get english error-messages.
  • I'm aware of browser-allow-drm yes/browser-disable-u2f no in firejail.config to allow DRM/U2F in browsers.
  • This is not a question. Questions should be asked in https://github.com/netblue30/firejail/discussions.

Log

OUTPUT OF `firejail --debug /usr/bin/telegram-desktop`

Lines after clicking 'Quit':

QCoreApplication::postEvent: Unexpected null receiver
QObject::~QObject: Timers cannot be stopped from another thread
QObject::~QObject: Timers cannot be stopped from another thread
QObject::~QObject: Timers cannot be stopped from another thread
Sandbox monitor: waitpid 22 retval 22 status 0
Sandbox monitor: monitoring 29
monitoring pid 29
Originally created by @asakura42 on GitHub (Sep 5, 2021). Original GitHub issue: https://github.com/netblue30/firejail/issues/4511 Write clear, concise and in textual form. ### Bug and expected behavior - Describe the bug. firejail doesn't exit after closing `telegram-desktop` - What did you expect to happen? Close `telegram-desktop`, firejail container closes automatically (as usual) ### No profile and disabling firejail - What changed calling `firejail --noprofile /path/to/program` in a terminal? `Parent is shutting down, bye...` - What changed calling the program by path (e.g. `/usr/bin/vlc`)? Everything is OK. ### Reproduce Steps to reproduce the behavior: 1. Run in shell `firejail telegram-desktop` 2. Press on tray telegram icon 3. Click on 'Quit' 4. You can see that firejail still works an doesn't exit. ### Environment - Linux distribution and version (ie output of `lsb_release -a`, `screenfetch` or `cat /etc/os-release`) Arch Linux 5.13.12-arch1-1 - Firejail version (output of `firejail --version`) exclusive or used git commit (`git rev-parse HEAD`) firejail version 0.9.66 ### Additional context Other context about the problem like related errors to understand the problem. ### Checklist - [x] The profile (and redirect profile if exists) hasn't already been fixed [upstream](https://github.com/netblue30/firejail/tree/master/etc). - [x] The program has a profile. (If not, request one in `https://github.com/netblue30/firejail/issues/1139`) - [x] I have performed a short search for similar issues (to avoid opening a duplicate). - [ ] If it is a AppImage, `--profile=PROFILENAME` is used to set the right profile. - [x] Used `LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 PROGRAM` to get english error-messages. - [ ] I'm aware of `browser-allow-drm yes`/`browser-disable-u2f no` in `firejail.config` to allow DRM/U2F in browsers. - [x] This is not a question. Questions should be asked in https://github.com/netblue30/firejail/discussions. ### Log ``` OUTPUT OF `firejail --debug /usr/bin/telegram-desktop` ``` #### Lines after clicking 'Quit': ``` QCoreApplication::postEvent: Unexpected null receiver QObject::~QObject: Timers cannot be stopped from another thread QObject::~QObject: Timers cannot be stopped from another thread QObject::~QObject: Timers cannot be stopped from another thread Sandbox monitor: waitpid 22 retval 22 status 0 Sandbox monitor: monitoring 29 monitoring pid 29 ```
gitea-mirror 2026-05-05 09:21:00 -06:00
  • closed this issue
  • added the
    stale
    label
Author
Owner

@asakura42 commented on GitHub (Sep 5, 2021):

I think I found related issue: https://github.com/netblue30/firejail/issues/928

Also, pstree | grep telegram when Telegram runs in firejail:

        |                     `-firejail-+-telegram-deskto---23*[{telegram-deskto}]
        |                                `-telegram-deskto---2*[{telegram-deskto}]

and when I quit telegram but firejail still work:

        |                     `-firejail---telegram-deskto---2*[{telegram-deskto}]

UPD: https://github.com/netblue30/firejail/issues/3949#issuecomment-777846121 this comment helped me but I won't close issue if some better option exist

<!-- gh-comment-id:913229033 --> @asakura42 commented on GitHub (Sep 5, 2021): I think I found related issue: https://github.com/netblue30/firejail/issues/928 Also, `pstree | grep telegram` when Telegram runs in firejail: ``` | `-firejail-+-telegram-deskto---23*[{telegram-deskto}] | `-telegram-deskto---2*[{telegram-deskto}] ``` and when I quit telegram but firejail still work: ``` | `-firejail---telegram-deskto---2*[{telegram-deskto}] ``` UPD: https://github.com/netblue30/firejail/issues/3949#issuecomment-777846121 this comment helped me but I won't close issue if some better option exist
Author
Owner

@nidamanx commented on GitHub (Sep 7, 2021):

I found a possible solution.
To add in .profile the following line:
ignore dbus-user

@rusty-snake,
do you think it could be better to work on dbus-user filter

P.S. In $XDG_RUNTIME_DIR I cannod find Telegram related files

<!-- gh-comment-id:914143365 --> @nidamanx commented on GitHub (Sep 7, 2021): I found a possible solution. To add in .profile the following line: `ignore dbus-user` @rusty-snake, do you think it could be better to work on `dbus-user filter` P.S. In $XDG_RUNTIME_DIR I cannod find Telegram related files
Author
Owner

@rusty-snake commented on GitHub (Sep 7, 2021):

do you think it could be better to work on dbus-user filter

yes

$ flatpak remote-info --system flathub -m org.telegram.desktop
…
[Session Bus Policy]
org.freedesktop.Notifications=talk
com.canonical.indicator.application=talk
org.mpris.MediaPlayer2.tdesktop=own
org.freedesktop.FileManager1=talk
org.kde.StatusNotifierWatcher=talk
org.freedesktop.ScreenSaver=talk
com.canonical.Unity=talk
org.gnome.Mutter.IdleMonitor=talk
com.canonical.AppMenu.Registrar=talk
org.ayatana.indicator.application=talk
dbus-user.talk org.freedesktop.Notifications
dbus-user.talk com.canonical.indicator.application
dbus-user.talk org.freedesktop.FileManager1
dbus-user.talk org.kde.StatusNotifierWatcher
dbus-user.talk org.freedesktop.ScreenSaver
dbus-user.talk com.canonical.Unity
dbus-user.talk org.gnome.Mutter.IdleMonitor
dbus-user.talk com.canonical.AppMenu.Registrar
dbus-user.talk org.ayatana.indicator.application
dbus-user.own org.mpris.MediaPlayer2.tdesktop
dbus-user.talk ca.desrt.dconf
dbus-user.own org.telegram.desktop
dbus-user.own org.telegram.desktop.*
dbus-user.own org.kde.*
<!-- gh-comment-id:914173811 --> @rusty-snake commented on GitHub (Sep 7, 2021): > do you think it could be better to work on dbus-user filter yes ``` $ flatpak remote-info --system flathub -m org.telegram.desktop … [Session Bus Policy] org.freedesktop.Notifications=talk com.canonical.indicator.application=talk org.mpris.MediaPlayer2.tdesktop=own org.freedesktop.FileManager1=talk org.kde.StatusNotifierWatcher=talk org.freedesktop.ScreenSaver=talk com.canonical.Unity=talk org.gnome.Mutter.IdleMonitor=talk com.canonical.AppMenu.Registrar=talk org.ayatana.indicator.application=talk ``` ``` dbus-user.talk org.freedesktop.Notifications dbus-user.talk com.canonical.indicator.application dbus-user.talk org.freedesktop.FileManager1 dbus-user.talk org.kde.StatusNotifierWatcher dbus-user.talk org.freedesktop.ScreenSaver dbus-user.talk com.canonical.Unity dbus-user.talk org.gnome.Mutter.IdleMonitor dbus-user.talk com.canonical.AppMenu.Registrar dbus-user.talk org.ayatana.indicator.application dbus-user.own org.mpris.MediaPlayer2.tdesktop dbus-user.talk ca.desrt.dconf dbus-user.own org.telegram.desktop dbus-user.own org.telegram.desktop.* dbus-user.own org.kde.* ```
Author
Owner

@nidamanx commented on GitHub (Sep 7, 2021):

yes

That was exactly my thought

This works:
Add in .config/firejail/telegram.local

dbus-user.own org.telegram.desktop
dbus-user.own org.telegram.desktop.*
<!-- gh-comment-id:914182673 --> @nidamanx commented on GitHub (Sep 7, 2021): > yes That was exactly my thought This works: Add in `.config/firejail/telegram.local` ``` dbus-user.own org.telegram.desktop dbus-user.own org.telegram.desktop.* ```
Author
Owner

@rusty-snake commented on GitHub (Sep 7, 2021):

Can you test this

--- a/etc/profile-m-z/telegram.profile
+++ b/etc/profile-m-z/telegram.profile
@@ -48,7 +48,7 @@ private-etc alsa,alternatives,ca-certificates,crypto-policies,fonts,group,ld.so.
 private-tmp
 
 dbus-user filter
-dbus-user.own org.telegram.desktop.*
+dbus-user.own org.telegram.desktop
 dbus-user.talk org.freedesktop.Notifications
 dbus-user.talk org.kde.StatusNotifierWatcher
 dbus-user.talk org.gnome.Mutter.IdleMonitor
<!-- gh-comment-id:914185289 --> @rusty-snake commented on GitHub (Sep 7, 2021): Can you test this ```diff --- a/etc/profile-m-z/telegram.profile +++ b/etc/profile-m-z/telegram.profile @@ -48,7 +48,7 @@ private-etc alsa,alternatives,ca-certificates,crypto-policies,fonts,group,ld.so. private-tmp dbus-user filter -dbus-user.own org.telegram.desktop.* +dbus-user.own org.telegram.desktop dbus-user.talk org.freedesktop.Notifications dbus-user.talk org.kde.StatusNotifierWatcher dbus-user.talk org.gnome.Mutter.IdleMonitor ```
Author
Owner

@nidamanx commented on GitHub (Sep 7, 2021):

@rusty-snake
In that way, it doesnt work.

The only way seems to set the bus as already set in
telegram.profile

We need:
dbus-user.own org.telegram.desktop.*
And we don't need:
dbus-user.own org.telegram.desktop

<!-- gh-comment-id:914196582 --> @nidamanx commented on GitHub (Sep 7, 2021): @rusty-snake In that way, it doesnt work. The only way seems to set the bus as already set in [telegram.profile](https://github.com/nidamanx/firejail/blob/master/etc/profile-m-z/telegram.profile) We need: `dbus-user.own org.telegram.desktop.*` And we don't need: `dbus-user.own org.telegram.desktop`
Author
Owner

@kmk3 commented on GitHub (Dec 13, 2021):

@asakura42 commented on Sep 5:

I think I found related issue: #928

That was closed by #4635. Does the issue still happen on master?

Also, pstree | grep telegram when Telegram runs in firejail:

        |                     `-firejail-+-telegram-deskto---23*[{telegram-deskto}]
        |                                `-telegram-deskto---2*[{telegram-deskto}]

and when I quit telegram but firejail still work:

        |                     `-firejail---telegram-deskto---2*[{telegram-deskto}]

UPD: #3949 (comment)
this comment helped me but I won't close issue if some better option exist

Glad it helped :)

@nidamanx commented on Sep 7:

@rusty-snake In that way, it doesnt work.

The only way seems to set the bus as already set in
telegram.profile

We need: dbus-user.own org.telegram.desktop.* And we don't need:
dbus-user.own org.telegram.desktop

For reference, that line was added by #4412.

<!-- gh-comment-id:992775673 --> @kmk3 commented on GitHub (Dec 13, 2021): @asakura42 commented [on Sep 5](https://github.com/netblue30/firejail/issues/4511#issuecomment-913229033): > I think I found related issue: #928 That was closed by #4635. Does the issue still happen on master? > Also, `pstree | grep telegram` when Telegram runs in firejail: > > ``` > | `-firejail-+-telegram-deskto---23*[{telegram-deskto}] > | `-telegram-deskto---2*[{telegram-deskto}] > ``` > > and when I quit telegram but firejail still work: > > ``` > | `-firejail---telegram-deskto---2*[{telegram-deskto}] > ``` > > UPD: [#3949 (comment)](https://github.com/netblue30/firejail/issues/3949#issuecomment-777846121) > this comment helped me but I won't close issue if some better option exist Glad it helped :) @nidamanx commented [on Sep 7](https://github.com/netblue30/firejail/issues/4511#issuecomment-914196582): > @rusty-snake In that way, it doesnt work. > > The only way seems to set the bus as already set in > [telegram.profile](https://github.com/nidamanx/firejail/blob/master/etc/profile-m-z/telegram.profile) > > We need: `dbus-user.own org.telegram.desktop.*` And we don't need: > `dbus-user.own org.telegram.desktop` For reference, that line was added by #4412.
Author
Owner

@rusty-snake commented on GitHub (Jun 8, 2022):

I'm closing here due to inactivity, please fell free to request to reopen if you still have this issue.

<!-- gh-comment-id:1149785842 --> @rusty-snake commented on GitHub (Jun 8, 2022): I'm closing here due to inactivity, please fell free to request to reopen if you still have this issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#2689
No description provided.