Learning about Linux : Ask/Answer A Quick Question thread

Discussion in 'Other Operating Systems' started by shredder, Feb 2, 2020.

  1. shredder

    shredder Member

    Joined:
    Dec 26, 2001
    Messages:
    13,969
    Location:
    New Zealand
    Self explanatory-ish title.

    I've been in Ubuntu for probably 4 years now but still quite a noob in many ways. So I might throw out the odd random question into this thread, and encourage other less-experienced OCAU Linuxers to do the same if wanted.

    Just little things that may not warrant their own thread, and which local experts may enjoy momentarily flexing their brain muscle to insta-solve.

    Let us get this ellipsoid perambulating, as per thusly :

    --

    Who should be the owner of /bin and it's contents ?

    I've just mistakenly sudo chown -R 'd it to the user account, when I meant to do ./bin. (insert obligatory spazgif)

    Hopefully didn't expose my orifii to the masses, helpfully exacerbating by posting the details publicly, ho ho.
     
    Last edited: Feb 2, 2020
  2. Quadbox

    Quadbox Member

    Joined:
    Jun 27, 2001
    Messages:
    6,504
    Location:
    Brisbane
    all users need *access* to /bin
    I mean ffs that's where the shells are. Having said that, there are often applications in /bin that may be more subtley permissioned. mount springs to mind
     
    shredder likes this.
  3. GumbyNoTalent

    GumbyNoTalent Member

    Joined:
    Jan 8, 2003
    Messages:
    9,707
    Location:
    Briz Vegas
    Ok lets start the religious debate, now that your understanding is going deeper than pretty desktops (not for you, but newbies), lets start on a topic of much contention that has been raging for many decades.

    So lets start with the basics of FHS (Filesystem Hierarchy Standard) https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

    So /bin is all binaries needed for SINGLE user mode, and is also used by all users, but in multi-user mode which is where most people use Linux any other binary that isn't essential for SINGLE user mode Linux lives in /usr/bin. Whats the difference? Well this is where the debate begines as to what is essential to SINGLE user mode, even though it is used by all users is it essential to SINGLE user mode.

    But wait we have more there is /usr/local/bin which is where non-essential binaries for non SINGLE user mode Linux.

    But wait we have more...

    Because more people want to distribute there project with EVERYTHING because RPM and DEB are horrible at dependency mapping (SARCASM), vendors dump more piles of shit in /var (looking at you Oracale), where you will find bin directories inside of crapware instead of being in /usr/local/bin. Or they forget to symbolic link, or some other piece of crapware has overwritten the symbolic link.

    But just when you thought you had a handle on everything we then have the /home/<user>/.bin and .local/bin which is where things that run their own environments like python also dump themselves, thanks pip... but don't hate on python too much many others do the same. So if you run something that needs a binary Linux first looks in .local/bin, this one catches many people out, including me.

    Now add the ever growing number of jail systems for applications like flatpak etc and .bin and .local/bin get some abuse.

    AND after all that, we have numpty coders and projects that just don't follow the rules.

    Hope your confused, because after 40 years of *NIX I still get confused working out why some piece of shitware has done what it has.
     
    Last edited: Feb 3, 2020
    shredder likes this.
  4. Quadbox

    Quadbox Member

    Joined:
    Jun 27, 2001
    Messages:
    6,504
    Location:
    Brisbane
    Which brings us to the "I've just given up on this commercial application" location, /opt/ :)
     
    shredder and GumbyNoTalent like this.
  5. OP
    OP
    shredder

    shredder Member

    Joined:
    Dec 26, 2001
    Messages:
    13,969
    Location:
    New Zealand
    Quick question:

    Background:

    Retroarch/Lakka stores all it's input settings in /retroarch.cfg. Retroarch's design choices make it impossible to set up certain input configurations. Namely, assigning different game controllers to different (emulation) cores (without physically unplugging and plugging controllers constantly for different games, which is stupid).

    Question:

    I want to work around this limitation by having two retroarch.cfg's (i.e. one for each configuration I want), and inserting the appropriate one onto the drive prior to boot. And perhaps write it out again on shutdown - I don't really know what the elegant solution would be for this sort of thing. I assume I'll need to edit grub and/or something similar.

    Or perhaps I just need to be told this is a foolish approach and do something different. In which case question 3 is going to be "what?". :)
     
    Last edited: Feb 21, 2020
  6. Quadbox

    Quadbox Member

    Joined:
    Jun 27, 2001
    Messages:
    6,504
    Location:
    Brisbane
    I swear to god there's a tool for doing exactly this, switching between config files an restarting services based on a hardware change, but for the life of me I cannot remember what it's called, and my google fu is failing me. will ponder overnight and see if I can remember. Used to be pretty commonly used for doing stuff like handling laptops with docking stations, and what not, back in the day iirc

    EDIT - I think I was thinking of hprofile, which might not be flexible enough for what you want looking at its documentation. Oh well
     
    Last edited: Feb 21, 2020
  7. waltermitty

    waltermitty Member

    Joined:
    Feb 19, 2016
    Messages:
    1,453
    Location:
    BRISBANE
    udev lol?
     
  8. Sledge

    Sledge Member

    Joined:
    Aug 22, 2002
    Messages:
    8,689
    Location:
    Adelaide
    /me comes in... slowly backs away with confused look.....
     
    M1ck1 likes this.
  9. Primüs

    Primüs Member

    Joined:
    Apr 1, 2003
    Messages:
    3,423
    Location:
    CFS
    What frustrates me even more - is the inconsistencies of the repositories between distros for the same piece of software. Ubuntu, for instance, having /etc/apache/sites-enabled and sites-available style config vs even CentOS and YUM just having /etc/apache/httpd.conf - or FreeBSD, /usr/local/etc/apache/httpd.conf (but BSD vs Linux makes sense of why some differences)

    As mentioned above, you also sometimes just get apps that install themselves wholly to /opt

    In general - I like the idea of the commercial large applications being segregated into /opt, and even having their own binary path (/opt/<app>/bin/) but I see where this could become a hassle with namespace, but then - where do you put dependencies, who decides what goes where.

    Administering Linux is a clusterfuck - you basically have to know and learn your environment and not stray from it if you want to have all the knowledge on-hand and not have 10-20minutes of fact finding every time you log in to a new box. I still prefer it over WIndows and their fucked up rules, especially when it comes to DC's, and Licensing.
     
  10. waltermitty

    waltermitty Member

    Joined:
    Feb 19, 2016
    Messages:
    1,453
    Location:
    BRISBANE
    containers my friend
     
  11. GumbyNoTalent

    GumbyNoTalent Member

    Joined:
    Jan 8, 2003
    Messages:
    9,707
    Location:
    Briz Vegas
    Primüs httpd.conf is the correct file for configuration of apache, while nginx.conf is config for nginx server.

    sites-available are vhosts directives which symlink to sites-enabled, I'm not 100% sure who started the schema.
    https://httpd.apache.org/docs/current/configuring.html#main

    Oracle and others aligned with Redhat early in the piece, and started the trend of shoveling in everything they needed to work in /opt/shitware/bin/ because their java developers mainly wrote their shitware middleware to run on Windows first, and brought over the retarded mentality of including everything you use in your distribution mentality.

    Debian, old inflexible Debian (oh how I miss thee) was more religious with keeping everything in their rightful place, similar to BSD, maintaining the legacy of the past, but too many noobs couldn't wrap their head around the simple concept of "stable" vs "testing" and would whine about how long it took Debian to promote to "stable", in years gone by you could bet your jewels/plums on "stable' being "stable". Then Ubuntu came along built its eco system on using "stable" with bits from "testing" that where good enough but not yet passed Debian scrutiny and captured lots of the market has proven, systemd is not needed for servers.

    Redhat also have speed up the process in the past decade, which has lead to less then secure POS updates making it to production way before they really should have... looking at you Poettering and SystemD.

    Also the convergence of Desktop and Server into basically a single repo has also lead to less then exemplary releases into the "server" distributions, to this day i still do not understand why a server needs systemd as it should be slow changing, as Apine Linux meteoric rise on the back of OpenRC and hardened userspace practices.

    /RANT
     
    Last edited: Feb 25, 2020
  12. Sledge

    Sledge Member

    Joined:
    Aug 22, 2002
    Messages:
    8,689
    Location:
    Adelaide
    Ok, so it begins...
    Fresh install of Ubuntu(20.04) on new NVME with / and swap partitions.
    But i can't log in... It just sits at the log in screen. I did turn on automatic login during the installation too..
    If i do a WRONG password, it says it's wrong, but if i do CORRECT password, it just stays at login screen.
    I can see a lot of different fixes.. but surely it can't have such a bug with a fresh install?

    TIA!

    similar issue maybe?
    https://askubuntu.com/questions/1059458/ubuntu-18-04-on-login-loop-even-with-correct-password
     
  13. waltermitty

    waltermitty Member

    Joined:
    Feb 19, 2016
    Messages:
    1,453
    Location:
    BRISBANE
    Did you try the steps in the first answer?
     
  14. Sledge

    Sledge Member

    Joined:
    Aug 22, 2002
    Messages:
    8,689
    Location:
    Adelaide
    Not yet....
    Had to go to bed and sleep
    you mean: sudo chown <username>:<username> -R /home/<username>
    ?

    or: ls -l ~/.Xauthority ls -l ~/.ICEauthority ls -ld ~
    ?
     
  15. waltermitty

    waltermitty Member

    Joined:
    Feb 19, 2016
    Messages:
    1,453
    Location:
    BRISBANE
    It's probably more important to drop into a TTY (CTRL + ALT + F1) where you can see the actual error, or access a shell at least, then you can check your Xorg log and see what's going on.
     
  16. Sledge

    Sledge Member

    Joined:
    Aug 22, 2002
    Messages:
    8,689
    Location:
    Adelaide
    Ubuntu FB group suggested installing without a swap partition, which i've now done, and i'm now running Ubuntu ;)
    Cheers
     
  17. GumbyNoTalent

    GumbyNoTalent Member

    Joined:
    Jan 8, 2003
    Messages:
    9,707
    Location:
    Briz Vegas
    Is 20.04 even in alpha?
     
  18. Sledge

    Sledge Member

    Joined:
    Aug 22, 2002
    Messages:
    8,689
    Location:
    Adelaide
    Beta i think?
    Seems ok so far.. Once it's final i'll fresh install again
     
  19. Sledge

    Sledge Member

    Joined:
    Aug 22, 2002
    Messages:
    8,689
    Location:
    Adelaide
    Anyone know how to install Docky in 20.04?
    Code:
    sudo add-apt-repository ppa:docky-core/ppa
     This ppa is used for docky developers. Beta testing anything here is like walking into a burning building. We wont stop you, but you will probably get cooked alive.
     More info: https://launchpad.net/~docky-core/+archive/ubuntu/ppa
    Press [ENTER] to continue or Ctrl-c to cancel adding it.
    
    Hit:1 http://au.archive.ubuntu.com/ubuntu focal InRelease
    Ign:2 http://ppa.launchpad.net/docky-core/ppa/ubuntu focal InRelease           
    Hit:3 http://security.ubuntu.com/ubuntu focal-security InRelease               
    Hit:4 http://au.archive.ubuntu.com/ubuntu focal-updates InRelease             
    Hit:5 http://au.archive.ubuntu.com/ubuntu focal-backports InRelease
    Ign:6 http://ppa.launchpad.net/docky-core/stable/ubuntu focal InRelease
    Err:7 http://ppa.launchpad.net/docky-core/ppa/ubuntu focal Release
      404  Not Found [IP: 91.189.95.83 80]
    Err:8 http://ppa.launchpad.net/docky-core/stable/ubuntu focal Release
      404  Not Found [IP: 91.189.95.83 80]
    Reading package lists... Done
    E: The repository 'http://ppa.launchpad.net/docky-core/ppa/ubuntu focal Release' does not have a Release file.
    N: Updating from such a repository can't be done securely, and is therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user configuration details.
    E: The repository 'http://ppa.launchpad.net/docky-core/stable/ubuntu focal Release' does not have a Release file.
    N: Updating from such a repository can't be done securely, and is therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user configuration details.
    
     
  20. GumbyNoTalent

    GumbyNoTalent Member

    Joined:
    Jan 8, 2003
    Messages:
    9,707
    Location:
    Briz Vegas
    install_docker.sh (run sudo install_docker.sh)
    Code:
    #!/bin/bash
    # Install Docker Debian/Ubuntu x86
    sudo apt update && sudo apt upgrade -y
    
    sudo curl -fsSL https://get.docker.com/ | sh
    
    COMPOSE=$(curl --silent "https://api.github.com/repos/docker/compose/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
    sleep 10
    sudo curl -L https://github.com/docker/compose/releases/download/$COMPOSE/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
    sudo chmod +x /usr/local/bin/docker-compose
    sudo ln -sf /usr/local/bin/docker-compose /usr/bin/docker-compose
     

Share This Page

Advertisement: