Where is the path to the current user's desktop directory stored? The 2019 Stack Overflow...

Can we generate random numbers using irrational numbers like π and e?

What could be the right powersource for 15 seconds lifespan disposable giant chainsaw?

Is it ethical to upload a automatically generated paper to a non peer-reviewed site as part of a larger research?

What do these terms in Caesar's Gallic Wars mean?

Is it safe to harvest rainwater that fell on solar panels?

How to support a colleague who finds meetings extremely tiring?

A word that means fill it to the required quantity

Did the UK government pay "millions and millions of dollars" to try to snag Julian Assange?

Can I have a signal generator on while it's not connected?

How come people say “Would of”?

Keeping a retro style to sci-fi spaceships?

Will it cause any balance problems to have PCs level up and gain the benefits of a long rest mid-fight?

Can withdrawing asylum be illegal?

If my opponent casts Ultimate Price on my Phantasmal Bear, can I save it by casting Snap or Curfew?

Dropping list elements from nested list after evaluation

Why are there uneven bright areas in this photo of black hole?

Getting crown tickets for Statue of Liberty

What is preventing me from simply constructing a hash that's lower than the current target?

Is it okay to consider publishing in my first year of PhD?

For what reasons would an animal species NOT cross a *horizontal* land bridge?

Output the Arecibo Message

How can I define good in a religion that claims no moral authority?

Are there any other methods to apply to solving simultaneous equations?

What is the most efficient way to store a numeric range?



Where is the path to the current user's desktop directory stored?



The 2019 Stack Overflow Developer Survey Results Are InIs there a way to retrieve the name of the Desktop Environment?/dev/shm/ecryptfs-$USER-Private keeps climbing in Kubuntu 12.10 InstallWhere is ACL data technically stored?Where are filenames stored on a filesystem?How can I view an application shortcut's content to find what exact executable line it runs?Are directory paths stored in UNIX filesystem?Where are i-node tables stored?Where are file directory entries for subdirectories stored?Where are past stdouts stored?Where is the file creation time (birth) stored in linux?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







2















I am very new to linux and am going through and learning all the basics. While I was doing so I realized how odd it was that the OS treats certain files differently--namingly by displaying them on the GUI desktop enviroment if they happen to be the desktop file associated with the currently logged in user. How does the OS know the path variable to the current user's desktop directory? For hacker amusment can it be changed such that any arbitrary directory will be displayed on the GUI desktop?










share|improve this question























  • Typically ~/Desktop

    – ivanivan
    Sep 13 '17 at 2:55


















2















I am very new to linux and am going through and learning all the basics. While I was doing so I realized how odd it was that the OS treats certain files differently--namingly by displaying them on the GUI desktop enviroment if they happen to be the desktop file associated with the currently logged in user. How does the OS know the path variable to the current user's desktop directory? For hacker amusment can it be changed such that any arbitrary directory will be displayed on the GUI desktop?










share|improve this question























  • Typically ~/Desktop

    – ivanivan
    Sep 13 '17 at 2:55














2












2








2








I am very new to linux and am going through and learning all the basics. While I was doing so I realized how odd it was that the OS treats certain files differently--namingly by displaying them on the GUI desktop enviroment if they happen to be the desktop file associated with the currently logged in user. How does the OS know the path variable to the current user's desktop directory? For hacker amusment can it be changed such that any arbitrary directory will be displayed on the GUI desktop?










share|improve this question














I am very new to linux and am going through and learning all the basics. While I was doing so I realized how odd it was that the OS treats certain files differently--namingly by displaying them on the GUI desktop enviroment if they happen to be the desktop file associated with the currently logged in user. How does the OS know the path variable to the current user's desktop directory? For hacker amusment can it be changed such that any arbitrary directory will be displayed on the GUI desktop?







command-line filesystems desktop-environment






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Sep 13 '17 at 2:45









Shadow43375Shadow43375

1115




1115













  • Typically ~/Desktop

    – ivanivan
    Sep 13 '17 at 2:55



















  • Typically ~/Desktop

    – ivanivan
    Sep 13 '17 at 2:55

















Typically ~/Desktop

– ivanivan
Sep 13 '17 at 2:55





Typically ~/Desktop

– ivanivan
Sep 13 '17 at 2:55










4 Answers
4






active

oldest

votes


















1














Generally, in GNU/Linux (as in Unix), the user's Desktop directory can be specified with ~/Desktop. The shorthand ~/ will expand to whatever the home directory is, such as /path/to/home/username.



I should clarify that most shells (e.g. bash, ksh, csh, etc.) will expand ~ to the home directory, but not all of them (e.g. rc). The tilde is a literal character, so you can have a file ~filename; therefore, the shell must be designed to expand the tilde under certain conditions.






share|improve this answer































    1














    The path for most distributions (I say most and not all because Linux (or GNU/Linux), is nothing if not mutable, for good or ill), is going to be /home/<user name>/Desktop
    You can go to it through the command line like this: cd /home/<username>/Desktop
    Viewing files is a simple as using the command "ls" without the quotation marks.






    share|improve this answer

































      1














      The default path for the desktop directory varies between different languages.
      Hence a better guess than $HOME/Desktop could be fetched from xdg-user-dirs in case that exists in your system:



      $ xdg-user-dirs DESKTOP
      /home/arnie97/桌面




      There's also another way from xdg-user-dirs home page:




      Here is a shellscript example of how to find the desktop and the download directory:



      test -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs && source ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs
      echo ${XDG_DESKTOP_DIR:-$HOME/Desktop}
      echo ${XDG_DOWNLOAD_DIR:-$HOME}


      For application code the hope is that the various desktops will integrate this and have a nice API to find these directories.







      share|improve this answer








      New contributor




      Arnie97 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




























        0














        This depends on your Desktop Environment:




        • KDE: You can display many arbitrary directories: https://docs.kde.org/trunk5/en/kde-workspace/plasma-desktop/folder-view.html

        • GNOME: You need a special extension: https://extensions.gnome.org/extension/1465/desktop-icons/


        If you use a Window Manager, you can use different tools to display stuff on your desktop, e.g. PCmanFM desktop.



        Most tools and Desktop Environments do respects your xdg-user-dir DESKTOP settings.






        share|improve this answer
























          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f391915%2fwhere-is-the-path-to-the-current-users-desktop-directory-stored%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          4 Answers
          4






          active

          oldest

          votes








          4 Answers
          4






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          Generally, in GNU/Linux (as in Unix), the user's Desktop directory can be specified with ~/Desktop. The shorthand ~/ will expand to whatever the home directory is, such as /path/to/home/username.



          I should clarify that most shells (e.g. bash, ksh, csh, etc.) will expand ~ to the home directory, but not all of them (e.g. rc). The tilde is a literal character, so you can have a file ~filename; therefore, the shell must be designed to expand the tilde under certain conditions.






          share|improve this answer




























            1














            Generally, in GNU/Linux (as in Unix), the user's Desktop directory can be specified with ~/Desktop. The shorthand ~/ will expand to whatever the home directory is, such as /path/to/home/username.



            I should clarify that most shells (e.g. bash, ksh, csh, etc.) will expand ~ to the home directory, but not all of them (e.g. rc). The tilde is a literal character, so you can have a file ~filename; therefore, the shell must be designed to expand the tilde under certain conditions.






            share|improve this answer


























              1












              1








              1







              Generally, in GNU/Linux (as in Unix), the user's Desktop directory can be specified with ~/Desktop. The shorthand ~/ will expand to whatever the home directory is, such as /path/to/home/username.



              I should clarify that most shells (e.g. bash, ksh, csh, etc.) will expand ~ to the home directory, but not all of them (e.g. rc). The tilde is a literal character, so you can have a file ~filename; therefore, the shell must be designed to expand the tilde under certain conditions.






              share|improve this answer













              Generally, in GNU/Linux (as in Unix), the user's Desktop directory can be specified with ~/Desktop. The shorthand ~/ will expand to whatever the home directory is, such as /path/to/home/username.



              I should clarify that most shells (e.g. bash, ksh, csh, etc.) will expand ~ to the home directory, but not all of them (e.g. rc). The tilde is a literal character, so you can have a file ~filename; therefore, the shell must be designed to expand the tilde under certain conditions.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Sep 13 '17 at 3:50









              gracious1gracious1

              33119




              33119

























                  1














                  The path for most distributions (I say most and not all because Linux (or GNU/Linux), is nothing if not mutable, for good or ill), is going to be /home/<user name>/Desktop
                  You can go to it through the command line like this: cd /home/<username>/Desktop
                  Viewing files is a simple as using the command "ls" without the quotation marks.






                  share|improve this answer






























                    1














                    The path for most distributions (I say most and not all because Linux (or GNU/Linux), is nothing if not mutable, for good or ill), is going to be /home/<user name>/Desktop
                    You can go to it through the command line like this: cd /home/<username>/Desktop
                    Viewing files is a simple as using the command "ls" without the quotation marks.






                    share|improve this answer




























                      1












                      1








                      1







                      The path for most distributions (I say most and not all because Linux (or GNU/Linux), is nothing if not mutable, for good or ill), is going to be /home/<user name>/Desktop
                      You can go to it through the command line like this: cd /home/<username>/Desktop
                      Viewing files is a simple as using the command "ls" without the quotation marks.






                      share|improve this answer















                      The path for most distributions (I say most and not all because Linux (or GNU/Linux), is nothing if not mutable, for good or ill), is going to be /home/<user name>/Desktop
                      You can go to it through the command line like this: cd /home/<username>/Desktop
                      Viewing files is a simple as using the command "ls" without the quotation marks.







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Sep 13 '17 at 6:19









                      Anthon

                      61.6k17107171




                      61.6k17107171










                      answered Sep 13 '17 at 6:12









                      ChrisChris

                      111




                      111























                          1














                          The default path for the desktop directory varies between different languages.
                          Hence a better guess than $HOME/Desktop could be fetched from xdg-user-dirs in case that exists in your system:



                          $ xdg-user-dirs DESKTOP
                          /home/arnie97/桌面




                          There's also another way from xdg-user-dirs home page:




                          Here is a shellscript example of how to find the desktop and the download directory:



                          test -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs && source ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs
                          echo ${XDG_DESKTOP_DIR:-$HOME/Desktop}
                          echo ${XDG_DOWNLOAD_DIR:-$HOME}


                          For application code the hope is that the various desktops will integrate this and have a nice API to find these directories.







                          share|improve this answer








                          New contributor




                          Arnie97 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.

























                            1














                            The default path for the desktop directory varies between different languages.
                            Hence a better guess than $HOME/Desktop could be fetched from xdg-user-dirs in case that exists in your system:



                            $ xdg-user-dirs DESKTOP
                            /home/arnie97/桌面




                            There's also another way from xdg-user-dirs home page:




                            Here is a shellscript example of how to find the desktop and the download directory:



                            test -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs && source ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs
                            echo ${XDG_DESKTOP_DIR:-$HOME/Desktop}
                            echo ${XDG_DOWNLOAD_DIR:-$HOME}


                            For application code the hope is that the various desktops will integrate this and have a nice API to find these directories.







                            share|improve this answer








                            New contributor




                            Arnie97 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.























                              1












                              1








                              1







                              The default path for the desktop directory varies between different languages.
                              Hence a better guess than $HOME/Desktop could be fetched from xdg-user-dirs in case that exists in your system:



                              $ xdg-user-dirs DESKTOP
                              /home/arnie97/桌面




                              There's also another way from xdg-user-dirs home page:




                              Here is a shellscript example of how to find the desktop and the download directory:



                              test -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs && source ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs
                              echo ${XDG_DESKTOP_DIR:-$HOME/Desktop}
                              echo ${XDG_DOWNLOAD_DIR:-$HOME}


                              For application code the hope is that the various desktops will integrate this and have a nice API to find these directories.







                              share|improve this answer








                              New contributor




                              Arnie97 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                              Check out our Code of Conduct.










                              The default path for the desktop directory varies between different languages.
                              Hence a better guess than $HOME/Desktop could be fetched from xdg-user-dirs in case that exists in your system:



                              $ xdg-user-dirs DESKTOP
                              /home/arnie97/桌面




                              There's also another way from xdg-user-dirs home page:




                              Here is a shellscript example of how to find the desktop and the download directory:



                              test -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs && source ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs
                              echo ${XDG_DESKTOP_DIR:-$HOME/Desktop}
                              echo ${XDG_DOWNLOAD_DIR:-$HOME}


                              For application code the hope is that the various desktops will integrate this and have a nice API to find these directories.








                              share|improve this answer








                              New contributor




                              Arnie97 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                              Check out our Code of Conduct.









                              share|improve this answer



                              share|improve this answer






                              New contributor




                              Arnie97 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                              Check out our Code of Conduct.









                              answered 15 hours ago









                              Arnie97Arnie97

                              1113




                              1113




                              New contributor




                              Arnie97 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                              Check out our Code of Conduct.





                              New contributor





                              Arnie97 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                              Check out our Code of Conduct.






                              Arnie97 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                              Check out our Code of Conduct.























                                  0














                                  This depends on your Desktop Environment:




                                  • KDE: You can display many arbitrary directories: https://docs.kde.org/trunk5/en/kde-workspace/plasma-desktop/folder-view.html

                                  • GNOME: You need a special extension: https://extensions.gnome.org/extension/1465/desktop-icons/


                                  If you use a Window Manager, you can use different tools to display stuff on your desktop, e.g. PCmanFM desktop.



                                  Most tools and Desktop Environments do respects your xdg-user-dir DESKTOP settings.






                                  share|improve this answer




























                                    0














                                    This depends on your Desktop Environment:




                                    • KDE: You can display many arbitrary directories: https://docs.kde.org/trunk5/en/kde-workspace/plasma-desktop/folder-view.html

                                    • GNOME: You need a special extension: https://extensions.gnome.org/extension/1465/desktop-icons/


                                    If you use a Window Manager, you can use different tools to display stuff on your desktop, e.g. PCmanFM desktop.



                                    Most tools and Desktop Environments do respects your xdg-user-dir DESKTOP settings.






                                    share|improve this answer


























                                      0












                                      0








                                      0







                                      This depends on your Desktop Environment:




                                      • KDE: You can display many arbitrary directories: https://docs.kde.org/trunk5/en/kde-workspace/plasma-desktop/folder-view.html

                                      • GNOME: You need a special extension: https://extensions.gnome.org/extension/1465/desktop-icons/


                                      If you use a Window Manager, you can use different tools to display stuff on your desktop, e.g. PCmanFM desktop.



                                      Most tools and Desktop Environments do respects your xdg-user-dir DESKTOP settings.






                                      share|improve this answer













                                      This depends on your Desktop Environment:




                                      • KDE: You can display many arbitrary directories: https://docs.kde.org/trunk5/en/kde-workspace/plasma-desktop/folder-view.html

                                      • GNOME: You need a special extension: https://extensions.gnome.org/extension/1465/desktop-icons/


                                      If you use a Window Manager, you can use different tools to display stuff on your desktop, e.g. PCmanFM desktop.



                                      Most tools and Desktop Environments do respects your xdg-user-dir DESKTOP settings.







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered 14 hours ago









                                      ctxctx

                                      1,786515




                                      1,786515






























                                          draft saved

                                          draft discarded




















































                                          Thanks for contributing an answer to Unix & Linux Stack Exchange!


                                          • Please be sure to answer the question. Provide details and share your research!

                                          But avoid



                                          • Asking for help, clarification, or responding to other answers.

                                          • Making statements based on opinion; back them up with references or personal experience.


                                          To learn more, see our tips on writing great answers.




                                          draft saved


                                          draft discarded














                                          StackExchange.ready(
                                          function () {
                                          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f391915%2fwhere-is-the-path-to-the-current-users-desktop-directory-stored%23new-answer', 'question_page');
                                          }
                                          );

                                          Post as a guest















                                          Required, but never shown





















































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown

































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown







                                          Popular posts from this blog

                                          Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

                                          Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

                                          Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...