Syncing time, date and time-zone with an embedded Linux machine - c++

I have an embedded system that runs Ubuntu 14 and is connected to my laptop through an Ethernet cable. I am trying to sync the time/date/timezone of the board with my laptop. The board does not have any Internet connectivity and I can not run ntp like ntpdate ntp.ubuntu.com.
What I have in mind is to get the time/date/time-zone of my laptop using a C++ code like this and then run date --set=<laptop_time_date> command on the remote board (using a remote SSH connection). Is this the correct way to do this? and how to syn the time zones too?
P.S. The reason I need to sync the time/date of the board with my laptop is to let make to work properly. I copy multiple source files through SSH connection to the board and then call make to build the program. make produces a warning that timestamp of file is in the future. One way to solve this is to call touch on all the source files to update the time stamps, but it forces a rebuild.

Related

Running ROS on multiple computers

I am currently running a ROS package (publishing multiple topics including image topics) on multiple computers connected wirelessly using http://www.netwifiworks.com/PicoStation-M.asp . While I get pretty good frame rate on master computer, the frame rate is pretty low on the listener computer. What is the solution? Image compression/ -P
Using Ubiquiti hardware needs a lot of config and correct setups I'm using Bullet M5 on one side of my network and after about a week of testing setups and configs we could get LaserScan and PointCloud2 From master To remote computer on 20+ Hz
Your Problem Too I Think Is In Network Configurations And Since I Don't Have Your Hardware That's All The Help I can Give You On That
If Your Network Is Tested And Good Then It's Your ROS Envs.
Make Sure U Have These On Your Remote PC Envirenments :
ROS_IP Which Sets The IP Your ROS On Remote PC Using And sometimes can cause Data loss If Not Set (Or You can Use ROS_HOSTNAME)
And On Master PC If You are Using Only 1 Network It's Better To Do The same(Optional)
All Of This Are Discussed On Their ROS-Wiki

Can I run Dragon NaturallySpeaking on Amazon WorkSpaces?

I use Dragon dictation software including by using it over a remote access to my home computer. I also once had it set up on the network server computer at a client site which I could also access when logged in remotely. But now, I have a situation where my access to work info is over Amazon WorkSpaces. Does anyone know if Dragon Pro can be installed on and accessed through an Amazon WorkSpace desktop?
TIA!!
Your question was bugging me for a long time, finally I gave in and rented a WorkSpace and tried Dragon.
Recognition for me is totally fine as long as your local computer's standard audio input device is actually the one you want to use Dragon with. If your default input device is the built-in micro of your laptop, computer or screen, recognition will most likely be bad. I used a Sennheiser MB Pro 2 with a USB dongle on a Windows machine for testing, as well as a TravelMike with a USB MultiAdapter. Both work fine.
As for factors that influence recognition quality:
I know from other virtualization/remote desktop solutions that the codec that transfers your speech to the virtual/remote machine may work well for one microphone, and not for others. Try a different mike and see if that improves your recognition.
In order to rule out microphone issues, I suggest trying different internet connections (WiFi, Ethernet, tethering, different internet providers). Missing words from speech recognition over remote connections can indicate unstable or slow internet.
As far as I know, there is no way to patch a USB device through to the remote WorkSpaces machine. What you could try is install a VPN on the remote machine and use your smartphone as a remote microphone in Dragon. Your smartphone also needs the VPN. If you get that to work, recognition should be as good as on your local network, given that internet connection is fast and stable enough.

Work(flow) Setup: Remote Debian VM (in office), ssh, web development

Normally I've developed locally (on my own machine) and pushed to wherever things needed to go via mapped drives, ftp, github, etc. I have done a bit of work with vagrant/virtualbox (but again, locally) with a shared/mirrored folder.
I am now in a situation where everyone here has access to their own dev box (a vm on the network). I see some working in Vim directly via SSH, I believe, but I'm not there yet. So I'm left with the question: What's the best way for (more of a front end guy) to approach this?
I have heard of doing an SSH-mount from my workstation... if that's a viable thing. I'm curious what everyone's take on this kind of environment is and (perhaps) any best practices. Tips, links, and reading is highly welcome and appreciated, too... any pointing in a good direction would be wonderful.
Thank you.
The best answer will come from what virtual resources do you want to capitalize on for the virtual networked VMs. If you just want the storage space, then share the VM's drives, and mount them locally, treat them as local, end of story. If you want to run all the processing on the remote machine, and connect from a thin client, you have a couple of options, but they all take the same form. Connect to the machine, edit the files on the remote machine. Depending on your OS, you will have different options available.
If the remote machine doesn't have an graphical client installed you are stuck with either, mounting the remote share locally (you can use whatever editor you want) or ssh to the remote machine and using a commandline editor (vim, nano, emacs).
If there is a graphical client installed you have more options:
Remote in the server using any visual viewer (mstsc for windows, vnc is an option), and then use any remotely installed editor of your choice.
Remote in using ssh -X, and then run the remotely installed editor. Assuming you have an X-Server locally (if you are running linux you already do), the GUI part of the application will be run on the client side of the ssh tunnel, and the process will be run on the server. This is probably the best option.
So:
Make sure the remote server has a desktop client software (gtk, kde, gnome, almost any windows os, etc...)
install GUI editor of your choice on that server
ssh -X to that server
install sublime text, geany, or your choice of editor
run subl, geany, or other to start the application.
SSH mounting would indeed allow you to use all of the files on the VM as if they were stored in your local machine, letting you edit and update files without having to manually copy them every time you perform changes. You will run into a speed bump though, since files changed will have to be synchronized/copied to your remote machine every time and that takes a couple of seconds. Check this post by DigitalOcean, they explain how to get the SSH mount working.
A better option you have (IMHO) is to use an IDE in your local machine that allows you to push changes to a server after saving or by manually doing so. This would allow you to develop faster by using your local resources (local web server) since no files would have to be copied over the network to the remote VM; and would also allow you to test on that remote VM when needed by uploading the files when you are ready to test on that environment.
PS: Exporting visual apps or environments form the remote machine to your local one can be slow (depending on your network and the VM host load running your machine). If you still like that approach, you could also install something to access that VM over something more standard and lightweight like RDP for GNU/Linux (xrdp).

Xenserver - Access guest VM directly from host

I've got a decent PC that I'd like to install xenserver on, but it's also my primary workstation. Wondering if it's possible to access guests directly from the host machine -- meaning, can I use the monitor, input devices, etc that are attached to the host, to interact with the guests.
Currently setup as a dual boot Linux and Windows machine. I need them both running simultaneously while still being able to treat the host like a workstation. Already using Virtualbox, which is great but not what I'm aiming for.
I've searched high and low for an answer to this question. Maybe I wasn't searching with the right terms. I've found a package in the Ubuntu repos that adds an entry in grub along the lines of 'Ubuntu with Xen Hypervisor', but that was on a test machine that couldn't actually run Xen.
Normally, I'd just wipe this puppy and find out for myself, but there are really good reasons why I can't just jump into it this time, so I'm turning to the community.
Thanks for any and all info!
You can use a simple text console on the host to interact with the guests
xe console vm=guest
but I don't know of a way to access a graphical interface from the host.

Starting sas job from remote computer

I have a scheduling program running on Server A running Windows 2008 RS. Server B is my SAS server under Windows 2008 R2. How do I kick-off a job on SAS server from my scheduling server? I can either use the sas.exe or a batch file to start my job. Owners of the SAS server tell me that I cannot add an application or Windows service to the SAS server. Is this even possible?
Below is a copy of my answer to a slightly different question (source: http://www.runsubmit.com/questions/260/hide-sas-batch-jobs-winxp). I'm copy/pasting it here for perpetuity and also because it's more likely to help people searching:
You can use PsExec which is part of Microsoft/Sysinternals list of utility programs. This file will go on the scheduling server. Grab it from here:
http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx
The tool is designed to allow you to execute jobs on remote machines. For example, if you want to launch a SAS program from the command line you could run:
psexec \\machinename sas.exe -sysin remotedrivename:\remotefolder\myprogram.sas
This would launch SAS.EXE on the remote machine and run the supplied program that exists on the remote machine. When it launches SAS it appears to launch it within a PsServ service. Because it's running within a service no interface will be displayed. I'm not even sure if you would see it appear as it's own process or application in windows task manager. If you use SysInternals other program, ProcessExplorer, instead of Task Manager you can see this happening.
Note that the REMOTE MACHINE and the LOCAL machine can be the same machine.
PROS: Many other uses for this technique. It's free. PsExec is only required on the machine that is making the call, not both machines.
CONS: Its a bit of a roundabout way to do things. Need to install a third party program (although it is now a MS tool). Some antivirus programs/network admins may not allow it.
Note that if your SAS jobs access network resources then you will probably need to make the network resource available first using the net map command. I suggest running your sas job in a batch file like so (or use the 'x' command from within your SAS file to call the 'net use' commands):
Command executed from local machine:
psexec \\machinename -sysin remotedrivename:\remotefolder\myprogram.BAT
Contents of batch file on remote machine:
net use m: \\fileserver\sharedfolder /USER:mynetworkdomainname\myusername mypassword
sas.exe -sysin remotedrivename:\remotefolder\myprogram.sas
net use m: /delete