Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • pygobject pygobject
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 308
    • Issues 308
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 34
    • Merge requests 34
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • pygobjectpygobject
  • Issues
  • #453
Closed
Open
Issue created Jan 18, 2021 by Anatoli Babenia@abitrollyContributor

Suppress message "Unable to init server: Could not connect: Connection refused"

BleachBit uses Gtk.RecentManager to remove items. RecentManager works without GUI, but importing it still shows this confusing connection error to users.

In [1]: import gi
   ...: gi.require_version('Gtk', '3.0')
   ...: from gi.repository.Gtk import RecentManager
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused

In [2]: RecentManager().get_items()
Out[2]: [<Gtk.RecentInfo object at 0x7f0b020e6880 (GtkRecentInfo at 0x55ee4122bc30)>]

BleachBit runs in CLI mode, and this warning is shown when people run cleaners with sudo.

Is it possible to suppress the warning? Or delay the connection (lazy load) until it is needed?

Assignee
Assign to
Time tracking