Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Unified Diff: third_party/xdg-utils/tests/include/desktop_environment

Issue 151098: Patch from mdm@google.com... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/
Patch Set: Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/xdg-utils/tests/include/desktop_environment
===================================================================
--- third_party/xdg-utils/tests/include/desktop_environment (revision 0)
+++ third_party/xdg-utils/tests/include/desktop_environment (revision 0)
@@ -0,0 +1,56 @@
+#!/bin/bash
+
+## This script modified from one supplied by Bryce Harrington at OSDL
+
+which kde-config >/dev/null 2>&1
+if [ "$?" -eq 0 ]; then
+ # From Sutoka on FreeNode/#kde
+ kde_version=`kde-config --version | grep KDE | cut -d' ' -f2 2> /dev/null`
+ kde_running=$KDE_FULL_SESSION
+ if [ ! -z "$KDE_FULL_SESSION" ]; then
+ running="kde $running"
+ fi
+ echo "kde: $kde_version"
+else
+ echo "kde: not present (didn't find kde-config)"
+fi
+
+# From kees on #osdl
+which gnome-session >/dev/null 2>&1
+if [ "$?" -eq 0 ] ; then
+ gnome_version=`gnome-session --version | cut -d ' ' -f3 2>/dev/null`
+ echo "gnome: $gnome_version"
+
+ if [ ! -z "$GNOME_DESKTOP_SESSION_ID" ]; then
+ running="gnome $running"
+ fi
+else
+ echo "gnome: not present (didn't find gnome-session)"
+fi
+
+which xfce4-session >/dev/null 2>&1
+if [ "$?" -eq 0 ] ; then
+ xfce_version=`xfce4-session --version | grep '(Xfce ' | cut -d '(' -f 2 | cut -d ' ' -f2 | cut -d ')' -f1`
+ # From massonnet on FreeNode/#xfce
+ #if [ `pidof xfce4-session` ]; then
+ if [ "$GDMSESSION" = 'xfce4' ] ; then
+ running="xfce $running"
+ fi
+
+ echo "xfce: $xfce_version"
+else
+ echo "xfce: not present (didn't find xfce4-session)"
+fi
+
+if [ -z "$running" ] ; then
+ running='none'
+fi
+
+
+echo "running: $running "
+if [ `whoami` = 'root' ] ; then
+ echo "user: root"
+else
+ echo "user: normal"
+fi
+
Property changes on: third_party/xdg-utils/tests/include/desktop_environment
___________________________________________________________________
Name: svn:executable
+ *
« no previous file with comments | « third_party/xdg-utils/tests/icons/red-template.xcf ('k') | third_party/xdg-utils/tests/include/linux_distro » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698