Thanks for the bug report. I installed the attached somewhat-more-ambitious patch that works along the line that you suggested. Although every heuristic in this area will be wrong sometimes, I think nowadays we're probably better off simply using xdg-open if it's available and if there's a display. It turns out that nohup is ineffective on xdg-open, as xdg-open's child does a 'signal (SIGHUP, SIG_DFL)' before it execs (!). This may help to explain why nobody noticed when Emacs stopped using nohup. Although nohup may have been needed for ancient GNOME versions, I don't think we need to worry about these old GNOME versions in future Emacs releases. I'm closing the bug report as I think the bug is fixed. We can reopen it if I'm wrong.