Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. "Linux is better thought-out than Windows"

"Linux is better thought-out than Windows"

Scheduled Pinned Locked Moved The Lounge
designlinuxquestion
75 Posts 24 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D dandy72

    ...but if that's the case, some things are definitely falling through the cracks. On many distributions, if I try to shutdown the system at a command prompt (typically with "shutdown -P 0"), I'm told I have to run sudo and I'm prompted for a password. Great feature, you wouldn't want any dumbass you share your computer with to be able to bring it down without showing he's got at least *some* amount of authority. Yet that same user can select Shutdown from the UI, and it'll happily comply without prompting for anything else (or at most, a confirmation prompt). If this was some sort of oversight, it would've been addressed years ago, no?

    R Offline
    R Offline
    realJSOP
    wrote on last edited by
    #27

    The commandline is available to any process running under any account, and therefore it's wise in that instance to ask for credentials before shutting down (guards against remote shutdown). The UI, on the otherhand requires the user to be sitting there, and shutting down is a deliberate act, thus, no credntials required. I'm not sure, but requiring credentials before shutting down via the UI might be subject to a a system setting. I don't know for surem, but it's something to investigate if you are so inclined.

    ".45 ACP - because shooting twice is just silly" - JSOP, 2010
    -----
    You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
    -----
    When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

    D 1 Reply Last reply
    0
    • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

      And somewhere in 2020 we will have (or not?!) a version supporting Intel CPUs... So we can dump Linux and Windows too...

      "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge". Stephen Hawking, 1942- 2018

      K Offline
      K Offline
      kalberts
      wrote on last edited by
      #28

      Wasn't the source code for VMS released to the public a few years ago? Then I guess it would just to rewrite the HAL - VMS was ported to both the Alpha chip and Itanium, so they probably have defined some useful hardware abstractions ... and Wikipedia also claims that "a port to the x86-64 architecture is underway". Wikipedia says that OpenVMS is closed source(!), but the section "Hobbyist programs" suggests that it is open for hobbyist and non-commercial use. So even if my memory is wrong about it being made "fully open" fairly recently, you could at least call it "ajar software" :-)

      1 Reply Last reply
      0
      • P PIEBALDconsult

        Two words: Memory leaks. The MicroVAX 3600 I managed while in college would crash on Tuesday unless I had rebooted it on Friday.

        K Offline
        K Offline
        kalberts
        wrote on last edited by
        #29

        Side tracking a little: Raymond Chen, in his delightful book "The old new thing" (based on his equally delightful blog of the same name, [^]) he tells about this web server that just had to be available 24/7, but some memory leak made it crash every now and then, every few days. To keep the service running while they debugged the software, they replaced the server with a small cluster and a load balancer: Whenever one of the machines were reaching memory saturation, it was taken out of the cluster and rebooted. In the meantime, the other machine served the users. Later, the other cluster node would be the one to be taken out and rebooted while the first served the customers. They did find the memory leak, and the installation could go back to single server operation. (There was no need to run a cluster for performance reasons.) Thumbs up for "The old new thing", both book and blog! The book is fun, but you can actually learn a whole lot from it, especially about legacy and backwards compatibility. (And especially if you just completed your degree and have very limited experience in the commercial world.)

        1 Reply Last reply
        0
        • D dandy72

          ...but if that's the case, some things are definitely falling through the cracks. On many distributions, if I try to shutdown the system at a command prompt (typically with "shutdown -P 0"), I'm told I have to run sudo and I'm prompted for a password. Great feature, you wouldn't want any dumbass you share your computer with to be able to bring it down without showing he's got at least *some* amount of authority. Yet that same user can select Shutdown from the UI, and it'll happily comply without prompting for anything else (or at most, a confirmation prompt). If this was some sort of oversight, it would've been addressed years ago, no?

          N Offline
          N Offline
          Nathan Minier
          wrote on last edited by
          #30

          Well, first, if you install a graphical UI on a system that runs production-critical tasks, you're doing it wrong. Second, the UI systems I've seen use dmesg to bypass the normal IO flow, and assign permissions to grant permissions to the UI, not the user, to perform tasks such as shutdown and network configuration. It does this specifically so the system can have base-level users that don't want to get into the system administration game. If you don't want to UI to have those permissions....remove those permissions. It's not terribly hard, and it's generally not an oversight.

          "Never attribute to malice that which can be explained by stupidity." - Hanlon's Razor

          D 1 Reply Last reply
          0
          • D dandy72

            ...but if that's the case, some things are definitely falling through the cracks. On many distributions, if I try to shutdown the system at a command prompt (typically with "shutdown -P 0"), I'm told I have to run sudo and I'm prompted for a password. Great feature, you wouldn't want any dumbass you share your computer with to be able to bring it down without showing he's got at least *some* amount of authority. Yet that same user can select Shutdown from the UI, and it'll happily comply without prompting for anything else (or at most, a confirmation prompt). If this was some sort of oversight, it would've been addressed years ago, no?

            T Offline
            T Offline
            TheRaven
            wrote on last edited by
            #31

            Amazing observation; more than an oversight, it's an issue most likely avoided as I'm certain that (OP), myself and many others have seen this and wandered what the deal is. DE and DM software generally run in a SuDo style mode with certain privileges one of which is shutdown & restart among others. One reason (or several actually) that most old hand system administrators prefer to run Linux & BSD systems via the prompt rather than installing anything like a GUI desktop environment --security concerns, stability (some apps may not function correctly without special privileges) and most times GUI clutters their workspace. Anyway, Linux like any other operating system is subject to developer over sight else we wouldn't need security patches and new kernels. Additionally, Linux is not better thought out than Windows it is implemented in a way that the particular distribution is laid out logically if anything. Windows on the other hand could still benefit from better directory structure and more "in-your-face" security and systems management for those whom not a current copy of the contemporary Windows System Administrator Guide on hand. Neither O.S. is close to perfect and the sooner everyone accepts the fact the sooner things can get rolling again toward better security and stability --right after we get away from Intel's Spectre-Meltdown platform (makes you wander if Intel isn't in anti-virus software investment portfolio somewhere in the shadows, hunh)... Good article regardless.

            I was unaware of that...

            D 1 Reply Last reply
            0
            • D dandy72

              ...but if that's the case, some things are definitely falling through the cracks. On many distributions, if I try to shutdown the system at a command prompt (typically with "shutdown -P 0"), I'm told I have to run sudo and I'm prompted for a password. Great feature, you wouldn't want any dumbass you share your computer with to be able to bring it down without showing he's got at least *some* amount of authority. Yet that same user can select Shutdown from the UI, and it'll happily comply without prompting for anything else (or at most, a confirmation prompt). If this was some sort of oversight, it would've been addressed years ago, no?

              K Offline
              K Offline
              kalberts
              wrote on last edited by
              #32

              I don't know where you got that subject line from, but... Linux is a Unix clone; its architecture is a carbon copy of Unix. And Unix was never planned, designed. The *nix process concept was a created as a mechanism to let the space ships of the Space Invasion game to come increasingly closer while you were scratching your head. The shell is the Space Invasion command interpreter loop. They needed a language for programming the whole thing, and threw up a number of language constructs in a messy pile - C is the most explisitly non-designed language that I have ever come across. And it shows! I would be curious to know where this "though-out" is found. Most of the thinking has been spent on "How shall we clean up this terrible mess?" To some degree, the question has been evaded by stating "That is not our problem" (e.g. higher level protocols, file system structures, synchronization, shared data, user identification) - keep it simple; if it simpler than necessary, claim that it improves clarity! Slowly, a few mechanisms crept in: Existence of a file was replaced by a binary semaphore (so that we didn't have to worry about concepts such as critical regions and monitors...), we got .so libraries, and if you were an expert, you could set up segments of the data segment as shared. X.11 could be patched on top to give the illusion of event-driven system design - but worked only for the mouse and keyboard. Exception handling was kludged onto the C language, and so was OO. For threads we had several years with competing kludges. I never saw a speck of "design" work behind the *nix operating system, and very little in the activities closely related to it (such as the C language and communication protocols). For some protocols, the IETF simply had to make major cleanups, e.g. in the SMTP protocol and a number of others, and it is clear for everybody to see that all the old critisisms of "non-*nix-style" starndardization work becomes increasingly appliccable to *nix and TCP/IP protocols standardization.

              D 1 Reply Last reply
              0
              • M Mike Hankey

                VMS Rocks!

                I'm currently unsupervised, I know it freaks me out too! JaxCoder.com

                F Offline
                F Offline
                Forogar
                wrote on last edited by
                #33

                I really miss working on those old Vaxes (Vaxii?) VMS was the business!

                - I would love to change the world, but they won’t give me the source code.

                M K 2 Replies Last reply
                0
                • F Forogar

                  I really miss working on those old Vaxes (Vaxii?) VMS was the business!

                  - I would love to change the world, but they won’t give me the source code.

                  M Offline
                  M Offline
                  Mike Hankey
                  wrote on last edited by
                  #34

                  Forogar wrote:

                  I really miss working on those old Vaxes (Vaxii?) VMS was the business!

                  I really enjoyed working on them too! uVAX was an awesome machine!

                  I'm currently unsupervised, I know it freaks me out too! JaxCoder.com

                  F K 2 Replies Last reply
                  0
                  • M Mike Hankey

                    Forogar wrote:

                    I really miss working on those old Vaxes (Vaxii?) VMS was the business!

                    I really enjoyed working on them too! uVAX was an awesome machine!

                    I'm currently unsupervised, I know it freaks me out too! JaxCoder.com

                    F Offline
                    F Offline
                    Forogar
                    wrote on last edited by
                    #35

                    We had a pair of VAX 785s (I think - my memory of the last millenium occasionally fails me) and were running real-time flight telemetry and analysis on them. So cool and, since we very close to the runway, very noisy! Jet fighters on reheat make a LOT of noise on take-off.

                    - I would love to change the world, but they won’t give me the source code.

                    1 Reply Last reply
                    0
                    • D dandy72

                      ...but if that's the case, some things are definitely falling through the cracks. On many distributions, if I try to shutdown the system at a command prompt (typically with "shutdown -P 0"), I'm told I have to run sudo and I'm prompted for a password. Great feature, you wouldn't want any dumbass you share your computer with to be able to bring it down without showing he's got at least *some* amount of authority. Yet that same user can select Shutdown from the UI, and it'll happily comply without prompting for anything else (or at most, a confirmation prompt). If this was some sort of oversight, it would've been addressed years ago, no?

                      O Offline
                      O Offline
                      obermd
                      wrote on last edited by
                      #36

                      I'm not even sure your base premise is correct, since Windows was developed as a single user system and Linux a multi user system. As for your observation about Linux shutdown, running sudo is the correct thing to do. Linux was derived from a multi-user environment and allowing any random user to shutdown the OS is not a good thing to do. The reason the console GUI shutdown works without sudo is because there is an underlying assumption that if you're using the console GUI then you're running in single user mode. I suspect the remote X-Windows GUI will require sudo to operate, just like Windows "hiding" the shutdown option when using RDP to connect to a remote system.

                      D 1 Reply Last reply
                      0
                      • R realJSOP

                        The commandline is available to any process running under any account, and therefore it's wise in that instance to ask for credentials before shutting down (guards against remote shutdown). The UI, on the otherhand requires the user to be sitting there, and shutting down is a deliberate act, thus, no credntials required. I'm not sure, but requiring credentials before shutting down via the UI might be subject to a a system setting. I don't know for surem, but it's something to investigate if you are so inclined.

                        ".45 ACP - because shooting twice is just silly" - JSOP, 2010
                        -----
                        You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
                        -----
                        When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

                        D Offline
                        D Offline
                        dandy72
                        wrote on last edited by
                        #37

                        That's an interesting thought. Arguably, I've already provided my credentials when I logged in, but that's the case whether that was through the UI or purely a command line (like SSH). If I've logged in via the UI, then any command prompt window I subsequently open "should" inherently know who I am.

                        R 1 Reply Last reply
                        0
                        • F Forogar

                          I really miss working on those old Vaxes (Vaxii?) VMS was the business!

                          - I would love to change the world, but they won’t give me the source code.

                          K Offline
                          K Offline
                          kalberts
                          wrote on last edited by
                          #38

                          The proper plural form is "vaxen". That was a commonly used terms in those days.

                          1 Reply Last reply
                          0
                          • M megaadam

                            My UI always prompts me for a password if I try to do "big stuff". The UI is calling the underlying commands. Your behaviour I never saw. My guess is that you have the passwd saved somewhere in the UI.

                            "If we don't change direction, we'll end up where we're going"

                            D Offline
                            D Offline
                            dandy72
                            wrote on last edited by
                            #39

                            I want to believe you, but I've used dozens of distributions, and I've *never* been prompted to enter my password to do a shutdown, except from a command prompt. I've never done nearly enough with Linux to have it save passwords beyond whatever default settings exist. When installing the OS, I generally add myself as an administrator (that's part of the standard install), and I hardly ever create additional accounts or try to strip down rights from my default account.

                            1 Reply Last reply
                            0
                            • L Lost User

                              dandy72 wrote:

                              "Linux is better thought-out than Windows"

                              You should read "the old new thing" a bit.

                              Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^] "If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.

                              D Offline
                              D Offline
                              dandy72
                              wrote on last edited by
                              #40

                              Isn't that Raymond Cheng's (Chang?) blog? Is he still posting? I've watched a couple of his "one-minute answer" videos on Channel 9, but I honestly have never taken the time to read his blog.

                              L 1 Reply Last reply
                              0
                              • L Lost User

                                that's from the console - it's then assumed that it's either a single user machine or locked up in a server room - so that user accessing the command should have a clue or two what they're choosing to do. running the gui remotely normally* doesn't allow root operations (* - of course there are hoops that if correctly arranged and jumped through that can change) sudo is only for children and below* (* - people that really should just stay on windows)

                                D Offline
                                D Offline
                                dandy72
                                wrote on last edited by
                                #41

                                lopati: roaming wrote:

                                sudo is only for children and below* (* - people that really should just stay on windows)

                                What a mixed message. The Linux graybeards all tell you to *always* run as a limited user and you're a fool if you ever login as root. Or am I misinterpreting your answer here?

                                L 1 Reply Last reply
                                0
                                • S Super Lloyd

                                  I suspect if you run the UI remotely it will prompt for a password....

                                  A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

                                  D Offline
                                  D Offline
                                  dandy72
                                  wrote on last edited by
                                  #42

                                  I'll have to try. I tend to run my Linux VMs right from the Hyper-V console when RDPed into the Hyper-V host itself; in that context, VMs (Windows and Linux) tend to see that as local, not remote. I'll have to try with VNC or some equivalent. I hardly ever take the time to configure my Linux VMs to let me log in that way.

                                  1 Reply Last reply
                                  0
                                  • M Mark_Wallace

                                    Seems a bit pointless, to me. I mean, why on Earth would anyone ever want to shut down a computer?

                                    I wanna be a eunuchs developer! Pass me a bread knife!

                                    D Offline
                                    D Offline
                                    dandy72
                                    wrote on last edited by
                                    #43

                                    Mark_Wallace wrote:

                                    I mean, why on Earth would anyone ever want to shut down a computer?

                                    Well, there's that. :-) I play a lot with different Linux distributions--way, way more than will work with my Linux VM host's 32GB of RAM. I have another host with 64GB, but that one's for my Windows VMs only.

                                    1 Reply Last reply
                                    0
                                    • T TheRaven

                                      Amazing observation; more than an oversight, it's an issue most likely avoided as I'm certain that (OP), myself and many others have seen this and wandered what the deal is. DE and DM software generally run in a SuDo style mode with certain privileges one of which is shutdown & restart among others. One reason (or several actually) that most old hand system administrators prefer to run Linux & BSD systems via the prompt rather than installing anything like a GUI desktop environment --security concerns, stability (some apps may not function correctly without special privileges) and most times GUI clutters their workspace. Anyway, Linux like any other operating system is subject to developer over sight else we wouldn't need security patches and new kernels. Additionally, Linux is not better thought out than Windows it is implemented in a way that the particular distribution is laid out logically if anything. Windows on the other hand could still benefit from better directory structure and more "in-your-face" security and systems management for those whom not a current copy of the contemporary Windows System Administrator Guide on hand. Neither O.S. is close to perfect and the sooner everyone accepts the fact the sooner things can get rolling again toward better security and stability --right after we get away from Intel's Spectre-Meltdown platform (makes you wander if Intel isn't in anti-virus software investment portfolio somewhere in the shadows, hunh)... Good article regardless.

                                      I was unaware of that...

                                      D Offline
                                      D Offline
                                      dandy72
                                      wrote on last edited by
                                      #44

                                      TheRaven wrote:

                                      Windows on the other hand could still benefit from better directory structure and more "in-your-face" security

                                      Gawd, more in-your-face than the constant UAC prompts? I thought those were already excessive... :-)

                                      TheRaven wrote:

                                      makes you wander if Intel isn't in anti-virus software investment portfolio somewhere in the shadows,

                                      Did you forget they've purchased McAfee for a few billions a few years back...?

                                      T 1 Reply Last reply
                                      0
                                      • M Mike Hankey

                                        Forogar wrote:

                                        I really miss working on those old Vaxes (Vaxii?) VMS was the business!

                                        I really enjoyed working on them too! uVAX was an awesome machine!

                                        I'm currently unsupervised, I know it freaks me out too! JaxCoder.com

                                        K Offline
                                        K Offline
                                        kalberts
                                        wrote on last edited by
                                        #45

                                        Maybe there were good uVax implementations. But the first attempt to build a small Vax was the 730. From a performance point of view, it was a nightmare! Friends of mine were using it and reported that had timed the filling an 80 char input buffer with spaces to take 20 milliseconds. A process switch took 100 ms - 1/10 second(!). In their project, they had to change the software architecture from three to two processes (and redistribute the functions) in order to reduce the required number of process switches; that significantly increased the performance of their application. It took just a few weeks before someone got hold of a big yellow-green "Turtle Wax" sticker to put on the front panel of the machine. The 730 was an extremely microcoded machine, with a highly vertical architecture: While the 780 had a 96 bit microcode word, so that it could issue 96 signals per microcycle, the 730 had 24 bits, heavily multiplexed. So the meaning of one bit could depend a lot on other bits, and had to be decoded by a logic network before sent to the actual circuits. The hardware itself was also far simpler, so it took a lot more microcycles to perform one complete machine instruction. Even the 780 had some hardware limitations, the strictest one (for the performance) was that all page tables had to be resident in memory; it couldn't handle a page fault in the page fault interrupt handler. In 1970 or 80, our university had one 780 with a whooping 1 megabyte of RAM. Whenever the electronics guys ran their circuit layout program, which used immense amounts of virtual memory, they had to reboot the machine with a large page table configuration so that more than 600K was taken by the page tables and resident part of the OS, slightly more than 300 kbyte was available for paging of user programs and non-resident OS parts. You may call it "CPU abuse" to run a VAX 780 CPU on 1 megabyte of RAM, but if you weren't there at the time, you would never believe the cost of RAM in those days...

                                        1 Reply Last reply
                                        0
                                        • N Nathan Minier

                                          Well, first, if you install a graphical UI on a system that runs production-critical tasks, you're doing it wrong. Second, the UI systems I've seen use dmesg to bypass the normal IO flow, and assign permissions to grant permissions to the UI, not the user, to perform tasks such as shutdown and network configuration. It does this specifically so the system can have base-level users that don't want to get into the system administration game. If you don't want to UI to have those permissions....remove those permissions. It's not terribly hard, and it's generally not an oversight.

                                          "Never attribute to malice that which can be explained by stupidity." - Hanlon's Razor

                                          D Offline
                                          D Offline
                                          dandy72
                                          wrote on last edited by
                                          #46

                                          Nathan Minier wrote:

                                          if you install a graphical UI on a system that runs production-critical tasks, you're doing it wrong.

                                          I take it most Linux distributions aren't intended to run production-critical tasks, then. I'll have to remember that argument.

                                          Nathan Minier wrote:

                                          If you don't want to UI to have those permissions....remove those permissions. It's not terribly hard, and it's generally not an oversight.

                                          What you're saying is that most Linux distribution creators choose to ship in a "convenience over security" state.

                                          R N 2 Replies Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups