Results 1 to 2 of 2

Thread: Path to Desktop? Anyone know?

Hybrid View

  1. #1
    Join Date
    Jan 2008
    Beans
    735
    Distro
    Ubuntu 10.04 Lucid Lynx

    Path to Desktop? Anyone know?

    I need to run a python script from my linux ubuntu desktop and I have forgotten the correct path -

    ** If the python file is on my DESKTOP do I input this in terminal?

    python /home/(user)/Desktop file.py

    -- or ---

    python ~/Desktop/file.py

    Thanks

  2. #2
    Join Date
    Apr 2011
    Location
    Maryland
    Beans
    1,461
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: Path to Desktop? Anyone know?

    The notation '~/' is the BASH shortcut for /home/username/. So, I believe either should work if your file is on your Desktop. If you use the full path, don't forget the slash between "Desktop" and your file name:

    Code:
    python /home/(user)/Desktop/file.py

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
  •