You are not logged in.
Pages: 1
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
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
I suggest that you look into the command line interface of bleachbit.
The AUR has a lighter cli-only bleachbit (maintained by me ): 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 packages • Zsh and other configs
Offline
I don't actually use bleachbit, but if I ever find myself doing so, I'll check out your package.
Offline
Pages: 1