Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions app/src/Tunnel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2887,8 +2887,21 @@ DnsHostProbe ProbeDnsHost() {
(!p.resolvconf_present ? "absent"
: (p.resolvconf_is_resolvectl ? "is resolvectl's shim"
: "present")) +
", " + kResolvConfPath + " -> " +
(p.resolv_conf_realpath.empty() ? std::string("(missing)") : p.resolv_conf_realpath) +
", " + kResolvConfPath +
// ONLY render the arrow when the path actually resolves somewhere ELSE.
// On Arch/CachyOS /etc/resolv.conf is commonly a REGULAR FILE that
// systemd-resolved writes in place rather than a symlink into its
// runtime dir, so realpath() returns the path itself and the old
// unconditional " -> " printed
// /etc/resolv.conf -> /etc/resolv.conf (resolved's)
// which reads as a self-referential symlink and sent a tester's log
// triage chasing a misdetection that was not there. The tier
// selection was always correct; only this line was wrong.
(p.resolv_conf_realpath.empty()
? std::string(" missing")
: (p.resolv_conf_realpath == kResolvConfPath
? std::string(" is a regular file")
: " -> " + p.resolv_conf_realpath)) +
(p.resolv_conf_points_at_resolved ? " (resolved's)" : "");
return p;
}
Expand Down
24 changes: 20 additions & 4 deletions app/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ int main(int argc, char** argv) {
// glibmm on core24 (the 2.68 ABI series) has no Glib::get_user_state_dir wrapper;
// call the C g_get_user_state_dir() (glib 2.72+) directly for XDG_STATE_HOME.
const std::string logDir = EnsureDir(g_get_user_state_dir(), "urnetwork");
if (!host->Initialize(storageDir, logDir)) {
g_printerr("failed to initialize SDK\n");
return 1;
}

// Must match the .desktop StartupWMClass + common-id so the shell associates
// the window with the app (and the hide-to-tray window keeps its identity).
Expand All @@ -88,6 +84,26 @@ int main(int argc, char** argv) {
std::shared_ptr<urnw::Tray> tray;

app->signal_startup().connect([&] {
// SDK INIT BELONGS HERE, NOT BEFORE app->run(). GApplication only decides
// primary-vs-remote inside run(), so anything above it executes in EVERY
// launch -- including a duplicate that is about to hand off to the running
// instance and exit. signal_startup is emitted on the PRIMARY only.
//
// That distinction is not cosmetic. SdkHost::Initialize calls
// urnet::setLogDir(), which runs the SDK's glog init: it sweeps the log
// directory down to a keep-N budget and rewrites the
// urnetwork-gui.{INFO,WARNING,ERROR} symlinks. A tester's bundle caught it
// -- a second launch deleted three of the seven log files and left
// urnetwork-gui.INFO, the file any "grab the current log" step follows,
// naming its own 846-byte stub while the session that was actually running
// had a 1.5 MB log the symlink no longer pointed at. Initialize also opens
// the shared storage dir, which a process about to exit has no business
// touching.
if (!host->Initialize(storageDir, logDir)) {
g_printerr("failed to initialize SDK\n");
app->quit();
return;
}
adw_init(); // libadwaita stylesheet + platform integration
// the brand visual system is dark (mac app parity); the Ui.cpp stylesheet
// layers the exact palette on top
Expand Down
Loading