SOLVED ... Installing pix from source

Questions about applications and software
Forum rules
Before you post please read how to get help
Post Reply
iain_33
Level 3
Level 3
Posts: 147
Joined: Sat Dec 22, 2018 11:29 am
Location: UK

SOLVED ... Installing pix from source

Post by iain_33 »

I've been using geeqie as a picture browser for a while, but I prefer the interface of pix, except I don't like the scroll wheel behaviour - mouse scrolling zooms images / ctrl+scroll navigates back & forwards - but I'd rather have it the other way, as geeqie does (scroll navigates / ctrl+scroll zooms).

So - I'm having my first go at downloading the source, altering it and compiling / installing.

I found the source for pix on github, used git clone to download it, and (I think) I've made the changes to swap the scroll behaviour.

But now I'm stuck on the compiling - or more specifically, the dependencies. The README tells me:

Code: Select all

Compiling
=========

  In order to build this program you need a working GNOME environment
  version 2 or greater, with the development tools installed properly.
  The following is the detailed list of libraries you need:

	* glib	 		version >= 2.16.0
	* gtk 			version >= 2.18.0
	* gthread
 	* gmodule
	* gio-unix
	* intltool		version >= 0.35.0
	* unique		version >= 1.1.2
I got stuck at the first one. After some searching I found the glib package is to be found at libglib. apt search libglib brings back 32 results:

Code: Select all

i   libglib-object-introspection-perl           - Perl bindings for gobject-introspection libraries    
p   libglib-object-introspection-perl:i386      - Perl bindings for gobject-introspection libraries    
i   libglib-perl                                - interface to the GLib and GObject libraries          
p   libglib-perl:i386                           - interface to the GLib and GObject libraries          
i   libglib2.0-0                                - GLib library of C routines                           
i A libglib2.0-0:i386                           - GLib library of C routines                           
i   libglib2.0-bin                              - Programs for the GLib library                        
p   libglib2.0-bin:i386                         - Programs for the GLib library                        
p   libglib2.0-cil                              - CLI binding for the GLib utility library 2.12        
p   libglib2.0-cil:i386                         - CLI binding for the GLib utility library 2.12        
p   libglib2.0-cil-dev                          - CLI binding for the GLib utility library 2.12        
p   libglib2.0-cil-dev:i386                     - CLI binding for the GLib utility library 2.12        
i   libglib2.0-data                             - Common files for GLib library                        
v   libglib2.0-data:i386                        -                                                      
p   libglib2.0-dev                              - Development files for the GLib library               
p   libglib2.0-dev:i386                         - Development files for the GLib library               
p   libglib2.0-dev-bin                          - Development utilities for the GLib library           
p   libglib2.0-dev-bin:i386                     - Development utilities for the GLib library           
p   libglib2.0-doc                              - Documentation files for the GLib library             
v   libglib2.0-doc:i386                         -                                                      
p   libglib2.0-tests                            - GLib library of C routines - installed tests         
p   libglib2.0-tests:i386                       - GLib library of C routines - installed tests         
p   libglib3.0-cil                              - CLI binding for the GLib library of C routines       
p   libglib3.0-cil:i386                         - CLI binding for the GLib library of C routines       
p   libglib3.0-cil-dev                          - CLI binding for the GLib utility library 2.12        
p   libglib3.0-cil-dev:i386                     - CLI binding for the GLib utility library 2.12        
i   libglibmm-2.4-1v5                           - C++ wrapper for the GLib toolkit (shared libraries)  
p   libglibmm-2.4-1v5:i386                      - C++ wrapper for the GLib toolkit (shared libraries)  
p   libglibmm-2.4-dev                           - C++ wrapper for the GLib toolkit (development files) 
p   libglibmm-2.4-dev:i386                      - C++ wrapper for the GLib toolkit (development files) 
p   libglibmm-2.4-doc                           - C++ wrapper for the GLib toolkit (documentation)     
v   libglibmm-2.4-doc:i386                      -       
I guess I would ignore the libgib2.0 ones, given the readme says I need version >= 2.16.0, but which of the rest do I choose?

Moving on, apt search libgtk brings back 199 results, and apt search gthread finds nothing at all.

So, I'm stuck on the first few mandatory dependencies, not to mention the rest of them, and then the "not mandatory but useful" ones and then the "optional" ones... :?
Last edited by iain_33 on Sun Jun 21, 2020 4:56 pm, edited 1 time in total.
Linux Mint 19.3 Cinnamon on Lenovo Legion Y540 laptop (2020)
Linux Mint 19.3 Mate on HP G70 laptop (2009)
User avatar
smurphos
Level 17
Level 17
Posts: 7332
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: Installing pix from source

Post by smurphos »

Hi iain_33,

See viewtopic.php?p=1766767#p1766767 for the general steps needed in an 'easy' way to get the source-code, install dependencies, modify and re-compile any application available from the regular repos. The post is specific to making a minor change to nemo, but the basic steps should be the same for pix,
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
iain_33
Level 3
Level 3
Posts: 147
Joined: Sat Dec 22, 2018 11:29 am
Location: UK

Re: SOLVED ... Installing pix from source

Post by iain_33 »

Thanks Smurphos - and surprisingly my changes to the source worked first time 8)

A minor tweak this may be, but now I've learnt how to do it who knows what else I can get my hands on and change... really appreciating the "freedom" thing of Linux. I couldn't imagine taking some of the built-in apps on Windows, deciding "I'd like it better if it did this..." and being able to alter it so easily.

What happens with apps I've built from source when it comes to updates? Will updates overwrite my changes, or will I be "stuck" with the version I've just compiled?
Linux Mint 19.3 Cinnamon on Lenovo Legion Y540 laptop (2020)
Linux Mint 19.3 Mate on HP G70 laptop (2009)
iain_33
Level 3
Level 3
Posts: 147
Joined: Sat Dec 22, 2018 11:29 am
Location: UK

Re: SOLVED ... Installing pix from source

Post by iain_33 »

For anyone who's interested - how to change the ctrl / scroll wheel behaviour

- Download the source as per Smurphos' link

- Open the file gth-browser.c

- Search for the function gth_browser_viewer_scroll_event_cb (on the version I've got - pix-2.4.6+tricia, it's line 5311)

- Change the line if (event->state & GDK_CONTROL_MASK) { to if (!(event->state & GDK_CONTROL_MASK)) {

- Save and close

- Open the filegth-image-viewer.c

- Search for the function gth_image_viewer_scroll_event (on mine, line 979)

- Change the line if (event->state & GDK_CONTROL_MASK) { to if (!(event->state & GDK_CONTROL_MASK)) {

- Save and close

- Recompile as per Smurphos' linked post
Linux Mint 19.3 Cinnamon on Lenovo Legion Y540 laptop (2020)
Linux Mint 19.3 Mate on HP G70 laptop (2009)
User avatar
absque fenestris
Level 9
Level 9
Posts: 2662
Joined: Sat Nov 12, 2016 8:42 pm
Location: Confoederatio Helvetica

Re: SOLVED ... Installing pix from source

Post by absque fenestris »

Hi iain

Thanks for sharing your software customization. I can empathize with you: it's such small but essential details that make a pleasant workflow possible ...

btw: does anyone know if Mirage has definitely died?
Linux Mint 18.3 Sylvia (MATE) 32-bit - Acer D250 Netbook
Linux Mint 20 Ulyana (Cinnamon) 64-bit - Huawei MateBook X Pro
Post Reply

Return to “Software & Applications”