Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Can't start script with root privileges

Can't start script with root privileges

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 856 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    subramanyag9112
    wrote on last edited by subramanyag9112
    #1

    Hi, My project is to build a network analyzer, so I had learnt qt now. I used scapy with qt, it's giving this error

    File "/home/subramanyag/QtQuickApplication/main.py", line 30, in <module>
        main = MainWindow()
      File "/home/subramanyag/QtQuickApplication/main.py", line 14, in __init__
        scapy.sniff(store=False, prn=self.process_sniffed_packet)
      File "/home/subramanyag/.local/lib/python3.8/site-packages/scapy/sendrecv.py", line 1263, in sniff
        sniffer._run(*args, **kwargs)
      File "/home/subramanyag/.local/lib/python3.8/site-packages/scapy/sendrecv.py", line 1127, in _run
        sniff_sockets[L2socket(type=ETH_P_ALL, iface=iface,
      File "/home/subramanyag/.local/lib/python3.8/site-packages/scapy/arch/linux.py", line 486, in __init__
        self.ins = socket.socket(
      File "/usr/lib/python3.8/socket.py", line 231, in __init__
        _socket.socket.__init__(self, family, type, proto, fileno)
    PermissionError: [Errno 1] Operation not permitted
    

    I added sudo in Environment->System, but it's giving this error

    QStandardPaths: runtime directory '/run/user/1000' is not owned by UID 0, but a directory permissions 0700 owned by UID 1000 GID 1000
    

    Can u please help with that?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Which IDE are you using to develop your application ?
      What do you get if you do that from the command line ?
      Since it looks like it's related to scapy rather than Qt, you might want to contact their authors.

      Note: I forked your issue in its own thread because it was completely unrelated to the one you posted it on.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved