Spyke

Posts

pcmasterrace·PC Master Racebyrenzev

Why do people insist on doing this?

  1. Family member has 720p webcam
  2. Family member buys shiny new 1080p webcam
  3. Family member plugs in shiny new webcam and gives me a videocall to test it
  4. New camera works flawlessly. I get to keep the old 720p cam. Yippee!!

...BUT THEN

  1. Family member goes to the website listed on camera's packaging and clicks the big blue download button
  2. download button installs custom usb driver and companion app
  3. companion app has twenty quadrillion toggles and dials spread across fifty billion tabs and sub menus. Family member spends all evening twiddling with it.
  4. No matter what, the image looks like crap. Too bright, but not enough contrast. Worse than it did originally.
  5. next day family member asks for his old 720p webcam back, I get to keep the 1080p webcam

I'm happy with my new webcam so I'm not complaining, but why do people do this?? Why do manufacturers make these shitty custom driver? The whole point of USB is to be plug-and-play without any custom software.

View original on lemmy.world
389

This week on "ancient unix hacks that are still somehow a core part of linux": Setuid

Explanation for newbies: setuid is a special permission bit that makes an executable run with the permissions of its owner rather than the user executing it. This is often used to let a user run a specific program as root without having sudo access.

If this sounds like a security nightmare, that's because it is.

In linux, setuid is slowly being phased out by Capabilities. An example of this is the ping command which used to need setuid in order to create raw sockets, but now just needs the cap_net_raw capability. More info: https://unix.stackexchange.com/questions/382771/why-does-ping-need-setuid-permission. Nevertheless, many linux distros still ship with setuid executables, for example passwd from the shadow-utils package.

View original on lemmy.world
295

I'd just like to interject for a moment

Explanation for newbies: The GNU/Linux copypasta is an argument made by Richard Stallman that the operating system should be referred to as "GNU/Linux" or "GNU+Linux" because linux is just the kernel and what makes it useful are the various GNU programs and libraries like coreutils and glibc.

Alpine Linux is a linux distribution that ships without any GNU software (though it can be installed using the package manager).

View original on lemmy.world
342

My heart goes out to shell programmers who have to support posix sh

Explanation for newbies:

  • Shell is the programming language that you use when you open a terminal on linux or mac os. Well, actually "shell" is a family of languages with many different implementations (bash, dash, ash, zsh, ksh, fish, ....)

  • Writing programs in shell (called "shell scripts") is a harrowing experience because the language is optimized for interactive use at a terminal, not writing extensive applications

  • The two lines in the meme change the shell's behavior to be slightly less headache-inducing for the programmer:

    • set -euo pipefail is the short form of the following three commands:
      • set -e: exit on the first command that fails, rather than plowing through ignoring all errors
      • set -u: treat references to undefined variables as errors
      • set -o pipefail: If a command piped into another command fails, treat that as an error
    • export LC_ALL=C tells other programs to not do weird things depending on locale. For example, it forces seq to output numbers with a period as the decimal separator, even on systems where coma is the default decimal separator (russian, dutch, etc.).
  • The title text references "posix", which is a document that standardizes, among other things, what features a shell must have. Posix does not require a shell to implement pipefail, so if you want your script to run on as many different platforms as possible, then you cannot use that feature.

View original on lemmy.world
644