You are not logged in.

#1 2016-01-08 15:39:49

stackoverflow
Member
Registered: 2015-09-23
Posts: 43

error in running tuxcut!

hi every archer!
after a wide search to install tuxcut i found that i should import black arch repo..
i add it..and then install tuxcut.
but when i decide to run it,an error appeared:

[saeed@saeed bin]$ tuxcut 
/usr/bin/tuxcut: line 4: cmd: command not found
Traceback (most recent call last):
  File "/opt/TuxCut/tuxcut.py", line 4, in <module>
    from PyQt4 import QtCore,QtGui
ImportError: No module named PyQt4
[saeed@saeed bin]$ 

any idea?

Last edited by stackoverflow (2016-01-08 15:41:49)

Offline

#2 2016-01-08 16:10:52

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,785

Re: error in running tuxcut!

Well, there are some pretty good clues there.  I see you've a missing module.
Perhaps using pacman to ask about the existence of packages that have that name and checking whether they are installed on your system might help.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2016-01-08 17:23:30

stackoverflow
Member
Registered: 2015-09-23
Posts: 43

Re: error in running tuxcut!

yeah...you're right!
i use pkgfile tool to find modules that were not installed.

[saeed@saeed ~]$ pkgfile QtGui
extra/qt4
extra/qt5-base
multilib/lib32-qt4
[saeed@saeed ~]$ 

all three packages installed before in my system.i check it big_smile.
the result was same for QtCore.
after that i run this command:

[saeed@saeed ~]$ sudo pacman -Ss PyQt4
extra/pyqt4-common 4.11.4-4 [installed]
    Common PyQt files shared between python-pyqt4 and python2-pyqt4
extra/python-pyqt4 4.11.4-4 [installed]
    A set of Python 3.x bindings for the Qt toolkit
extra/python2-pyqt4 4.11.4-4
    A set of Python 2.x bindings for the Qt toolkit
[saeed@saeed ~]$ 

as you can see,the last package not installed for me.so i install it.
in the final phase i run the tuxcut command:

[saeed@saeed ~]$ tuxcut 
/usr/bin/tuxcut: line 4: cmd: command not found
<PyQt4.QtCore.QVariant object at 0x7f10ef817ed8>
X Error: BadAccess (attempt to access private resource denied) 10
  Extension:    130 (MIT-SHM)
  Minor opcode: 1 (X_ShmAttach)
  Resource id:  0x15f
X Error: BadShmSeg (invalid shared segment parameter) 128
  Extension:    130 (MIT-SHM)
  Minor opcode: 5 (X_ShmCreatePixmap)
  Resource id:  0x108
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x3c00017
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x3c00017
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x3c00017
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x3c00017
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x3c00017
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x3c00017
X Error: BadPixmap (invalid Pixmap parameter) 4
  Major opcode: 54 (X_FreePixmap)
  Resource id:  0x3c00017
X Error: BadShmSeg (invalid shared segment parameter) 128
  Extension:    130 (MIT-SHM)
  Minor opcode: 2 (X_ShmDetach)
  Resource id:  0x3c00017
X Error: BadAccess (attempt to access private resource denied) 10
  Extension:    130 (MIT-SHM)
  Minor opcode: 1 (X_ShmAttach)
  Resource id:  0x15f
X Error: BadShmSeg (invalid shared segment parameter) 128
  Extension:    130 (MIT-SHM)
  Minor opcode: 5 (X_ShmCreatePixmap)
  Resource id:  0x108
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x3c0001f
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x3c0001f
X Error: BadPixmap (invalid Pixmap parameter) 4
  Major opcode: 54 (X_FreePixmap)
  Resource id:  0x3c0001f
X Error: BadShmSeg (invalid shared segment parameter) 128
  Extension:    130 (MIT-SHM)
  Minor opcode: 2 (X_ShmDetach)
  Resource id:  0x3c0001f
Traceback (most recent call last):
  File "/opt/TuxCut/tuxcut.py", line 18, in <module>
    tux = TuxCut()
  File "/opt/TuxCut/tuxcut_core.py", line 52, in __init__
    self._gwMAC = self.gw_mac(self._gwIP)
  File "/opt/TuxCut/tuxcut_core.py", line 125, in gw_mac
    arping = sp.Popen(['arp-scan','--interface',self._iface,self._gwIP],stdout = sp.PIPE)
AttributeError: 'TuxCut' object has no attribute '_iface'
[saeed@saeed ~]$ 

any idea?

Last edited by stackoverflow (2016-01-08 17:25:36)

Offline

#4 2016-01-08 18:03:33

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,525
Website

Re: error in running tuxcut!

The actual error is that tuxcut is a broken load of crap.

Look at the tuxcut file, it is a very very short bash script that anyone who has written a single line of bash will immediately see the flaw in.  It will not work at all without that being fixed.  And once that is fixed, you'll see that the intent is for the python script to be ran with root (e.g. sudo).  I certainly will not run a python script with sudo when the author is careless in their code.  But permission errors are not surprising if you are not running it as root.

EDIT: it turns out the glaringly obvious error in the script is (by itself) is as harmless as it is silly, but that is the source of the command not found error.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2016-09-11 12:54:32

mouhsineelachbi
Member
Registered: 2016-09-11
Posts: 2

Re: error in running tuxcut!

I've been the same problem and the solution that I apply is to install PyQt4 module of python

try to install this module by typing in the Terminal :

 -  sudo pacman -S python-pyqt4 

Last edited by mouhsineelachbi (2016-09-11 12:59:32)

Offline

#6 2016-09-11 21:16:04

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,525
Website

Re: error in running tuxcut!

Tuxcut has been removed from the AUR, and the archived PKGBUILD will not even build (even after the PKGBUILD is fixed) because the upstream source has been removed.  It seems tuxcut itself is still on github, but hasn't been touched in several years - and that repository does not have the script that was the problem in this thread.

So in no way is your comment relevant to the old issues of this thread.

CLOSED.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB