You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在17.10下从源码编译Geany并启用--enable-gtk3参数?

Fixing Geany HDPI Icon Issues & Compiling from Source on Ubuntu 17.10

Hey there, I’ve dealt with similar HDPI scaling headaches with Geany before, so let’s walk through solving your missing configure file issue first, then cover the full compilation steps for Ubuntu 17.10.

Why You’re Missing the configure File

When you clone Geany’s source from GitHub, you’re getting the raw, unprocessed repository—the configure script isn’t pre-generated. You need to create it yourself using the autotools you already installed (automake, autoconf, etc.).

Step 1: Generate the configure Script

Navigate to your Geany source directory in the terminal, then run this command:

autoreconf -vfi

Let me break this down:

  • -v: Verbose output so you can see exactly what’s happening
  • -f: Force overwrite any existing autotools files to avoid conflicts
  • -i: Install missing auxiliary files (like install-sh) that the build process needs

After this runs, you should see the configure executable appear in your source folder.

Step 2: Full Compilation Steps for Ubuntu 17.10

First, make sure you have all required dependencies installed (you might already have some, but it’s safe to run this):

sudo apt-get install build-essential automake autoconf libtool intltool libgtk-3-dev libglib2.0-dev libpango1.0-dev libcairo2-dev libgdk-pixbuf2.0-dev libvte-2.91-dev pkg-config

Once dependencies are set and you’ve generated configure, proceed with these steps:

  1. Configure the build:

    ./configure --prefix=/usr/local
    

    Using /usr/local ensures your compiled Geany doesn’t overwrite the system’s default version (if you have it installed). You can add flags like --enable-debug if you want debug symbols, but it’s not necessary for normal use.

  2. Compile the source:

    make -j$(nproc)
    

    The -j$(nproc) flag uses all your CPU cores to speed up compilation significantly.

  3. Install Geany:

    sudo make install
    

Even after compiling, you might need to tell GTK to scale properly for your HDPI screen. Here’s how:

  • Temporary fix (current session only):

    export GDK_SCALE=2
    

    Launch Geany from this terminal window to see the scaled UI immediately.

  • Permanent fix:
    Create or edit the file ~/.config/gtk-3.0/settings.ini and add these lines:

    [Settings]
    gtk-scaling-factor=2
    

    Adjust the number (1.5 works well for some screens too) based on your display’s exact DPI.

Troubleshooting Tips

  • If autoreconf throws errors, double-check that all autotools packages are installed correctly (automake, autoconf, libtool, intltool).
  • If configure fails with missing dependencies, the error message will explicitly name the package you need—install it and re-run ./configure.

内容的提问来源于stack exchange,提问作者Enterprise

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 08:32:06