Help with hacking Nautilus
- From: "Bogdan Butnaru" <bogdanb gmail com>
- To: nautilus-list gnome org
- Subject: Help with hacking Nautilus
- Date: Sun, 21 Oct 2007 04:51:18 +0200
Hello!
I'd like to do a bit of hacking on Nautilus, starting with a few small
tweaks to the way icons are displayed. I found my way pretty easily to
what I need to change, but it seems that the changes I make aren't
working, and now I'm stuck at debugging.
I looked for a good half day on Google for info on how to make things
easier, but all I could find was a couple of old posts on this list
(from 2000 and 2004), and a few dead links on the Gnome sites. I was
hoping some of the developers could help with some hints of how they
do things.
What I did was get a copy of the source (from the Ubuntu Gutsy
repositories, since I want to stay close to the distro I use), make a
few changes and compile it. I don't want to replace my normal
Nautilus, so I tried running it with "export NAUTILUS_DEBUG; killall
-9 nautilus && src/nautilus". This starts nautilus, though I'm not
convinced it actually uses the changes I made (since they don't seem
to take effect). So then I tried debugging it, but:
1) I can't figure out how to convince Nautilus to stay attached to the
console, so that I can see printf's.
2) I can't quite figure out how to debug it with gdb. One of the posts
I mentioned above said that (a) I can run Nautilus with
"src/nautilus", and (b) that I can debug it with "gdb nautilus".
However, if I do step (b) I end up debugging my distro's nautilus, and
if I do (a) I can't figure out how to load all debugging symbols.
The best I could do was add the -g and -O0 flags to the linker and
compiler, then run nautilus with "src/nautilus" and attach the
debugger with "gdb nautilus pid". This gives me no symbols, though
(backtrace has no function names). I tried using gdb's "symbol-file"
command, but I'm not sure what to add; every attempt left lots of
functions unnamed on the backtrace, and breakpoints I set on some
functions didn't work, so I don't think I loaded the correct files.
So, can anyone give me some updated instructions for hacking Nautilus
and running/debugging it without replacing the distro's installed
version?
-- Bogdan Butnaru — bogdanb gmail com
"I think I am a fallen star, I should wish on myself." – O.
PS. If anyone's interested, I was trying to make the icons' labels
wider in "text-beside-icons" mode, by increasing MAX_TEXT_WIDTH_BESIDE
in libnautilus-private/nautilus-icon-canvas-item.c. It doesn't seem to
work.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]