Announcement

Collapse
No announcement yet.

Why does this not start from the application launcher

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

    [SOLVED] Why does this not start from the application launcher

    This command works from konsole sudo python3 /home/marc/Downloads/tftpgui/tftpgui/tftpgui.py
    I need to run it with root priviledges to have it listening to udp port 69 on the network.
    Is there another way to give it rights to listen to network ports without root priviledges ?
    Is running it like this dangerous, because the entire python interpreter has root priviledges now ?

    When I make a new entry in the KDE application launcher, the application icon briefly shows in the system tray and then dissapears without starting the application.
    When I remove sudo before the command (in KDE application launcher) the application starts but in the GUI I get an error message "failed to bind to port 69, ports below 1000 may require root priviledges.

    I wanted to use kdesudo, but synaptic does not find it in the Kubuntu 18.04 package list.
    Kubuntu is just freshly installed
    Click image for larger version

Name:	Screenshot_20180812_124140.png
Views:	1
Size:	25.6 KB
ID:	649366
    Last edited by mbohets; Aug 12, 2018, 05:05 AM. Reason: add info
    Je suis Charlie, how many more people have to die for religions
    linux user #447706 on https://linuxcounter.net
    A good place to start:
    Topic: Top 20 Kubuntu FAQs & Answers


    #2
    try kdesu instead sudo.
    Mark Your Solved Issues [SOLVED]
    (top of thread: thread tools)

    Comment


      #3
      kdesu: command not found

      sudo apt-get install kdesu
      Reading package lists... Done
      Building dependency tree
      Reading state information... Done
      E: Unable to locate package kdesu


      ... but it works when I put it in the kde launcher

      Thanks a lot for the help, I thought the correct syntax was kdesudo
      Last edited by mbohets; Aug 12, 2018, 07:11 AM.
      Je suis Charlie, how many more people have to die for religions
      linux user #447706 on https://linuxcounter.net
      A good place to start:
      Topic: Top 20 Kubuntu FAQs & Answers

      Comment


        #4
        The kdesudo project died, perhaps because Wayland will not allow it to work. So bionic doesn't package it. Those who release upgraded from some older Kubuntu releases still have it.
        Originally posted by mbohets View Post
        kdesu: command not found
        sudo apt-get install kdesu
        You already had kdesu, it's just not in the default $PATH. It is highly recommended not to use kdesu or kdesudo to run graphical applications as root or with administrative privileges, because it is considered a substantial security risk, so the use of kdesu is being discouraged and hindered. Much metaphorical ink (byte stream? typing? electricity?) has flowed as millions of people's ways of doing things have been upset.

        But, you can reach it by symlinking to /usr/lib/kde4/libexec/kdesu-distrib/kdesu, and /etc/alternatives/kdesu is such a link.

        The proper way to do things now we've been told is "PolicyKit-kde integration". Normally this means coding and XML, but presently in KDE we can do:
        Code:
        pkexec [I]command[/I]
        but the cynic in me says if us plebs start using that instead of kdesudo or kdesu someone will stop it.
        Last edited by jlittle; Aug 12, 2018, 05:06 PM. Reason: missing close tag
        Regards, John Little

        Comment


          #5
          In this case, I don't think ik will be a security risc as I will only use this application in a non internet connected telco network, and only when I need to put some firmware on a router.

          But in general, your remark is correct, in my original post, I also worried about security, as I am starting python with root priviledges.
          Is there another way to give the application access to network ports below 1000, perhaps make it member of some group ?
          The application runs perfectly without root, as long as I would use ports higher than 1000, but the tftp standard port is 69.
          Je suis Charlie, how many more people have to die for religions
          linux user #447706 on https://linuxcounter.net
          A good place to start:
          Topic: Top 20 Kubuntu FAQs & Answers

          Comment


            #6
            Originally posted by mbohets View Post
            Is there another way to give the application access to network ports below 1000, perhaps make it member of some group ?
            The application runs perfectly without root, as long as I would use ports higher than 1000, but the tftp standard port is 69.
            Lots of people want to do this with Apache. From some random wiki:
            • If you have a specific executable, you can give it that "capability":
              Code:
              sudo setcap cap_net_bind_service=+ep /usr/sbin/tfpd
            • iptables can be used to redirect traffic from a low port to a high one
            • authbind can be used for this, it's in the repositories
            Regards, John Little

            Comment

            Working...
            X