Wireshark-bugs: [Wireshark-bugs] [Bug 6353] Wireshark should respect freedesktop.org XDG Base Di
Date: Fri, 05 Dec 2014 00:59:49 +0000

Comment # 10 on bug 6353 from
The command "env | egrep XDG" reports:

XDG_VTNR=7
XDG_SESSION_ID=c2
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/gharris
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg
XDG_SESSION_TYPE=x11
XDG_SEAT=seat0
XDG_SESSION_DESKTOP=ubuntu
XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/
XDG_RUNTIME_DIR=/run/user/1000
XDG_CURRENT_DESKTOP=Unity

  in gnome-terminal, in a (Unity) GUI login on my Ubuntu 14.10 VM;

XDG_SESSION_ID=2
XDG_RUNTIME_DIR=/run/user/1000

  in an SSH session to the same machine from the host (12.04 was similar, but
with no session IDs, and with session cookies);

XDG_VTNR=1
XDG_SESSION_ID=1
XDG_MENU_PREFIX=kde4-
XDG_SESSION_COOKIE=412d21eb66f97a596c9ffadf00000005-1417739513.930898-2003110994
XDG_SEAT=seat0
XDG_DATA_DIRS=/usr/share/kde-settings/kde-profile/default/share:/usr/local/share:/usr/share
XDG_RUNTIME_DIR=/run/user/gharris

  in Konsole, in a (KDE) GUI login on my Fedora 16 VM;

XDG_SESSION_ID=2
XDG_RUNTIME_DIR=/run/user/gharris

  in an SSH to the same machine from itself (no, I've no idea why sshd is
allowing connections from 127.0.0.1 but not from the host);

so, hopefully, this is a sign that:

    1) desktop environments generally won't set XDG_DATA_HOME or
XDG_CONFIG_HOME

and

    2) on systems where they do, they'll also set it for non-GUI logins (ssh
and even "plug your VT100 into a serial port with getty running on it" logins)

so it's probably safe to:

    use those environment variables if they're set and if the Wireshark files
exist in the specified directories;

    if not, check for ~/.local/share and ~/.config and use them if the
Wireshark files exist in the relevant directories;

    if not, fall back to $HOME/.wireshark.

(No, we're not going to ignore $HOME/.wireshark.  We had it, or, at least,
$HOME/.ethereal, before the XDG spec in question existed.  The XDG was formed
in 2000:

    http://www.informatica.co.cr/linux-desktops/research/2000/0425-a.html

and Ethereal was announced in 1998:

    https://mail.gnome.org/archives/gtk-list/1998-July/msg00568.html)


You are receiving this mail because:
  • You are watching all bug changes.