Only figured this out yesterday:
pinentry, which is used to safely enter a password on Linux, has several frontends. There’s a GTK one, a Qt one, even an ncurses one, and so on.
GnuPG also uses pinentry. And you can configure your frontend of choice here in gpg-agent.conf.
But what happens when you don’t configure it? What’s the default?
Turns out, pinentry is a shellscript wrapper and it’s not even that long. Here it is in full:
#!/bin/bash
# Run user-defined and site-defined pre-exec hooks.
[[ -r "${XDG_CONFIG_HOME:-$HOME/.config}"/pinentry/preexec ]] && \
. "${XDG_CONFIG_HOME:-$HOME/.config}"/pinentry/preexec
[[ -r /etc/pinentry/preexec ]] && . /etc/pinentry/preexec
# Guess preferred backend based on environment.
backends=(curses tty)
if [[ -n "$DISPLAY" || -n "$WAYLAND_DISPLAY" ]]; then
case "$XDG_CURRENT_DESKTOP" in
KDE|LXQT|LXQt)
backends=(qt qt5 gnome3 gtk curses tty)
;;
*)
backends=(gnome3 gtk qt qt5 curses tty)
;;
esac
fi
for backend in "${backends[@]}"
do
lddout=$(ldd "/usr/bin/pinentry-$backend" 2>/dev/null) || continue
[[ "$lddout" == *'not found'* ]] && continue
exec "/usr/bin/pinentry-$backend" "$@"
done
exit 1
Preexec, okay, then some auto-detection to use a toolkit matching your desktop environment …
… and then it invokes ldd? To find out if all the required libraries are installed for the auto-detected frontend?
Oof. I was sitting here wondering why it would use pinentry-gtk on one machine and pinentry-gnome3 on another, when both machines had the exact same configs. Yeah, but different libraries were installed. One machine was missing gcr, which is needed for pinentry-gnome3, so that machine (and that one alone) spawned pinentry-gtk …
Email Forwarding Broken on iCloud
I have been getting occasional bounces from an iCloud+ Custom Domain email filter I have, which forwards certain emails I receive to wife. The first one I got looked like this:
<wife.email@mydomain.com>: host mx01.mail.icloud.com[17.57.156.30] said: 554 5.7.1
[HM07] Message rejected due to local policy. Please visit
https://support.apple.com/en-us/HT204137 (in reply to end of DATA command)
I sent an email to t … ⌘ Read more
🧮 USERS:1 FEEDS:2 TWTS:1410 ARCHIVED:88550 CACHE:2546 FOLLOWERS:22 FOLLOWING:14
@movq@www.uninformativ.de I fully agree with you on https://www.uninformativ.de/blog/postings/2025-07-22/0/POSTING-en.html!
Although, in the first screenshot, the window title background is much darker in the new version than the old one!1!1 :-P Kidding aside, the contrast in the old one is still better.
Also, note the missing underlines for the Alt hotkeys now. I just think that the underline in the old one is too thick.
🧮 USERS:1 FEEDS:2 TWTS:1409 ARCHIVED:88527 CACHE:2536 FOLLOWERS:22 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:1408 ARCHIVED:88520 CACHE:2530 FOLLOWERS:22 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:1407 ARCHIVED:88509 CACHE:2521 FOLLOWERS:22 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:1406 ARCHIVED:88503 CACHE:2547 FOLLOWERS:22 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:1405 ARCHIVED:88497 CACHE:2550 FOLLOWERS:22 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:1404 ARCHIVED:88485 CACHE:2544 FOLLOWERS:22 FOLLOWING:14
Go at american express today
1 points posted by madflojo ⌘ Read more
MCP 規範完整中譯稿:2025-3-26 版
【引】儘管 AI 可以幫助我們順利地理解 MCP 規範,但一份完整的 MCP 規範中譯稿還是有意義的,可以進一步幫助我們理解 MCP 規範的來龍去脈,以及協議中細節的方方面面。如果希望希望極簡入門的話, 可以閱讀老碼農的新作——1. 規範模型上下文協議 (Model Context Protocol,MCP) 是一個開放的協議,支持 LLM 應用程序與外部數據源和工具之間的無縫集成。無論是構建基於 ⌘ Read more
如何優雅的使用 GORM 進行分頁?
GORM[1] 是 Go 中使用最廣泛的 ORM 包,但儘管如此,它缺少一些 “基本” 功能。其中一個缺失的功能就是分頁(Pagination)。分頁是管理應用程序中大型數據集的一個重要功能。它是一種限制和顯示數據庫中部分總數據的方法,這樣就不需要一次性檢索整個表,這樣可以極大的提高接口性能,降低超時失敗的概率。雖然 GORM 提供了關於如何使用 scopes[2] 進行分頁的文檔,但在靈活性和可 ⌘ Read more
如何優雅的使用 GORM 進行分頁?
GORM[1] 是 Go 中使用最廣泛的 ORM 包,但儘管如此,它缺少一些 “基本” 功能。其中一個缺失的功能就是分頁(Pagination)。分頁是管理應用程序中大型數據集的一個重要功能。它是一種限制和顯示數據庫中部分總數據的方法,這樣就不需要一次性檢索整個表,這樣可以極大的提高接口性能,降低超時失敗的概率。雖然 GORM 提供了關於如何使用 scopes[2] 進行分頁的文檔,但在靈活性和可 ⌘ Read more
多模態 RAG 的關鍵技術
構建一個成熟的多模態 RAG 系統,需要了解一些無縫處理圖像、文本和結構化數據的關鍵技術,包含 CLIP(對比語言 - 圖像預訓練)、多模態提示和工具調用等。1.CLIP 嵌入CLIP 的全稱是 Contrastive Language–Image Pretraining,是 OpenAI 開發的一種模型,爲文本和圖像創建了一個共享的表示空間。核心方法是通過對比學習(Contrastive Lea ⌘ Read more
🧮 USERS:1 FEEDS:2 TWTS:1403 ARCHIVED:88482 CACHE:2542 FOLLOWERS:22 FOLLOWING:14
Langchain 構建一個智能體程序的六步曲
摘要:學習如何構建一個智能體程序 - 從選擇真實的任務示例,到構建 MVP,再到測試質量和安全性,最終部署到生產環境中。Langchain 2025 年 7 月 9 日。1 前言儘管似乎每家公司都在談論今年要構建智能體,但實際上這樣做的公司卻很少。讓想象力奔放地展開,想象智能體如何可以改變你的業務是很容易的,但許多團隊不確定從哪裏開始、如何取得進展以及如何設定期望。在這個指南中,我們將介紹一個從想 ⌘ Read more
Go 無侵入實現讀寫分離
在高併發的現代應用中,數據庫往往成爲系統的瓶頸。讀寫分離作爲一種有效的數據庫優化策略,能夠顯著提升系統的性能和可用性。本文將深入講解讀寫分離的核心概念、實現原理,並通過 go-zero 框架提供詳細的實戰示例。讀寫分離的使用場景和必要性—————-1.1 什麼是讀寫分離讀寫分離是一種數據庫架構模式,它將數據庫操作分爲兩類:• 寫操作:INSERT、UPDATE、DELETE 等 ⌘ Read more
Go 無侵入實現讀寫分離
在高併發的現代應用中,數據庫往往成爲系統的瓶頸。讀寫分離作爲一種有效的數據庫優化策略,能夠顯著提升系統的性能和可用性。本文將深入講解讀寫分離的核心概念、實現原理,並通過 go-zero 框架提供詳細的實戰示例。讀寫分離的使用場景和必要性—————-1.1 什麼是讀寫分離讀寫分離是一種數據庫架構模式,它將數據庫操作分爲兩類:• 寫操作:INSERT、UPDATE、DELETE 等 ⌘ Read more
🧮 USERS:1 FEEDS:2 TWTS:1402 ARCHIVED:88477 CACHE:2562 FOLLOWERS:22 FOLLOWING:14
基於 Dify 的 RAG 知識庫搭建
Dify 是一款開源的大模型應用開發平臺,旨在幫助開發者快速構建生產級生成式 AI 應用。在 Dify 本地化部署中,知識庫功能是實現企業級 AI 應用的核心能力。本文介紹基於版本 1.5.1 搭建知識庫全流程解析,包括以下內容:Dify 基本概念Dify 本地部署基於 Dify 的知識庫搭建一、Dify 基本概念Dify 是一款開源的大模型應用開發平臺,旨在幫助開發者快速構建生產級生成式 AI ⌘ Read more
🧮 USERS:1 FEEDS:2 TWTS:1401 ARCHIVED:88472 CACHE:2558 FOLLOWERS:22 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:1400 ARCHIVED:88470 CACHE:2557 FOLLOWERS:22 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:1399 ARCHIVED:88461 CACHE:2553 FOLLOWERS:22 FOLLOWING:14
The WM_CLASS Property is used on X11 to assign rules to certain windows, e.g. “this is a GIMP window, it should appear on workspace number 16.” It consists of two fields, name and class.
Wayland (or rather, the XDG shell protocol – core Wayland knows nothing about this) only has a single field called app_id.
When you run X11 programs under Wayland, you use XWayland, which is baked into most compositors. Then you have to deal with all three fields.
Some compositors map name to app_id, others map class to app_id, and even others directly expose the original name and class.
Apparently, there is no consensus.
Spare a thought for this gopher gopher://sdf.org/1/users/xiled/phlog/2025/20250710_occupied
一文帶你讀懂 Google LangGraph 項目,快速入門 AI Agent 全棧開發
一、項目背景與目標———最近在帶着同事一起做智能 Agent 相關的內部項目,發現很多人對 LangGraph 非常感興趣,但又不太清楚如何從零開始搭建一個完整的 AI Agent,我於是在 github 上找,看看有沒有好的開源項目給他們學習,偶然間發現了 google-gemini 開源的這個項目 [1],正好拿來給他們講講,學習學習。發現整理的材料又正好可以出一期公衆號文章,就作 ⌘ Read more
🧮 USERS:1 FEEDS:2 TWTS:1398 ARCHIVED:88454 CACHE:2548 FOLLOWERS:22 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:1397 ARCHIVED:88446 CACHE:2562 FOLLOWERS:22 FOLLOWING:14
從被噴 “假開源” 到登頂 GitHub 熱榜,RustFS 開源項目上演王者歸來!
故事的序幕,在 2024 年 1 月的 GitHub 上悄然拉開。當時,一個名爲 RustFS 的開源項目橫空出世,號稱要做一個基於 Rust 的企業級分佈式存儲系統,旨在成爲 MinIO 的一個開源替代品。這個口號直接把大家吊成了 “翹嘴”,但左等右等,結果一年了還只有一份 README 文件,就是不見源碼。一時間,開源社區質疑聲四起:“假開源”、“PPT 開源”、“光說不練”。面對壓力,Rus ⌘ Read more
🧮 USERS:1 FEEDS:2 TWTS:1396 ARCHIVED:88443 CACHE:2565 FOLLOWERS:22 FOLLOWING:14
@movq@www.uninformativ.de Yeah, it’s a shitshow. MS overconfirms all my prejudices constantly.
Ignoring e-mail after lunch works great, though. :-)
Our timetracking is offline for over a week because of reasons. The responsible bunglers are falling by the skin of their teeth: ![]()
- The error message neither includes the timeframe nor a link to an announcement article.
- The HTML page needs to download JS in order to display the fucking error message.
- Proper HTTP status codes are clearly only for big losers.
- Despite being down, heaps of resources are still fetched.
I find it really fascinating how one can screw up on so many levels. This is developed inhouse, I’m just so glad that we’re not a software engineering company. Oh wait. How embarrassing.
🧮 USERS:1 FEEDS:2 TWTS:1395 ARCHIVED:88418 CACHE:2541 FOLLOWERS:22 FOLLOWING:14
The Linux installation on my main PC turned 14 today:
$ head -n 1 /var/log/pacman.log
[2011-07-07 11:19] installed filesystem (2011.04-1)
Hiring: Senior Backend Engineer | Remote | A new challenge awaits!
Supported Countries:
- India
- Philippines
- Singapore
- Argentina
- Brazil
- UK
- Ireland
- USA
- Canada
1 points posted by Fabio Chapola ⌘ Read more
golang 反射 new?
今天來聊一個在 Golang 裏新手容易踩坑但高級用法又很關鍵的點:反射 + reflect.New。看上去很底層,實際在做框架開發、泛型模擬、動態構造對象的時候,全靠它撐場子!我前段時間折騰一個插件系統(Go 寫的),要從字符串配置動態構造 struct 對象實例,就必須用 reflect.New。這塊調試了好一陣,今天把經驗和注意事項總結一下,走一波實戰向的乾貨分享。1)reflect.New ⌘ Read more
🧮 USERS:1 FEEDS:2 TWTS:1394 ARCHIVED:88409 CACHE:2543 FOLLOWERS:22 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:1393 ARCHIVED:88408 CACHE:2543 FOLLOWERS:22 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:1392 ARCHIVED:88401 CACHE:2539 FOLLOWERS:22 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:1391 ARCHIVED:88396 CACHE:2535 FOLLOWERS:22 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:1390 ARCHIVED:87839 CACHE:2584 FOLLOWERS:22 FOLLOWING:14
Fsets a useful pattern for testing
1 points posted by John Doak ⌘ Read more
🧮 USERS:1 FEEDS:2 TWTS:1389 ARCHIVED:87827 CACHE:2584 FOLLOWERS:22 FOLLOWING:14
基於泛型的輕量級依賴注入庫 do
在 Go 語言的開發實踐中,我們經常需要處理各種依賴關係,例如,一個 service 層可能依賴一個或多個 repository 層。如何優雅地管理這些依賴,是我們在項目開發中需要重點關注的問題。一個好的依賴管理方案,可以顯著提高代碼的可讀性、可維護性和可測試性。今天,我們就來介紹一個 Go 語言生態中非常受歡迎的輕量級依賴注入庫:samber/do。它基於 Go 1.18+ 的泛型特性,實現了一 ⌘ Read more
🧮 USERS:1 FEEDS:2 TWTS:1388 ARCHIVED:87820 CACHE:2603 FOLLOWERS:22 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:1387 ARCHIVED:87814 CACHE:2599 FOLLOWERS:22 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:1386 ARCHIVED:87795 CACHE:2602 FOLLOWERS:22 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:1385 ARCHIVED:87790 CACHE:2604 FOLLOWERS:22 FOLLOWING:14
Go 語言延遲初始化 -Lazy Initialization- 最佳實踐
簡介—–在有些資源初始化成本很高,甚至在某些代碼路徑未觸發根本沒有必要初始化,可以將對象的創建、配置等耗時操作推遲到真正需要使用時才執行。延遲初始化實現———-2.1 sync.Oncesync.Once 是 Go 標準庫提供的線程安全初始化工具,確保初始化代碼只執行一次:var ( resource MyResource // 需要延遲初始化的資源 once ⌘ Read more
🧮 USERS:1 FEEDS:2 TWTS:1384 ARCHIVED:87784 CACHE:2673 FOLLOWERS:22 FOLLOWING:14