skcmd icon indicating copy to clipboard operation
skcmd copied to clipboard

skcmd.py chat <username> <message> does not work when run the command through bash script.

Open saikrishnarao2 opened this issue 8 years ago • 4 comments

I had a requirement of Sending some text messages to a Skype contact.That messages would be automated by a machine. I tried logging in as root,started skype as root,logged in,started skcmd server, normally tried to send messages through commandline "skcmd.py chat " This worked when I was logged in as root in one of the terminal and typed that command.When I copied that line in a bash script it doesnot work at all.Would be very greatfull if someone can fix that issue.

saikrishnarao2 avatar Jul 29 '17 18:07 saikrishnarao2

Wat error did you get?

skcmd.py uses dbus and X11 to communicate with skype, so it will only work in a desktop environment.

saikrishnarao2 writes:

I had a requirement of Sending some text messages to a Skype contact.That messages would be automated by a machine. I tried logging in as root,started skype as root,logged in,started skcmd server, normally tried to send messages through commandline "skcmd.py chat " This worked when I was logged in as root in one of the terminal and typed that command.When I copied that line in a bash script it doesnot work at all.Would be very greatfull if someone can fix that issue.

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/lsmithso/skcmd/issues/3

-- Les Smithson

lsmithso avatar Jul 29 '17 18:07 lsmithso

Thanks for responding. Yes I got some error of that contains dbus exception. So is there no chance for running that process at the background? If you could answer It will be very Helpful. Thanks in advance, Saikrishna

On 29-Jul-2017 11:58 PM, "lsmithso" [email protected] wrote:

Wat error did you get?

skcmd.py uses dbus and X11 to communicate with skype, so it will only work in a desktop environment.

saikrishnarao2 writes:

I had a requirement of Sending some text messages to a Skype contact.That messages would be automated by a machine. I tried logging in as root,started skype as root,logged in,started skcmd server, normally tried to send messages through commandline "skcmd.py chat " This worked when I was logged in as root in one of the terminal and typed that command.When I copied that line in a bash script it doesnot work at all.Would be very greatfull if someone can fix that issue.

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/lsmithso/skcmd/issues/3

-- Les Smithson

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lsmithso/skcmd/issues/3#issuecomment-318849472, or mute the thread https://github.com/notifications/unsubscribe-auth/AO8gBzsXccspxLreQRPpH2m57zxsedHhks5sS3nGgaJpZM4OnbDQ .

saikrishnarao2 avatar Jul 29 '17 18:07 saikrishnarao2

Hi: I think you should be able to run skcmd.py as a batch job, if its environ is set up correctly. Can you paste the traceback, and the output of "env" in the environment you are trying to run skcmd.py from? saikrishnarao2 writes: > Thanks for responding. > Yes I got some error of that contains dbus exception. > So is there no chance for running that process at the background? If you > could answer It will be very Helpful. > Thanks in advance, > Saikrishna

On 29-Jul-2017 11:58 PM, "lsmithso" [email protected] wrote:

Wat error did you get?

skcmd.py uses dbus and X11 to communicate with skype, so it will only work in a desktop environment.

saikrishnarao2 writes:

I had a requirement of Sending some text messages to a Skype contact.That messages would be automated by a machine. I tried logging in as root,started skype as root,logged in,started skcmd server, normally tried to send messages through commandline "skcmd.py chat " This worked when I was logged in as root in one of the terminal and typed that command.When I copied that line in a bash script it doesnot work at all.Would be very greatfull if someone can fix that issue.

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/lsmithso/skcmd/issues/3

-- Les Smithson

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lsmithso/skcmd/issues/3#issuecomment-318849472, or mute the thread https://github.com/notifications/unsubscribe-auth/AO8gBzsXccspxLreQRPpH2m57zxsedHhks5sS3nGgaJpZM4OnbDQ .

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/lsmithso/skcmd/issues/3#issuecomment-318849660 -- Les Smithson

lsmithso avatar Jul 29 '17 20:07 lsmithso

Here is the error I got File "/usr/local/bin/skcmd.py", line 5, in pkg_resources.run_script('skcmd==0.0.7', 'skcmd.py') File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 528, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1401, in run_script exec(script_code, namespace, namespace) File "/usr/local/lib/python2.7/dist-packages/skcmd-0.0.7-py2.7.egg/EGG-INFO/scripts/skcmd.py", line 327, in File "/usr/local/lib/python2.7/dist-packages/skcmd-0.0.7-py2.7.egg/EGG-INFO/scripts/skcmd.py", line 284, in init File "/usr/lib/python2.7/dist-packages/dbus/_dbus.py", line 211, in new mainloop=mainloop) File "/usr/lib/python2.7/dist-packages/dbus/_dbus.py", line 100, in new bus = BusConnection.new(subclass, bus_type, mainloop=mainloop) File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 122, in new bus = cls._new_for_bus(address_or_type, mainloop=mainloop) dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11

On Sun, Jul 30, 2017 at 1:53 AM, lsmithso [email protected] wrote:

Hi: I think you should be able to run skcmd.py as a batch job, if its environ is set up correctly. Can you paste the traceback, and the output of "env" in the environment you are trying to run skcmd.py from? saikrishnarao2 writes: > Thanks for responding. > Yes I got some error of that contains dbus exception. > So is there no chance for running that process at the background? If you > could answer It will be very Helpful. > Thanks in advance, > Saikrishna

On 29-Jul-2017 11:58 PM, "lsmithso" [email protected] wrote:

Wat error did you get?

skcmd.py uses dbus and X11 to communicate with skype, so it will only work in a desktop environment.

saikrishnarao2 writes:

I had a requirement of Sending some text messages to a Skype contact.That messages would be automated by a machine. I tried logging in as root,started skype as root,logged in,started skcmd server, normally tried to send messages through commandline "skcmd.py chat " This worked when I was logged in as root in one of the terminal and typed that command.When I copied that line in a bash script it doesnot work at all.Would be very greatfull if someone can fix that issue.

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/lsmithso/skcmd/issues/3

-- Les Smithson

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lsmithso/skcmd/issues/3#issuecomment-318849472, or mute the thread <https://github.com/notifications/unsubscribe-auth/ AO8gBzsXccspxLreQRPpH2m57zxsedHhks5sS3nGgaJpZM4OnbDQ> .

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/lsmithso/skcmd/issues/3#issuecomment-318849660

-- Les Smithson

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lsmithso/skcmd/issues/3#issuecomment-318857007, or mute the thread https://github.com/notifications/unsubscribe-auth/AO8gB7l-ErGYEjFYDL9lwBlUQ08Jic3Jks5sS5TLgaJpZM4OnbDQ .

saikrishnarao2 avatar Jul 30 '17 19:07 saikrishnarao2