Announcement

Collapse
No announcement yet.

Pkexec and service menus

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

    Pkexec and service menus

    A funny one.
    I have a few service menus that use pkexec. They work just fine on neon.

    I was casually ;·) logged into K20, I used one. No pkexec pop-up.
    I tried them all. No pkexec pop-up.
    If I try pkexec <command> from konsole, it works.

    So: the same exact service menus work on neon and not on K20 (they share the same /home).
    I have groogled around extensively and found nothing.



    [EDIT] Upon further testing: I tried it on K20.04 on the laptop. Practically virgin installation (never use it). They don't work.
    I tried it on K18.04. They work just fine.
    Now, has nobody really noticed that pkexec doesn't work with service menus on Kubuntu 20.04?
    Or what's going on? It can't be the Mediterranean air, can it? :·)
    Last edited by Don B. Cilly; May 22, 2020, 09:57 AM.

    #2
    Honestly, can anyone try this on K20? Acts on any file/dir.

    Code:
    [Desktop Entry]
    Type=Service
    X-KDE-ServiceTypes=KonqPopupMenu/Plugin
    MimeType=all/all;
    #MimeType=all;
    Actions=stouch;
    Encoding=UTF-8
    Icon=application-x-cd-image
    
    [Desktop Action stouch]
    Name=Sudo touch
    Icon=edit-redo
    Exec=pkexec touch %f; kdialog --title="Touch" --passivepopup="Touched";fi

    Comment


      #3
      Well, I added the desktop file to my local services and it shows up in Actions > [return symbol] Sudo touch. I click on it and... nothing happens, I don't see any difference...
      Multibooting: Kubuntu Noble 24.04
      Before: Jammy 22.04, Focal 20.04, Precise 12.04 Xenial 16.04 and Bionic 18.04
      Win XP, 7 & 10 sadly
      Using Linux since June, 2008

      Comment


        #4
        On 20.04, right?
        Well, that's exactly the problem. On neon 5.18, which is 18.04 based, and on K18.04, it opens the pkexec popup.
        On 20.04, it does not. Therefore, nothing happens.

        Thanks for testing it.
        Anyway, I've asked on the KDE forum...

        Comment


          #5
          I see. So nobody actually uses Kubuntu 20.04 (except kyonides and I, that is).
          I mean, why do that when you can use neon, right?
          Which, in the end, is what I do...

          Click image for larger version

Name:	icon_smile_evil.gif
Views:	3
Size:	5.7 KB
ID:	644766

          Comment


            #6
            I tested it on myh K20.04 install. It shows up in Dolphin when I right click on a file. A password popup DOES NOT appear and the time stamp remains unchanged.
            I used pkexec commands in my Dolphin menu when I was running 18.04 and they worked fine. I haven't had a need to use pkexec in 20.04, yet.
            Last edited by GreyGeek; May 24, 2020, 11:32 AM.
            "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
            – John F. Kennedy, February 26, 1962.

            Comment


              #7
              Right, so 100% of people who have tested it with K20.04 (3 of 3 :·) confirm it doesn't work.
              Whereas on neon 5.18 and K18.04...

              Click image for larger version

Name:	st.gif
Views:	1
Size:	841.8 KB
ID:	644769

              Now, I've asked about this on KDE Forums, Ubuntu forums, and r/kubuntu.
              Nobody
              gives a fig that pkexec does not work with K20.

              Click image for larger version

Name:	icon_smile_ooh.gif
Views:	4
Size:	1.1 KB
ID:	644770

              Comment


                #8
                I just tested the iso mount/unmount service which also used pkexec and it "appears" to mount and unmount, but after I mount it I cannot find where in my FS it exists.
                The mount command can't see it either:

                $ mount
                sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
                proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
                udev on /dev type devtmpfs (rw,nosuid,noexec,relatime,size=8068224k,nr_inodes =2017056,mode=755)
                devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode =000)
                tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=1623420k,mod e=755)
                /dev/sda1 on / type btrfs (rw,relatime,ssd,space_cache,subvolid=485,subvol=/@)
                securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
                tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
                tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
                tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
                cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
                cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=system d)
                pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
                none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
                cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
                cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
                cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
                cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
                cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
                cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
                cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
                cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
                cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
                cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
                cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
                systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=28,pgrp=1,timeout=0,minproto=5,max proto=5,direct,pipe_ino=19854)
                mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
                debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
                hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
                tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
                fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
                configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
                /dev/sda1 on /home type btrfs (rw,relatime,ssd,space_cache,subvolid=486,subvol=/@home)
                binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
                tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=1623416k,mode=700,u id=1000,gid=1000)
                hugetlbfs doesn't exist and neither does anything related to an ISO in /run or /run/user/1000
                "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                – John F. Kennedy, February 26, 1962.

                Comment


                  #9
                  But do you get the password box?

                  Comment


                    #10
                    Only when I run pkexec manually from a terminal
                    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                    – John F. Kennedy, February 26, 1962.

                    Comment


                      #11
                      Which is exactly what I get on K20.
                      So we can "safely" assume it's an actual bug... just no one cares. Oh well.

                      Comment

                      Working...
                      X