Development libraries usually don't show up very well in the software center. Usually using apt-cache search will help here. So for example:
apt-cache search python gobject
Will show you all the packages related to python and gobject introspection. Here is a snippet of the results:
python-gi - Python 2.x bindings for gobject-introspection libraries
This means the program you are running is looking for a particular python library called pygtk, which allows your program to have a gui. So, to let the program work, you need to install pygtk:
sudo apt-get install python-gtk2-dev
That should do it.
You can install python-gtk2 manually from 18.04 LTS repository:
sudo apt-get install ./python-gtk2_2.24.0-5.1ubuntu2_amd64.deb
and use it as usual :)
The problem is that you are looking at the PyGTK documentation, but are using PyGI/GTK3 in your script.
The docs on gtk_widget_render_icon() says the following:
gtk_widget_render_icon has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_widget_render_icon_pixbuf() instead.
Then the docs on ...
You can do that stuff with devilspie. Install the devilspie package, and write the following configfile (save as ~/.devilspie/gnome-terminal.ds)
(if (is (window_role) "borderless")
Now you just run devilspie when you log in (e.g. by adding it to startup applications), then ...
This is a tricky one, I had a similar problem, when trying to have only a ncurses based interface on a time tracker pc, the problem for me was that when no window manager is present, normal X Window applications behave oddly.
Here's my proposal:
Install ratpoison window manager sudo apt-get install ratpoison
Unbind keyboards that shows a menu or allows ...
Using the function list_icons():
for icon in icons:
if 'usb' in icon:
and the output:
Now take your pic
You can get the contents of a TextBuffer using get_text():
start_iter = self.textbuffer.get_start_iter()
end_iter = self.textbuffer.get_end_iter()
text = self.textbuffer.get_text(start_iter, end_iter, True)
And save it like any other text file:
with open(save_file, 'w') as f:
I suggest that you ...
python packages installed system-wide may not be available for python versions installed in anaconda directories.
Try instead to load your script using the full path to the system interpreter:
Python 3.4.0 (default, Apr 11 2014, 13:05:11)
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
Use the GObject introspection based Python3 bindings for Gtk and friends:
from gi.repository import Gtk, GObject
That needs the package python3-gi which is installed by default.
Some names have changed since PyGTK. The Python GObject Introspection API Reference should help you to find the new names (and other changes).
Threads and GTK don't always play nice together. There are a few tricks that help, but don't be surprised to have weird bugs. I recently removed all threads from an application and it feels much better.
So, the first thing you should think about is whether you can rewrite your application to take advantage of the GLib async methods.
If you insist on having ...
The problem with this segmentation fault is in Kazam hotkeys bindings.
Maybe the system cannot give some keybingings to Kazam, thus we get an exception.
The rough solution is to remove Kazam’s global keybingings:
Open the file:
Find these strings (about line 100 or so):
This line is your problem. When the window is destroyed, you're calling a quit method. When you close the window, it gets destroyed, thus resulting in your quit method being called.
Also, you don't want to call sys.exit(0) to exit a GTK+ application. You want to use Gtk.main_quit() instead. It would also be a ...
Using time.sleep() is not a good idea when you are using gtk. You could try use a timer event. (I don't use quickly anymore but this should work i think.)
from gi.repository import GLib
self.per = int()
EDIT Here's the correct function to use:
here's an example that generates a list of all bolded words:
start = self.textbuffer.get_start_iter()
Yes it's possible.
No it's probably not worth it for redistribution.
If you did manually update your pygi+webkit you would have to shove that in a ppa and depend on your own packaged version of WebKit in order to "send" the functionality to other users.
You would run the risk of breaking other things that depend on the current version in repo, which ...
Your /opt/gnome directory is not writable by you. either chmod 777 /opt/gnome/ -R or better yet, configure jhbuild to run from your home directory.
If you followed those directions exactly jhbuild would be running as a normal user not as root.
Here's a simple example:
from gi.repository import Gtk
liststore = Gtk.ListStore(str)
for match in ["test1", "test2", "test3", "spam", "foo", "eggs", "bar"]:
The sound indicator in Ubuntu has sliders for the volume and I wondered how that is possible. After a look in the code it seems there are GtkMenus which can be filled via dbus meanwhile:
But I don't know how to use them.
Wanted to write a sound indicator where I can control the ...
Another way that I use personally is apt-file
sudo apt-get install apt-file
Now you can search the packages for the missing files, eg:
% apt-file search /usr/include/sasl/sasl.h
sudo apt-get install libsasl2-dev
Or another example
% apt-file search /usr/bin/cups-config
How can i add an icon to the status bar using python ? like the skype
It is called 'app indicator' not status bar icon, use the command
quickly add indicator for it
and is it possible to use the default notifications like those that
appear when connecting or disconnecting to a wifi ?
It is notify-osd,here is the guide for it
If you know the name of your process, grep against ps to get the PID (process ID). Example: If I wanted to stop shotwell, I would do this (from a terminal session):
$ ps -ef | grep shotwell
xaap001 1779 1139 8 08:08 ? 00:00:01 shotwell
xaap001 1792 1703 0 08:08 pts/1 00:00:00 grep --color=auto shotwell
The first process listed is the one ...