Skip to content

Instantly share code, notes, and snippets.

View mscottnielsen's full-sized avatar

michael mscottnielsen

  • San Francisco, CA
View GitHub Profile
@mscottnielsen
mscottnielsen / desktop_session.sh
Created December 20, 2013 06:14
Set DESKTOP_SESSION, guessing which desktop is running (gnome, mate, kde,...)
#!/bin/bash
#
# Set DESKTOP_SESSION, guessing which desktop is running (gnome, mate, kde,...)[1]
# Either source this file to set the env var, *or* eval the output of results.
# $ . desktop_session.sh # export DESKTOP_SESSION=gnome
# $ eval $( desktop_session.sh -p )
# Optionally use "-u" to unset DESKTOP_SESSION_ID, if causing problems [2]
#
# [1] https://netbeans.org/bugzilla/show_bug.cgi?id=227754
# [2] http://wiki.netbeans.org/FaqCplusPlusRemoteSocketException