Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 36

Thread: Why can't you decided where programs go?

  1. #21
    Join Date
    Sep 2016
    Beans
    30

    Re: Why can't you decided where programs go?

    Quote Originally Posted by TheFu View Post
    Everything that can be done in a .desktop file, can be done with a script ... except showing an icon. As a server guy, icons aren't really very important unless they are shown on a webpage or inside a thick application.

    symbolic links are really dumb and simple. It is a pointer from 1 location (directory or file) to another on a Unix-like file system. In programming, we call it a "pointer", which is an extremely powerful idea. Redirection is very powerful and the more generic that is, the more uses it can support.

    I'm confused by the "root" mention too. "root" has multiple meanings in Linux/Unix. It is a userid. It is a username. It denotes the "root directory", / which is where every file and file system mounted can trace their parentage. Usually / doesn't allow normal users to create anything in that directory. Talking about root vs relative paths is something users may not understand, but every OS has the idea of a root directory. C:\ is a root directory on Windows. D:\ is another root directory and every drive letter can have a root on Windows. On Unix systems, there is only 1 /. 1, not 2, not 26. One.

    Don't know what any of this has to do with deciding where to place programs. I was thinking from a purely disk storage perspective, but if someone else is looking at this from a menu perspective or placement on a desktop point of view, then symbolic links aren't likely to help.
    Well I'm a desktop user and prefer the GUI. I think someone mentioned that you can use simlinks redirect where programs get installed. Can you do that? I mostly started this thread in the OS chat instead of the tech support section because it's a question of curiosity. Why does Linux have stricter access to where programs go. I'm sure there's a reason for it, has it got something to do with it's design?

  2. #22
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    7,017
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: Why can't you decided where programs go?

    Quote Originally Posted by mintmag View Post
    Why does Linux have stricter access to where programs go. I'm sure there's a reason for it, has it got something to do with it's design?
    It doesn't.
    Both Linux and Windows allow you to install programs wherever you like (access restrictions permitting).
    For both operating systems, you can find installers that ask where you want to install programs.
    For both operating systems, it seems to me that the majority of installers simply use a default location, often in "Program Files" for windows and in /opt for Linux.

  3. #23
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    20,527
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Why can't you decided where programs go?

    Quote Originally Posted by mintmag View Post
    Well I'm a desktop user and prefer the GUI. I think someone mentioned that you can use simlinks redirect where programs get installed. Can you do that? I mostly started this thread in the OS chat instead of the tech support section because it's a question of curiosity. Why does Linux have stricter access to where programs go. I'm sure there's a reason for it, has it got something to do with it's design?
    It isn't Linux. Linux is extremely flexible - beyond pretty much any other OS. In a basic Linux install with just a minimal set of programs, there isn't a package manager and we place programs where ever we like. The management overhead is something we understand. Your home router is like this. It doesn't have a package manager and still runs Linux. Same for whatever device you use as a media player - a chromecast, WD Player, ... no package manager. They simply don't want to waste the storage for those extra tools.

    Ubuntu, Debian, Redhat, SuSE, and pretty much every other "distro" have specific locations for things to ease package management and interoperability between tens of thousands of programs. It wasn't always that way. In the mid-1990s nobody did package management. We did everything for every program manually. Imagine having to deal with program-to-program-to-library dependencies manually. It sucked. APT is amazing. It has gotten smarter over the years. APT is amazing. The trade-off is that we accept the default installation locations. That is well worth the trade-off, IMHO.

    If you plan to remain a "desktop only user", many of these things will be impossible to explain. The GUI isn't where 90% of the power for Linux lies. The GUI is a 10% windows in to the operating system. If that meets your needs, great! OTOH, with a little lower level understanding, you'll be able to accomplish things GUI users never knew were even possible. That can be both limiting and freeing. Sometimes I don't know how to get "there" from here, because of a deeper understanding. OTOH, when I look at any Apple or Android product, since these are all based on Unix, I have a different level of understanding.

    For example, your definition of "address" as "root address" isn't correct, IMHO. It is a directory, which is sorta like an address - address is extremely generic. Directory would be more specific and accurate. Inside a browser program, that area of the screen is called an "address bar." Don't know what other programs call it and since many do accept URL-like constructs (sftp://, ssh://, etc), perhaps address bar fits? I dunno.

    On Unix-like systems the root directory is /. PERIOD.

    BTW, I figure that I understand about 10% of Linux. I've only been studying it for 26 years.

  4. #24
    Join Date
    Mar 2015
    Location
    Great Plains
    Beans
    1,230
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Why can't you decided where programs go?

    +1 * 100 for post 23 by Mr. Manchu . . . .

    Perhaps MintMag is just now getting an inkling of what OS's, Linux & Unix are about. I love the saying "never make something simpler than it absolutely needs to be" . . .
    Problem installing Ubuntu? . . Just get it "Preinstalled" (like you did for Windows!) . . http://linuxpreloaded.com/

  5. #25
    Join Date
    Jan 2008
    Location
    Manchester UK
    Beans
    13,617
    Distro
    Ubuntu

    Re: Why can't you decided where programs go?

    The whole point of Ubuntu is to be easy.

    The package manager puts programs in certain directories to make things easier.

    Complex programs require other programs to run (dependencies). If those "dependencies" are not where the complex program expects them to be, they won't run. So the package manager puts them where they are expected to be. This is easier.

    There is also your $PATH https://en.wikipedia.org/wiki/PATH_(variable)

    Your path is a list of folders (directories) in which Ubuntu expects or searches for a program.

    I have some custom programs (scripts) I've made myself in /home/me/bin because /home/me/bin is in my $PATH. I could make a folder to put them in called /var/snowman/banana if I wanted to. But I would have to change my $PATH to inlcude /var/snowman/banana (or run them from their parent directory (but I'm trying to keep this realy simple)). So placing them in /home/me/bin is easier.

    They depend on other programs. Because these other programs are where they are supposed to be, the script just calls them by their name. If these other programs were scattered all over the place it would be more difficult.

    In short, this is linux, you can do whatever you want, you can put programs wherever you want. But why would you? Ubuntu has set it all up so you don't have to.

  6. #26
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    20,527
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Why can't you decided where programs go?

    The Unix Philosophy from different, "old guys" https://en.wikipedia.org/wiki/Unix_philosophy - skimming this will open some eyes.

    It is VERY different from the ways that Windows, DOS, OSX are designed. It seems to be different from the philosophies of the current generation of Linux GUI designers too, but that is absolutely fine. Choice is good.

    Good chat.

  7. #27
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    15,113
    Distro
    Kubuntu 20.04 Focal Fossa

    Re: Why can't you decided where programs go?

    Did you read the link that Charles posted at the top of this thread: http://www.thegeekstuff.com/2010/09/...tem-structure/

    The mainstream Linux distributions adhere to something called the Filesystem Hierarchy Standard. It defines the locations of files according to type.

    In principle you can put a binary executable anywhere you want in the filesystem and run it with a command like
    Code:
    /path/to/my/really/obscure/directory/program
    but that would create chaos. So executable programs are usually stored in just a few places like /bin and /usr/bin. To understand the difference between those two locations requires understanding the difference between "single-user" and "multi-user" mode.

    When Linux boots up, it runs in single-user mode. Everything is being run by the root user. At some point during the boot process, Linux goes into multi-user mode. Programs run during the first phase are stored in /bin (and /sbin; see below). That's because Unix systems need not store the /usr filesystem on the same device as / itself. On traditional networks, administrators could maintain a central archive of executables on a common server which was mounted over the network to /usr on client machines during the switch to multi-user mode. Any programs that ordinary users other than root might run in multi-user mode thus need to be in /usr/bin, though users can run programs in /bin as well. (Most of those are utilities like ping, grep and sed which might be needed in both modes.)

    There are corresponding "supervisor" directories which contain programs primarily intended for the root user. The /sbin directory is available during single-user mode. It contains programs like fsck, the "chkdsk" equivalent in Linux, which may be needed during boot, but which may also be run when the system is fully functioning. The corresponding /usr/sbin directory contains programs that may be started by root but change their ownership to another, less-privileged user when they are running for security reasons. The Apache web server is a good example; it starts as root but quickly becomes owned by the "www-data" user on Debian and Ubuntu systems.

    Because Unix was designed to rely on plain-text configuration files, the closest Linux equivalent to the Windows registry is /etc. Well-behaved programs place their configuration files in either /etc itself or a custom subdirectory like /etc/X11 for the X11 graphics subsystem.

    There is also a directory structure under /usr/local which is generally reserved for programs and associated content not installed by the standard methods like the .deb files in Ubuntu. If, for instance, you download and compile the source code for a standards-compliant program, it will install itself under /usr/local so as not to interfere with other versions of the program that came with the standard distribution. If you run the command "echo $PATH" at the prompt, you'll see that directories like /usr/local/bin are consulted before ones like /usr/bin, so the operating system will choose a local version of a program over the standard version installed from .debs.
    Last edited by SeijiSensei; December 19th, 2016 at 08:15 PM.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  8. #28
    Join Date
    Sep 2016
    Beans
    30

    Re: Why can't you decided where programs go?

    Yes I have read http://www.thegeekstuff.com/2010/09/...tem-structure/ and many articles like it. This is just curiosity about the Linux infrastructure. When installing programs you are not prompted to where you want it to go and trying to change it is not recommended. This is because it's not designed that way. I would like to know why is works the way it does. A lot of these posts have been filled with lost of useful information, but I was hopping for something a little simpler. What are the advantages of having a package manager store all your files in one place like this?

  9. #29
    Join Date
    Jul 2007
    Location
    Magic City of the Plains
    Beans
    Hidden!
    Distro
    Xubuntu 19.10 Eoan Ermine

    Re: Why can't you decided where programs go?

    Closed for staff review.

    EDIT

    Conditionally re-opened.
    Last edited by DuckHook; December 19th, 2016 at 10:06 PM.

  10. #30
    Join Date
    Mar 2011
    Location
    19th Hole
    Beans
    Hidden!
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Why can't you decided where programs go?

    Quote Originally Posted by SeijiSensei View Post
    …In principle you can put a binary executable anywhere you want in the filesystem and run it with a command like
    Code:
    /path/to/my/really/obscure/directory/program
    but that would create chaos.
    Quote Originally Posted by mintmag View Post
    …What are the advantages of having a package manager store all your files in one place like this?


    Question answered ten ways to Sunday, yet posed again anyway. One would begin to suspect a reading comprehension issue here, or an attempt at wasting everyone's time.

    This thread is now eating its own tail.

    @OP

    If you have a real question, please ask it. Else this thread will be closed permanently.

Page 3 of 4 FirstFirst 1234 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
  •