Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 20 of 20
Try Code: echo $XDG_CURRENT_DESKTOP which should show your desktop....
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,497

    Try
    Code:
    echo $XDG_CURRENT_DESKTOP
    which should show your desktop.
    What do we want?
    Time machines!

    When do we want 'em?
    Doesn't really matter does it!?


    The Fifth Continent

  2. #12
    Linux Engineer
    Join Date
    Dec 2013
    Posts
    1,182
    Execution of programs is very straight forward in Linux and not hidden at all. This is true of most processes. However individual programs may well be underspecified. To learn about it though you have to understand and use the CLI. The windows are generally just window dressings. Commands such as "ps" can give you a lot of information about processes that are running.

    You haven't said what file manager you're running but on my system for example:
    Code:
    $ ps -ef | grep [tT]hunar
    greg     30102  2114  0 Jan23 ?        00:00:03 /usr/bin/Thunar file:///home/greg
    $ which Thunar
    /usr/bin/Thunar
    ls -ltr /usr/bin/Thunar
    lrwxrwxrwx 1 root root 6 Nov 19 08:04 /usr/bin/Thunar -> thunar
    This tells me a couple of things. First off, the wm executed thunar for me using the command "/usr/bin/Thunar file:///home/greg". Thunar in the command is a link to thunar - the actual name of the executable. "which thunar" or "which Thunar" tells me both are in the PATH variable and so I can type thunar at a terminal and up pops thunar. "man thunar" tells me all sorts of information about executing thunar. I can find out more information about an executing instance of thunar by examining the proc file system or running strace on the process. I can apply this to any process on my system.

    <soapbox>Linux is a tool chest; the GUI is one of the tools but it is only a tool and to understand Linux you need to embrace the command shell.</soapbox>

  3. #13
    Linux Newbie jkwilborn's Avatar
    Join Date
    Nov 2012
    Posts
    211
    Hi and thanks... I ran the code suppled and got an empty line back. So I guess it's not set. I know when I log in, I use the "system default" so whatever that is...
    I'll keep my eyes peeled for any more thoughts..

    Thanks

    Jack

  4. #14
    Just Joined!
    Join Date
    Apr 2013
    Posts
    69
    try :

    Code:
    pidof 'gnome'
    pidof 'kde'
    pidof 'lxde'
    pidof 'xfce'
    If none return a valid process id (a 4 digits number) then try by right-clicking on the task bar then choose 'about ?' might be a good option to get the running DE (desktop environment).

    For Debian, the default DE is Gnome.

    As far as I know GNOME will stay the default DEdebian.org

  5. #15
    Linux Newbie jkwilborn's Avatar
    Join Date
    Nov 2012
    Posts
    211
    I tried them all and they all returned nothing. I just got a prompt on the next line, unlike when I echo something and I get a blank line then the prompt. I also have tried many times to right click on a task bar and only get options of where to move it, stay on top, minimize of maximize. Nothing that let's me do anything. I was told at one time that when the 'shutdown' option disappeared from my name on the upper right of the screen that I could right click and restore it, but that didn't work either.

    Thanks... I'll keep trying if you keep sending me things to try...

    Jack

  6. #16
    Just Joined!
    Join Date
    Apr 2013
    Posts
    69
    Quote Originally Posted by chris_inx View Post
    try :

    Code:
    pidof 'gnome'
    pidof 'kde'
    pidof 'lxde'
    pidof 'xfce'
    Might work better with :
    Code:
    pidof gnome-terminal
    pidof lxterminal
    pidof [kK]onsole
    pidof [tT]erminal
    . My mistake !

  7. #17
    Linux Newbie jkwilborn's Avatar
    Join Date
    Nov 2012
    Posts
    211
    on the first "pidof gnome-terminal" I got a number, so I guess that's the interface, gnome...

    Thanks, that answers that...

    Jack

  8. #18
    Just Joined!
    Join Date
    Apr 2013
    Posts
    69
    First, you need that both xdg-utils package and desktop-file-utils to be installed.

    As root, create the following hierarchies :

    ~/.local/share/desktop-directories
    ~/.local/share/applications

    The first one is where your (sub) menus files will be stored, and the second one is where your menu items will be stored. (Games is a sub-menu and Chess is a menu item).

    To add a new menu, put the following in a file
    Code:
    # Only Name and Type are required
    [Desktop Entry]
    # Not the DE version; the version of freedesktop.org specification used
    # for the validation process
    Version=1.0
    # The name that will appear in the menu
    Name=NewMenu
    Type=Directory
    # only .xpm or .png file are supported, with version=1.0.
    Icon=/usr/share/someicon
    # Categories must end with a ';'
    Categories=Settings;
    Save this file with the desired name under desktop-directories folder with .directory as extension. (For the example, I used SubMenu.directory)

    Now validate the file with :

    Code:
    desktop-file-validate ~/.local/share/desktop-directories/SubMenu.directory
    If everything goes Ok with the validation, then go to the next step

    To add menu item, put this in a file :
    Code:
    # Only Name and Type are required, but that would be useless to create
    # a menu item without an exec string to run when you click on it !
    [Desktop Entry]
    Version=1.0
    Name=Shutdown
    Icon=/usr/share/pixmaps/apple-green.png
    # What to do when you click on that menu item
    # if you wish to shutdown the thing :
    # gnome-panel-logout --shutdown
    Exec=gnome-panel-logout
    # categories is a left-to-right comma separated list which specify where
    # to put the item. If no 'NewMenu' has been found, the the icon will be
    # put in 'Settings'. Must end with a ';' under version=1.0
    Categories=NewMenu;Settings;
    Type=Application
    # do not display this icon under other desktop's environment (the 
    # command executed is DE specific)
    # must end with a ';' under version=1.0
    OnlyShowIn=GNOME;
    Save this file with the desired name under applications folder with .desktop as extension. (For the example, I use MenuItem.desktop)

    Now validate the file with :
    Code:
    desktop-file-validate ~/.local/share/applications/MenuItem.desktop
    If everything goes Ok with the validation, then add them to the menu :

    Code:
    # Install the files for the current user only.
    # Put --mode system for everyone.
    xdg-desktop-menu install --mode user ~/.local/share/desktop-directories/SubMenu.directory ~/.local/share/applications/MenuItem.desktop
    For more keys, take a look at Recognized desktop entry keys

  9. #19
    Linux Newbie jkwilborn's Avatar
    Join Date
    Nov 2012
    Posts
    211
    chris_inx,

    Thanks a bunch. I was hoping that someone would be able to answer this question. I will attempt it soon and if I have any questions, I'll let you know. It seems pretty through. Again, thanks for much for the assistance I don't know if I'd figure this out. BTW, where is this procedure documented?

    Jack

  10. #20
    Just Joined!
    Join Date
    Apr 2013
    Posts
    69
    I don't know where the whole procedure are documented, if it is. All that I know is that for commands used (desktop-file-validate, xdg-desktop-menu and gnome-panel-logout), you can refer to the proper man pages.

    For the specifications of the .directory and .desktop file, you can find more information at freedesktop

Page 2 of 2 FirstFirst 1 2

Posting Permissions

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