Announcement

Collapse
No announcement yet.

Desnapping Kubuntu

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    OT:

    Originally posted by rossdv8 View Post
    […]
    I never thought of looking for a Qt equivalent of Zenity - and frankly didn;t even consider that there might be one. I'll go find it. […]
    It is preinstalled by default - just enter kdialog --help.
    Also see e.g. Shell scripting with KDE dialogs.
    Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
    Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

    get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
    install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

    Comment


      #17
      I started using KDE when Mandrake first came out. How is it you waited until now to tell me I could've been using Kdialog instead of Zenity since Noah was taking swimming lessons?

      Seriously though, I never bothered making GUIs for any scripts until about 15 years ago when I decided to make my Dye Sublimation scripts easier to use and looked up GUI for Bash - and Zenity came up. I was using Xfce again and didn't even think of Qt.

      You have breathed new life into the 'Retirement Boredom' I'm resigned to.

      Thanks again, I feel like a but it is making me think again . .

      Comment


      • oshunluvr
        oshunluvr commented
        Editing a comment
        I love this post, LOL

      #18
      Since we fell into scripting and notifications, I use "notify-send" for automation scripts. For example, I use a daily cron script to make a snapshot daily and a backup on Sunday.

      I want to know that the job was done without having to manually go to the snapshot/backup locations and look at date/time stamps so the script notifies my user via notify-send and puts a message in notifications on my desktop.

      The code looks like:
      Code:
      su $NOTIFYUSER -c "export DISPLAY=${NOTIFYDISPLAY}; /usr/bin/notify-send -i ksnapshot -t 0 'Daily snapshots:' 'Snapshot operation complete.'"
      The two variables are set in the script:
      NOTIFYUSER="stuart"
      NOTIFYDISPLAY=":0.0"

      The options I use:
      -c = set the message category
      -i = icon to use in the message box
      -t = message timeout. 0 means never timeout

      My cron job runs at​ 5:30ish (or soon after I power it on) and the message looks like:

      Click image for larger version

Name:	Screenshot_20240406_093209.jpg
Views:	156
Size:	16.2 KB
ID:	677948

      Zero timeout means it stays there until I close it.

      IMO this is a great way to know automatic jobs have been done. Obviously, I the script also notifies of failure of the task so I can see what went wrong.

      Please Read Me

      Comment


        #19
        There are four scripts regarding "removing Snap in Kubuntu" or "de-snapping Kubuntu" now:
        1. Script to get rid of Snap (meant for Kubuntu 20.04 LTS and later)
        2. Script to install traditional Firefox (meant for Kubuntu 22.04 LTS and later - can also be used additionally to the Firefox Snap)
        3. Script to install traditional Thunderbird (meant for Kubuntu 24.04 LTS - can also be used additionally to the Thunderbird Snap)
        4. Script to reinstall Snap for release-upgrade (meant for Kubuntu 20.04 LTS and later)
        They can all also be downloaded from my GitLab page: Scripts (for Kubuntu)
        Last edited by Schwarzer Kater; Apr 21, 2024, 01:38 PM.
        Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
        Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

        get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
        install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

        Comment


          #20
          Black Kat, while you are in the 'writing scripts' frame of mind, and based on what Canonical has apparently begun doing with regard to more or less blocking .deb packages from installing through Software Centre (if double-clicking a .deb now doesn;t open it in Software centre, and gdebi is not installed by default, there's a good chance that 'might' accidentally flow over into Kubuntu) - would it make sense to add a script to install and activate 'FlatHub' for those who know what it is and like it?

          Assuming it would work well enough in Kubuntu . .

          I know it is easy enough for 'some' of us to write our own, but it might make a nice solution to have the complete 'set' in one place, written by someone who obviously is happy scripting things that just 'work'.

          Comment


            #21
            OT:

            Have they begun doing that? Honestly I have never installed downloaded .deb files other than with dpkg -i

            And regarding "FlatHub" - do you mean the Flathub repository and How to enable Flatpak in Kubuntu 24.04 LTS?
            IMHO this would not be worth writing a script for as the user can easily do this with Discover (OK, except for the kde-config-flatpak module).
            Last edited by Schwarzer Kater; Apr 26, 2024, 08:49 PM.
            Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
            Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

            get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
            install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

            Comment


              #22
              Originally posted by Schwarzer Kater View Post
              OT:

              Have they begun doing that? Honestly I have never installed downloaded .deb files other than with dpkg -i

              And regarding "FlatHub" - do you mean the Flathub repository . . .
              .
              I probably did, but after I wrote that I got curious and opened Discover in both FrankenMint, based on Kubuntu backports, and in Neon.
              In the Kubuntu based 'thing' that I run, Discover had both Flatpack AND Snaps Enabled in Settings, despite me running the disable Snaps script. So I am not sure what is happening there. maybe something weird that I did.

              In Discover in neon though, Flatpacks were Enabled in Settigns while Snaps had an option to Enable if I wanted.

              And of course, it is possible I may have accidentally run the desnap script on the wrong computer, since both th KubuntuOS and the Neon OS run on the same monitor with the same keyboard and mouse - at the same time, just on different susyems shared of course via VNC.

              Anyway, I worked out where I needed to look easily enough and I suspect a new user would too. Your link(s) will probably take me somewhere similar.

              So my suggestion is more or less moot, and if it were not for normal Forum Rules about removing a reply once it has been commented on - I would probably delete it.

              As for the existing scripts, they are simple to use, and easy enough that even someone fairly new should be able to follow them, so I rather like them.

              Comment


                #23
                I have to point out that the scripts are not meant at all for "FrankenMint" (GTK stuff?!?) or KDE neon (e.g. Plasma 6 and only pkcon instead of apt is officially supported in neon !)​ and have never been tested with "FrankenMint".

                In KDE neon you will always get a warning (I just re-tested all of the scripts in a neon VM), that the distribution you run the script on is not supported and that you proceed at your own risk.
                • If you run the get_rid_of_Snap script in a default installation of​ KDE neon, after the warning so far only snapd is removed and also blocked. In this context squashfs-tools, plasma-discover-backend-snap and a broken symbolic systemd link are also removed.
                  Afterwards you will not be able to install Snaps or snapd anymore.
                  .
                • If you run the reinstall_Snap_for_release-upgrade script in a default installation of​ KDE neon, there is the warning and then so far the "prefer Firefox from the Mozilla Team PPA APT pinning" is removed​​ and during the next system update the Firefox Snap will be installed!

                  If you run the reinstall_Snap_for_release-upgrade script in neonafter having used the ​get_rid_of_Snap script​ before​, there is the warning first and then so far snapd is installed and also unblocked. The "prefer Firefox from the Mozilla Team PPA APT pinning" is removed​​ and during the next system update the Firefox Snap will be installed!​ Furthermore squashfs-tools and plasma-discover-backend-snap are also installed.​
                  .
                • In a default KDE neon installation the install_traditional_Firefox script can not do anything after the warning, because Firefox is already installed from the Mozilla Team PPA there.
                  .
                • After the warning the install_traditional_Thunderbird script​ will be able to install the "traditional" Thunderbird from Mozilla.org to /opt, if you have not installed it by yourself before from there in neon. It will also be able to remove Thunderbird from /opt again (after the warning).
                  This is not recommended as you prabably can also install Thunderbird additionally from the Mozilla Team PPA and possible different version will try to share the same settings and data (I had no time to test this)…
                Keep in mind that the scripts are only meant for and have been thoroughly tested with Kubuntu : both the "remove" and "install" Snap scripts for 20.04 & later, the "Firefox" script for 22.04 & later and the "Thunderbird" script for 24.04!​
                I will not support any other use case - my detailed answer regarding KDE neon was a onetime exception.

                But I'm sure you will figure it out on your own, because you can simply read the comments within the scripts and test the single steps and commands one by one in Konsole.
                Please let me know if there are comments that could and should be improved, thank you.
                Last edited by Schwarzer Kater; Apr 27, 2024, 06:34 AM.
                Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
                Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

                get rid of Snap script (20.04 +)reinstall Snap for release-upgrade script (20.04 +)
                install traditional Firefox script (22.04 +)​ • install traditional Thunderbird script (24.04)

                Comment


                  #24
                  Originally posted by Schwarzer Kater View Post
                  I have to point out that the scripts are not meant at all for "FrankenMint" . .
                  I'm pretty sure I read somethign about that once. Actually I might have read a warning about it a couple of times, and perhaps there was sonething about trying it in anything else at our own risk.
                  Whatever the situation, it didn't seem to upset poor old FrankenMint too much. Since it is basically built using the tried and tested Kubuntu Backports blended into a Mint Xfce that was already modded into a 'mostly Qt' Xfce system, and since I have an almost identical 'twin' of my main computer running a duplicate /home drive as a backup, I can quite happily experiment on one machine at a time.

                  Of course that doesn;t mean it won't break tomorrow . . But its been fine for a month . .

                  Comment


                    #25
                    Originally posted by Schwarzer Kater View Post
                    First, THANK YOU For the script.. its running right now to cleanse my system... Definitely saved me some time doing it by hand...

                    Second, I am just curious as to why the script needs to update the crud? When I did this last install and did by hand.. I just nuked the crap... didn't update them... just nuked the packages, one by one, and the removed snapd, and then put the apt block in...

                    Again, I am just curious about the process thats all.. Maybe there is a reason to dot that, shrug, could be... like I said I just nuked it straight out... moved on... just curious on it...

                    Thanks again, seems to be a success.. I have a cleansed system now... next to reinstall FF as a REAL DEB...

                    Comment


                      #26
                      I had desnapped manually, before Schwarzer Kater's script was released, and I was expecting trouble as Schwarzer Kater had warned that a release upgrade would refuse to run or fail if attempted without snap installed. However, I ran sudo do-release-upgrade, and apart from stalling for a few minutes at "INFO Waiting for automatic snapd restart..." and losing newlines (and thus piling the rest of the release upgrade onto the bottom line of the konsole window), it proceeded and completed. After a restart, I then had to desnap again.
                      Regards, John Little

                      Comment

                      Working...
                      X