Announcement

Collapse
No announcement yet.

What is the Terminal command to show the K ?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    What is the Terminal command to show the K ?


    What is the Terminal command to show the K ?

    K means the installed iso was:
    Kubuntu 22.04 not
    ubuntu 22.04


    Command 1:
    lsb_release -ds

    Ubuntu 22.04.1 LTS


    Command 2:
    lsb_release -ds |tr '\n' ' ' ; cat /etc/os-release | grep -i --color=always 'version=' | awk '{print $3 " "$4}' |tr '"' ' ' ;

    Ubuntu 22.04.1 LTS (Jammy Jellyfish)


    What is the Terminal command to show the K ?
    K as in the Operating System is :
    Kubuntu 22.04.1 LTS (Jammy Jellyfish)


    ​--

    #2
    The OS is Ubuntu. The DE (Desktop Environment) is KDE Plasma.
    Using Kubuntu Linux since March 23, 2007
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3

      Snowhog ​> The OS is Ubuntu. The DE (Desktop Environment) is KDE Plasma.​


      Ok.


      plasmashell --version
      above in Terminal shows :

      plasmashell 5.24.6


      ​What is the Terminal command to show K?
      Kubuntu ... Desktop Environment
      or
      K _ something


      --

      Comment


        #4
        Originally posted by joseph22 View Post
        ​What is the Terminal command to show K?
        To show K.......what?
        Plasma is the desktop environment so plasmashell --version is correct, as you see.

        Kubuntu needs to have these report as Ubuntu, as quite a lot of things that depend on being reported (correctly) as ubuntu would break otherwise.
        Kubuntu is NOT really a separate distro from Ubuntu

        HOWEVER, look at tools like neofetch for all the cool details that show the K


        I can't off the top of my head recall exactly where tools like neofetch on the command line and KInfoCenter get the specifics that show Kubuntu,. but it should be easy to discover, I think.
        Edit:
        Actually, in if I am reading it correctly, on Ubuntu neofetch looks for the presence of desktop-specific directories in /etc/xdg/ to determine which Flavour it is, so there being a 'plasma-something-or-other' there sets it to Kubuntu
        Last edited by claydoh; Sep 14, 2022, 01:25 PM.

        Comment


          #5
          Are you trying to do something like this?

          Code:
          awk -F" " 'BEGIN {printf "K"}{ printf tolower ($1) " " ($2)}' /etc/issue


          EDIT: Corrected the code a little
          Last edited by MoonRise; Sep 14, 2022, 08:05 PM.

          Comment


            #6
            Originally posted by MoonRise View Post
            Are you trying to do something like this?
            Code:
            awk -F" " 'BEGIN {printf "K"}{ printf tolower ($1) " " ($2)}' /etc/issue
            above result is
            Kubuntu 22.04.1

            Yes the above is a desired result but,
            No​ it is not desired because it appears a K was manually inserted.

            Manually inserting a K is not desired.
            Like manually inserting a K with
            Code:
            echo "K" |tr '\n' '\000' ; lsb_release -ds
            KUbuntu 22.04.1 LTS


            i was looking for a native command that
            would interrogate the computer and show something like:
            K_
            K_desktop_envoronment
            K_something

            said differently
            Looking for a command that
            interrogates the computer and reflects the fact
            that the install comes from the iso:

            kubuntu-22.04.1-desktop-amd64.iso
            3.4 GiB (3,674,746,880) bytes

            meaning computer is running
            kubuntu-22.04.1 not
            ubuntu-22.04.1

            Comment


              #7
              That will be hard, as kubuntu=ubuntu as an OS. If the OS level marking say 'kubuntu' instead of 'ubuntu' there are many things that can break
              Kubuntu is not a separate, unique OS or distro.

              This is how neoftech discovers if it is Kubuntu or Xubuntu, etc:
              Code:
              # Get Ubuntu flavor.
              if [[ $distro == "Ubuntu"* ]]; then
              case $XDG_CONFIG_DIRS in
              *"studio"*) distro=${distro/Ubuntu/Ubuntu Studio} ;;
              *"plasma"*) distro=${distro/Ubuntu/Kubuntu} ;;
              *"mate"*) distro=${distro/Ubuntu/Ubuntu MATE} ;;
              *"xubuntu"*) distro=${distro/Ubuntu/Xubuntu} ;;
              *"Lubuntu"*) distro=${distro/Ubuntu/Lubuntu} ;;
              *"budgie"*) distro=${distro/Ubuntu/Ubuntu Budgie} ;;
              *"cinnamon"*) distro=${distro/Ubuntu/Ubuntu Cinnamon} ;;
              esac
              fi​
              $XDG_CONFIG_DIRS would be /etc/xdg
              The presence of the dir or file containing 'plasma' tells the neofetch script to show Kubuntu.

              You might look and see if the file /etc/issue or /etc/issue/net mention Kubuntu. but they probably all say Ubuntu.
              There is no 'kubuntu' until you get to the login screen, and still, the OS remains Ubuntu, of course.



              Aaaaaaactually......kinfocenter uses something to show Kubuntu and not Ubuntu, so Kubuntu adds something somewhere for that application to read this info

              /etc/xdg/kcm-about-distrorc <----- Bingo!
              But there is no special command, just need to create a basic script to read that line. that shows Kubuntu.
              Last edited by claydoh; Nov 06, 2022, 08:57 AM.

              Comment


                #8
                Originally posted by claydoh View Post
                /etc/xdg/kcm-about-distro <----- Bingo!
                But there is no special command, just need to create a basic script to read that line. that shows Kubuntu.
                This computer has no such file:
                /etc/xdg/kcm-about-distro

                Computer has:
                /etc/xdg/kshorturifilterrc
                or
                said differently, computer has:
                /media/X/4eb08847-7b1a-4aa2-b27f-5bdae96ae4ab/etc/xdg/kshorturifilterrc

                Computer has: ​
                kcm-driver-manager.mo
                kcm-whoopsie.mo


                Question:
                What other file shows Kubuntu and not Ubuntu?

                Comment


                  #9
                  That's odd as my 22.04, 20 04 and Neon installs have this file, as do most distros generally iirc

                  I did have a minor typo. It will be kcm-about-distrorc.

                  Comment


                    #10
                    Originally posted by claydoh View Post
                    That's odd as my 22.04, 20 04 and Neon installs have this file, as do most distros generally iirc
                    I did have a minor typo. It will be
                    kcm-about-distrorc.



                    /etc/xdg/kcm-about-distrorc

                    Code:
                    grep -i 'Name' /etc/xdg/kcm-about-distrorc | cut -c 6-12 |tr '\n' ' ' ; \
                    lsb_release -ds |tr '\n' ' ' | cut -c 7- |tr '\n' ' ' ; \
                    grep -i 'version=' /etc/os-release | awk '{print $3 " "$4}' |tr '"' ' ' ;

                    desired result

                    Kubuntu 22.04.1 LTS (Jammy Jellyfish)



                    double space after Kubuntu indicates a construct, not 1 command:​

                    Comment


                      #11
                      Originally posted by joseph22 View Post
                      /etc/xdg/kcm-about-distrorc


                      more precision, file location ...
                      How to show Device Path, Parent folder, file:
                      kcm-about-distrorc


                      Code:
                      filez=/etc/xdg/kcm-about-distrorc && \
                      df $filez | \
                      grep dev | awk -v var=$filez '{print $1 var}'


                      /dev/nvme0n1p3/etc/xdg/kcm-about-distrorc


                      Comment


                        #12
                        /etc/xdg/kcm-about-distrorc is the correct, precise path.

                        The device (/dev/<whatever>/) is completely irrelevant here, as this will be completely different for each computer, depending on one's specific drive types, partition schemes, and OS layouts.

                        Comment

                        Working...
                        X