Xfce Wiki

Sub domains
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
thunar:dev:build_and_run [2025/01/19 09:08] alexxconsthunar:dev:build_and_run [2025/08/17 20:06] (current) – [Thunar - build, test, and debugging suggestions] alexxcons
Line 16: Line 16:
   git clone https://gitlab.xfce.org/xfce/thunar   git clone https://gitlab.xfce.org/xfce/thunar
    
-Enter build folder:+Enter the cloned folder:
   cd thunar   cd thunar
  
-Execute autogen (required packages: build-essential, automake, gobject-introspection): +Execute meson (required packages: meson, gobject-introspection): 
-  ./autogen.sh+  meson setup build
      
-If any dependencies are missing, autogen will tell you. Depending on your distribution, installing the "dev" version of the dependent packages might be sufficient. (e.g. package: libexo-2-dev, libxfce4ui-2-dev, ... (naming might differ between distributions)) +If any dependencies are missing, meson will tell you. Depending on your distribution, installing the "dev" version of the dependent packages might be sufficient. (e.g. package: libxfc4eutil-2-dev, libxfce4ui-2-dev, ... (naming might differ between distributions)) 
-If that does not help, you will need to build and install the dependencies from source as well.+If that does not help, you will need to build and install the dependencies from source as well. (You might need to run "sudo /sbin/ldconfig -v" after installing shared libaries from source)
  
 When autogen has finished successfully (all required dependencies have been installed), you can build thunar: When autogen has finished successfully (all required dependencies have been installed), you can build thunar:
-  make+  meson compile -C build
  
-For testing only thunar itself, you don't need to install it. You can run it directly from the source folder. (Though if you want to test thunar plugins, you will need to install) +For testing only thunar itself, you don't need to install it. You can run it directly from the source folder. (Though if you want to test thunar plugins, you will need to install):
-Here is my personal script for starting thunar from source:+
  
-  #!/bin/bash +  build/thunar/thunar -q;G_MESSAGES_DEBUG=all build/thunar/thunar
-   +
-  # Quit any running thunar instance and start a new thunar from source. Enable debug messages +
-  THUNAR_TEST_FOLDER=/path/to/thunar/testing/folder +
-  echo "./thunar/thunar -q;./thunar/thunar $THUNAR_TEST_FOLDER" +
-  ./thunar/thunar -q;G_MESSAGES_DEBUG=all ./thunar/thunar $THUNAR_TEST_FOLDER+
  
 Here a workaround to as well test thunar plugin changes (thunar-sbr in this example) without the need to install thunar: Here a workaround to as well test thunar plugin changes (thunar-sbr in this example) without the need to install thunar:
  
-  ./autogen.sh --with-custom-thunarx-dirs-enabled +  meson compile -C build -Dthunarx-dirs-envvar=true
-  make+
   THUNARX_DIRS=~/git/thunar/plugins/thunar-sbr/.libs ./thunar/thunar   THUNARX_DIRS=~/git/thunar/plugins/thunar-sbr/.libs ./thunar/thunar
  
Line 48: Line 41:
 === Debugging Thunar === === Debugging Thunar ===
  
-For debugging Thunar, I use the following:+For debugging Thunar, I use:
  
-  #!/bin/bash +  build/thunar/thunar -q; gdb --args build/thunar/thunar 
-  echo "./thunar/thunar -q; gdb thunar/.libs/thunar" + 
-  ./thunar/thunar -q; gdb thunar/.libs/thunar+Usually a good idea to bail out on the first warning: 
 + 
 +  build/thunar/thunar -q; gdb --args build/thunar/thunar --g-fatal-warnings
  
 On a freeze, get a backtrace of all threads via On a freeze, get a backtrace of all threads via
Line 61: Line 56:
  
 You can install Thunar with: You can install Thunar with:
-  sudo make install+  meson install -C build
  
 Note that, per default, Thunar will be installed in parallel to the Thunar of your distribution, into the "/usr" folder. Note that, per default, Thunar will be installed in parallel to the Thunar of your distribution, into the "/usr" folder.
 You can uninstall it with: You can uninstall it with:
-  sudo make uninstall +  cd build && ninja uninstall
-   +
-For more infoormation, check the INSTALL file in the source code!+
  
 === Thunar Build Flags === === Thunar Build Flags ===
-Here is a small collection of useful flags which can be passed to ''./autogen.sh'' :+Here is a small collection of useful flags which can be passed to ''meson setup'' : 
 + 
 +<code>
  
-<code>--enable-gtk-doc : Creates html documentation inside /doc/reference/thunarx/html +-Dgtk-doc=true : Creates html documentation inside /doc/reference/thunarx/html 
---enable-introspection : for usage of the GtkInspector +-Dintrospection=true 
---prefix <install_dir>: install thunar to install_dir +--buildtype=debug|release|plain</code>
---enable-maintainer-mode +
---enable-debug=full|yes|minimum|no</code>+
  
-Some flags need to be passed to the thunar binary: +A full list can be found herehttps://gitlab.xfce.org/xfce/thunar/-/blob/master/meson_options.txt?ref_type=heads
-<code>--g-fatal-warnings Lets thunar crash an any warning/errorUseful to get a backtrace locate a warning/error/critical</code>+
  
-You might want to run that via gdb to get a backtrace: 
-<code>gdb --args thunar/.libs/thunar --g-fatal-warnings</code> 
 [[|Back To Top]] [[|Back To Top]]
 ---- ----
 [[ https://docs.xfce.org/xfce/thunar/start|Return to Main thunar documentation page]] [[ https://docs.xfce.org/xfce/thunar/start|Return to Main thunar documentation page]]