Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Desktop Environment Variable?

  1. #1
    Join Date
    May 2010
    Location
    Here
    Beans
    1,297
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Question Desktop Environment Variable?

    Are there any Desktop Environment Variables?
    So I could type something like:
    Code:
    echo $DE
    GNOME
    Or are there any commands?
    Thanks in advance!

  2. #2
    Join Date
    Feb 2009
    Beans
    1,469

    Re: Desktop Environment Variable?

    Well, what if you're running GNOME's settings daemon, KDE's panel, XFCE's desktop manager, and Openbox as a window manager?

    Code:
    echo $DE
    FrankenDesktop

  3. #3
    Join Date
    May 2010
    Location
    Here
    Beans
    1,297
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Desktop Environment Variable?

    Quote Originally Posted by trent.josephsen View Post
    Well, what if you're running GNOME's settings daemon, KDE's panel, XFCE's desktop manager, and Openbox as a window manager?

    Code:
    echo $DE
    FrankenDesktop
    I meant what it was logged into.
    And I know that the $DE variable is probably not existing.

  4. #4
    Join Date
    Mar 2009
    Beans
    554
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Desktop Environment Variable?

    Code:
    echo $DESKTOP_SESSION
    gnome
    this maybe?

    doesnt work with in CTRL+ALT+F1,F2 and such
    Last edited by Dayofswords; July 19th, 2010 at 02:11 AM.
    Someday we'll hit the human carrying capacity. And the band will just play on. -Me

    I'm trying PHP, so my code can probably be labelled "bad and insecure"

  5. #5
    Join Date
    May 2010
    Location
    Here
    Beans
    1,297
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Desktop Environment Variable?

    Thank you!
    This will help LinuxEssentials, and another thread I'm helping out on.
    Last edited by lkjoel; July 19th, 2010 at 02:31 AM.

  6. #6
    Join Date
    Feb 2009
    Beans
    1,469

    Re: Desktop Environment Variable?

    Quote Originally Posted by lkjoel View Post
    I meant what it was logged into.
    Point being that you can run all of those at once. Arguably it is even in the Unix tradition to combine tools like this (panel, desktop, file manager, window manager, settings manager, office suite, and browser all from different sources). What's more, you could start all of these with a GNOME session (I think... I'd have to fiddle with it to be sure) and start it from a neutral login manager like SLIM. It's not any particular DE; rather, it's a mishmash of tools that combine to create a DE. Then what do you do?

    What I'm getting at here is that what it means to be running some particular DE isn't really well-defined. DEs are collections of tools that can be mixed and matched: settings manager, window manager, file manager, terminal, login manager, screensaver daemon, panel, dock... the possibilities for combination are impractically numerous. "gnome" or "kde" just doesn't cut it. How do you define what it means to be running GNOME?

  7. #7
    Join Date
    May 2010
    Location
    Here
    Beans
    1,297
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Desktop Environment Variable?

    Quote Originally Posted by trent.josephsen View Post
    How do you define what it means to be running GNOME?
    Running Nautilus with gnome-panel with gnome window manager and gnome desktop manager.
    I get what you mean, but all that I am looking for is what the user logged into.
    LinuxEssentials will not care about having the xfce4-panel, nautilus and the kde window manager, but all that it will care is if the user was logged into gnome.
    But would the variable know that the user logged into SLIM?

  8. #8
    Join Date
    Apr 2007
    Location
    (X,Y,Z) = (0,0,0)
    Beans
    3,715

    Re: Desktop Environment Variable?

    See this post by me: http://ubuntuforums.org/showpost.php...8&postcount=11

    This is really an issue that should be addressed by someone somehow. I don't know, maybe the X.org guys or someone. We need a way to trivially know what DE is running, in the sense of "library preference". For me, running GNOME or Xfce is to run a GTK+ based DE; GNUStep, a GNUStep based DE; KDE, a Qt one.

  9. #9
    Join Date
    Feb 2009
    Beans
    1,469

    Re: Desktop Environment Variable?

    Quote Originally Posted by lkjoel View Post
    Running Nautilus with gnome-panel with gnome window manager and gnome desktop manager.
    I get what you mean, but all that I am looking for is what the user logged into.
    LinuxEssentials will not care about having the xfce4-panel, nautilus and the kde window manager, but all that it will care is if the user was logged into gnome.
    But would the variable know that the user logged into SLIM?
    No. SLIM is just the login screen. Ubuntu uses GDM, or used to. KDM and XDM are other options.

    What do you mean by "what the user logged into"? How would you define what I log in to if I'm using such a mishmash of various tools?

    I agree with nvteighen that there's a need for some way to determine library preference, but in general, I don't think it's a good idea for programs to make assumptions about what environment they're running under. Tell me, what will you do with the information if $DESKTOP_SESSION contains "gnome"? What if it contains "kde"? (And what will you do if, as in my case, it's empty?)

  10. #10
    Join Date
    May 2010
    Location
    Here
    Beans
    1,297
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Desktop Environment Variable?

    So what I get is that it is nearly impossible to know what DE the user is using right?
    They should make it much easier!

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •