You are not logged in.

#1 2015-12-13 14:23:46

jbodhorn
Member
Registered: 2015-12-11
Posts: 130

gdiskdump

I was attempting to get gdiskdump working in Arch, I compiled it, and fixed the python print errors, but I'm stuck. When I try to run gdiskdump I get the error:

GTK Not Available

I was trying to do what is listed here: https://wiki.archlinux.org/index.php/GTK%2B under the section: Theme not applied to root applications, but I'm not quite sure how to follow through with it. I understood creating a symlink, but I didn't make it right or something. I've deleted the symlinks and tried with a few others but nothing has worked.

This is what the wiki says for a symlink:

ln -s /home/[username]/.gtkrc-2.0 /root/.gtkrc-2.0

I don't have .gtkrc-2.0 in that location, mine is:

/usr/include/gtk-2.0/gtk/gtkrc.h
/usr/include/gtk-3.0/gtk/deprecated/gtkrc.h
/usr/share/gtk-2.0/gtkrc
/usr/share/gtk-doc/html/pygtk/class-gtkrcstyle.html
/usr/share/gtksourceview-3.0/language-specs/gtkrc.lang
/usr/share/themes/Adwaita/gtk-2.0/gtkrc
/usr/share/themes/Default/gtk-2.0-key/gtkrc
/usr/share/themes/Emacs/gtk-2.0-key/gtkrc
/usr/share/themes/HighContrast/gtk-2.0/gtkrc
/usr/share/themes/Raleigh/gtk-2.0/gtkrc

Since I wasn't sure what to do I've I tried making symlinks with

ln -s /usr/share/themes/Adwaita/gtk-2.0/gtkrc /root/.gtkrc-2.0

and

ln -s /usr/share/gtk-2.0/gtkrc /root/.gtkrc-2.0

and

sudo ln -s /home/joe/.config/gtk-2.0 /root/.config/gtk-2.0

Where it says: Configure system-wide theme files:

 
/etc/gtk-3.0/settings.ini

(GTK+ 3) or

/etc/gtk-2.0/gtkrc

(GTK+ 2) once again I don't have

/etc/gtk-2.0/gtkrc

What has to be changed to make the themes system wide?  I've logged in as root and set the theme thinking maybe that would fix this error but it was a no go

The piece of python code that produces the error is this

import sys
try:
    import pygtk
    pygtk.require("2.0")
except:
    pass
try:
    import gtk
except:
    print("GTK Not Available")
    sys.exit(1)

Is there a way to point python to the right path, am I not able to fix this because gtk-2.0 is old and deprecated, have I just been doing it wrong all along?

Offline

#2 2015-12-13 15:28:38

jbodhorn
Member
Registered: 2015-12-11
Posts: 130

Re: gdiskdump

Once I figured out what was going on I recompiled and reinstalled gdiskdump and ended up also having to reinstall python2-notify. Gdiskdump has been trying to start with python3 even though python2 was also installed

I then ran:

sudo python2 /usr/share/gdiskdump/gdiskdump.py

And up came the gui, I haven't played with it yet to make sure it's working right cause I literally just figured this out. Now I just have to figure out how to force gdiskdump to use python2 instead of python3

Offline

#3 2015-12-14 07:13:24

severach
Member
Registered: 2015-05-23
Posts: 198

Re: gdiskdump

gdiskdump is in the AUR archive. All of your questions are answered in PKGBUILD.

When you verify it works, consider adding it to the AUR.

Offline

#4 2015-12-14 16:22:17

jbodhorn
Member
Registered: 2015-12-11
Posts: 130

Re: gdiskdump

I was looking for it in AUR and it didn't come up, I didn't know about the archive though. If it's in the archive it's not maintained, right? I found DDRescue when I was searching for gdiskdump, but I'm kinda set on getting gdiskdump to work.

I'm pretty sure the problem is multiple instances of python being installed, python3 being Arch's default, python2 being what gdiskdump needs to run. I can get the GUI up by running the python script but until I play around with one of the multi-python managers I think I'm kinda stuck. I'm not sure if there is still something wrong with gdiskdump or if it's not running properly due to me running the python script instead of starting in the normal fashion. At select input no hard drives or flash drives are listed but I can browse partitions and files though. It's the same for selecting output, files and partitions but no hard drives.

I might work on managing both python 2 and 3 later today, I hope I can get it to work

Offline

#5 2015-12-14 17:15:52

severach
Member
Registered: 2015-05-23
Posts: 198

Re: gdiskdump

I installed from the AUR archive PKGBUILD and despite a number of mistakes, it works fine.

Offline

#6 2015-12-14 19:43:55

jbodhorn
Member
Registered: 2015-12-11
Posts: 130

Re: gdiskdump

I wiped the gdiskdump install I had best as I could, which was a PIA cause make uninstall had errors and I had to search and remove a bunch of stuff manually... I installed from the AUR archive and it does run, it didn't say there were any errors during the install btw. BUT... When I try to select hard drive for input or output no drives show up. Also, I noticed in the previous install before it was removed that all my partitions sizes are doubled, this is also happening with the AUR install.

If yours works and mine doesn't I'm guessing it's cause I missed removing some files from the previous install, maybe you got errors and I didn't because those files were there. I removed the AUR install with pacman but it seems like it left all the same files behind as make uninstall. I tried to be more thorough removing those files so I could try installing again but there was no difference. I checked the make file to see where everything was going so I could remove it all, but installing again left me with the same result, no drives listed and partition sizes doubled.

Either way thanks, you got me a bit closer to having it working. What I don't get though is that before when I was compiling from source it didn't work, which looking at the PKGBUILD that's what it looks to be doing. So I don't understand why compiling from source got me a different result from the AUR archive install.

How would I go about looking for errors so I can figure out why my drives aren't listed and partition sizes are doubled? My linux knowledge is quite limited, but I'm trying to change that, hopefully I'll be able to figure it out. Thanks again

Offline

#7 2015-12-15 06:42:19

severach
Member
Registered: 2015-05-23
Posts: 198

Re: gdiskdump

Same here. The Harddrive list is empty and the partitions are twice the size. You'll need to learn Python to fix that.

You must be unfamiliar with sed so your eyes pass over hoping it to be unimportant. The package function uses sed to modify the launcher shell script to make it run with python2.

One of the jobs of a PKGBUILD is to adapt the build to the Arch Linux environment, so efficiently that you don't even know it's happening.

You could install Debian or Ubuntu. If the package doesn't work there you can at least file a bug report.

Offline

Board footer

Powered by FluxBB