I have a Linux PC (running Ubuntu) and a Windows 7 PC, and they are connected to the same network.
I want to write a script in Python from the Linux PC that "tells" the Windows PC to open a specific URL.
I know the command in windows is e.g. "start www.google.com", so I think I have to somehow send this command from the Linux to the Windows PC using a Python script.
Thanks in advance for any suggestions!
Well, how the PC's connected, LAN, WAN, Bluetooth? I assume they use a LAN. In this case you can use a socket library to send data from one PC to another.
The Linux will be a client and Win7 will be a server, check this link for example: Server/Client implementation
Related
Background:
Through VMWare Fusion installed on my MacBook, I have Windows installed virtually in the VMWare Fusion environment. On the Windows, I have Pycharm IDE through which I run automated python program to control bench instruments from Keysight and Techroniks. No issues.
PS- The instrument drivers are available only for Windows, thats the reason I am using Windows virtually on MacBook
Question:
From Pycharm (installed on virtual Windows), I would like to send any command (say, print Hello World) to the Terminal of the MacBook.
How to do this and what would be the command syntax (or package needed)?
There is no single package to do this.
At a minimum, your Mac host would need to run a server process. Then the VM would need to be on a host network bridge such that it is remotely addressable. Then, you can write a client that sends RPC requests to the host's server process.
At a low-level, you can use socket library, but you may want something higher level like httpserver.
Related - VMWare fusion: connecting to host's web server from guest
The other option without external dependencies would be to communicate over a file-system share.
If you want to install external software, then you can introduce a remote message queue or database.
I want to access Jupyter lab interface on my local machine browser (also running on windows) from a Jupyter server running on a remote Windows VM.
Is there any analogous technique to SSH tunneling in linux but for windows?
Thanks in advance!
EDIT:
I am not looking for remote desktop since the code autocomplete doesn't work and it's really unresponsive (and I think people can relate to other problems of coding on a remote desktop platform)
Remote Desktop would be the easiest option.
If you need a browser, windows has ssh built in, but I think it has to be activated in the Windows options
I have a USB device that I need to control in Linux using Python and serial commands, it works with ASCII commands.
In Windows it works fine after I install the vendor driver and in Device Manager I see it as a COM3 port and I communicate using pyserial or pyvisa modules.
In Linux I see it as /dev/ttyUSB1 but I cannot communicate with it using pyserial or pyvisa. The problem is that the vendor doesn't provide Linux drivers.
How am I able to get the device behave as a serial port in Linux?
try python -m serial.tools.miniterm /dev/ttyUSB1 and read the issue on https://github.com/pyserial/pyserial/issues/67 especially the version of pyserial
if this issue is related to yours possibly this also works :
Managed to bypass this issue by passing dsrdtr=True and rtscts=True to
serial.Serial() ... as described here
your device is based on an FTDI chip, the inbuilt linux kernel module for this is ftdi_sio and usb_serial see http://www.ftdichip.com/Support/Documents/AppNotes/AN_220_FTDI_Drivers_Installation_Guide_for_Linux.pdf
I have a python application that I am currently operating in Windows (because I need to be able to send TCP commands to a 3rd party Windows application which is running on the same machine). However, I want to be able to use libgphoto2, which generally only runs on Linux machines. Is it possible to set up a virtual machine and run everything from a single computer? My Python scripts can currently be run from either Linux or Windows. An easy way to do this would be to have one computer with Windows which I control over TCP from a secondary computer running Linux...but this means that I will need 2 computers.
Any advice?
Light solutions, just a Linux compatibility layer:
latest Windows has native Linux support
for older Windows versions, cygwin
or mingw
If it doesn't work, you can resort to a real virtualization, e.g. VirtualBox.
Try VM Player.
Where you can setup linux over windows and communicate between virtual linux and windows host.
VM Player
Please I am trying to use linux and I have used it on LiveCD and I really want to use it but the main problem that am having about Linux is that on windows I use an application as a server (ip: 127.0.0.1 port: 8080) to connect to the internet on it and I want to use the same proxy on Linux but I don't know how to do that.
I have tried to extract the Windows Executable file and its a python program (.pyc).
I want to ask if there's a way to pack the files together to be used in Linux so that i will still be connecting through the same proxy again.