$DESKTOP_SESSION


Recommended Posts

Hey Guys i need as many of these as i can

I need to know what $DESKTOP_SESSION shows in the following DE's

LXDE

XFCE

Cinnamon

KDE

Gnome 2

Gnome 3

and any others you could provide

can you paste what yours says and also what DE ur on :)

Link to comment
https://www.neowin.net/forum/topic/1121234-desktop_session/
Share on other sites


Arch Linux release
LSB_VERSION=1.4
DISTRIB_ID=arch
DISTRIB_RELEASE=rolling
DISTRIB_DESCRIPTION="Arch Linux"
NAME="Arch Linux"
ID=arch
PRETTY_NAME="Arch Linux"
ANSI_COLOR="0;36"
HOME_URL="https://www.archlinux.org/"
SUPPORT_URL="https://bbs.archlinux.org/"
BUG_REPORT_URL="https://bugs.archlinux.org/"
[/CODE]

$ cat /etc/*-release

Fedora release 17 (Beefy Miracle)

NAME=Fedora

VERSION="17 (Beefy Miracle)"

ID=fedora

VERSION_ID=17

PRETTY_NAME="Fedora 17 (Beefy Miracle)"

ANSI_COLOR="0;34"

CPE_NAME="cpe:/o:fedoraproject:fedora:17"

Fedora release 17 (Beefy Miracle)

Fedora release 17 (Beefy Miracle)

i am making a little system script thats give system info and takes a screenshot

on every other release so far the last line in "cat /etc/*-release" is the distro name

all but Arch lol

Awesome thanks

i had got as far as

os=$(cat /etc/*-release | awk '/PRETTY_NAME/{print}')[/CODE]

lol
anyone wanna test it to make sure it works if i send a link?

EDIT: Tiagosilva mentioned lsb_release, which seems to do a lot of what you need with less need for grepping and whatnot.
[code]
[karl@HERA ~]$ lsb_release -d
Description:    Arch Linux

I assume that using 'lsb_release --codename' in Fedora would produce "Beefy Miracle", in Arch it produces "n/a".

In case you're still interested, I haven't seen any Debian users post yet so I'll contribute as well.


$ echo $DESKTOP_SESSION

$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux wheezy/sid"
NAME="Debian GNU/Linux"
ID=debian
ANSI_COLOR="1;31"
$ lsb_release -a
Distributor ID: Debian
Description: Debian GNU/Linux testing (wheezy)
Release: testing
Codename: wheezy
$ uname -a
Linux ZIPPYZEBRA 3.2.0-4-powerpc #1 Debian 3.2.32-1 ppc GNU/Linux
[/CODE]

Note that my [i]$DESKTOP_SESSION[/i] is unset. I am running Openbox as my DE, if that helps.

hmmm i thought openbopx set the $desktop_session

thats fine though if it does not find any it sets as "Not Found" lol

I think i will stick with Pretty_Name from /etc/*-release as it seems to be on all Distros

xorangekiller i have pm'd you with a link if you would like to test i would like a few people with different distros to do this :)

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • It is silly there is no simple way to check whether this profile has been activated. CFRs are normal, but trying to even hide the fact if it's on / off seems silly, especially for something so user-facing. Surely Microsoft is "proud" of their engineering efforts on this one and ought to display it somwhere in the GUI.
    • Many Linux distros are not known for excellent battery life, so I'm not sure that is the best example. A more apt example may be Apple, but Apple's CPUs are simply far more efficient than Intel & AMD at single-threaded tasks like these, so "boosting" is not as power-hungry and less heat-inducing. Not to mention Apple will hardly engage P-cores for basic UI tasks; they use a pretty complicated QoS scheme to only activate P-cores for more serious workloads like HTML / JS execution or decompression or application launch. Microsoft is (smartly) doing it for launch, but also for UI tasks, which is the more nonsensical part: why ... do Windows 11's UIs need modern CPUs to boost? It should load so quickly that there's not even time for the CPU to boost.
    • I've not seen any controlled testing and, judging by Microsoft's mentality, within a year, they'll have added so much more bloat, it'll undo any perceptible latency benefit and we'll have boosted the CPU clocks for nothing.
    • It depends: heat soak is a thing. Initially on cold boot-up, the heatsinks & heatpipes are at ambient temp. After heatsinks & heatpipes warm up (through normal usage), they don't immediately cool to ambient temp when the load goes away. So their baseline is higher and the trigger point for fans is much less stress. Add a few more CPU spikes → it's too hot to stay at the same fan RPM → fans get triggered to start up up much sooner / get triggered to ramp much more quickly.
    • Can LibreOffice just shut up and worry about themselves and stop comparing themselves? Do we see Microsoft complaining about euro office?
  • Recent Achievements

    • One Year In
      slackerzz earned a badge
      One Year In
    • One Year In
      highriskpaym earned a badge
      One Year In
    • One Month Later
      highriskpaym earned a badge
      One Month Later
    • Week One Done
      highriskpaym earned a badge
      Week One Done
    • Week One Done
      FBSPL earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      501
    2. 2
      PsYcHoKiLLa
      198
    3. 3
      +Edouard
      156
    4. 4
      Steven P.
      84
    5. 5
      ATLien_0
      71
  • Tell a friend

    Love Neowin? Tell a friend!