You are not logged in.

#1 2016-03-20 22:00:21

Ttowels
Member
Registered: 2016-03-03
Posts: 17

Can not start bleachbit from terminal

Hi there,

So I was in the process of creating a script to rum bleachbit every week. However, when I ran a test to see if I could rum it from the terminal, I got the the blew error. Has anyine see this or know what the soultion is?

/usr/lib/python2.7/site-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
  warnings.warn(str(e), _gtk.Warning)
Could not open X display

Thanks ahead of time for the help

Last edited by Ttowels (2016-03-20 22:00:56)

Offline

#2 2016-03-21 22:57:54

atomicbeef
Member
Registered: 2015-09-30
Posts: 98

Re: Can not start bleachbit from terminal

Hi Ttowels,

If you want to run a GUI program from something other than a graphical terminal emulator, you'll have to specify the X display to open the program in. For example with bleachbit, you would do

DISPLAY=:0 bleachbit

Note that you do need an X server to be running in order for this to work. This is fine if you will always run your script while X is running, but it will be more difficult to use your script if this is not the case. For your needs, I suggest that you look into the command line interface of bleachbit.

Offline

#3 2016-03-21 23:04:52

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: Can not start bleachbit from terminal

atomicbeef wrote:

I suggest that you look into the command line interface of bleachbit.

The AUR has a lighter cli-only bleachbit (maintained by me tongue): https://aur.archlinux.org/packages/bleachbit-cli/

I have a bb alias I run after updating, edit to suit your needs:

% which bb
bb: aliased to bleachbit --clean chromium.cache chromium.dom thumbnails.cache ; sudo bleachbit --clean system.cache system.localizations system.trash ; sudo paccache -vrk 2 || return 0

Last edited by graysky (2016-03-21 23:06:46)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2016-03-21 23:25:08

atomicbeef
Member
Registered: 2015-09-30
Posts: 98

Re: Can not start bleachbit from terminal

I don't actually use bleachbit, but if I ever find myself doing so, I'll check out your package.

Offline

Board footer

Powered by FluxBB