Synergy remapping is great, but now my keyboard interrupt isn't working - keyboard-events

I'm using the latest synergy with my PC with my Mac (intel chip, up-to-date).
After using Synergy for YEARS I finally discovered the client remapping. Everything is working as expected EXCEPT now I seem to have lost the ability to do a keyboard interrupt.
I'm thinking I might create some sort of macro within the Mac keyboard preferences but I was wondering if anyone has ran into this before.
I might also open a ticket directly with the folks at Synergy.

Related

Atmel Studio 7 doesn't show any debugging tools

I just installed Atmel Studio 7 on my Windows 10 HP laptop. This is my first time working w/ a C compiler since high school, and my first time working with a microcontroller.
I loaded one of their example projects and built it without any errors. However, I am not able to debug since there is no option for a debugging tool (see screenshot). The only option is for 'Custom programming tool', while their tutorial videos all show an option for a SAM-ICE debugger or Simulator (e.g. https://www.youtube.com/watch?v=9QlDSNeuAdY)
I have spent hours trying to find an issue online w/ no luck. Please help!
I have had the same problem. I solved this by unchecking the box Tools->Options->Debugger->Backend Agent-> Start Local Backend Agent and then checking that box again
I'll add this information as I also just spent a fair amount of time trying to determine why no debugging tool was available as an option:
Make sure you have the right device connected.
I know this sounds terribly basic, but in my case I have both SAML21 and SAML22 Xplained Pro boards, and I'd forgotten which one I had targeted for a particular project. If you have a project open that targets one, but the attached device is different, you may have this problem. The only available option becomes "Custom Programming Tool" which isn't helpful.
After connecting the correct board, I had to revisit the Tool menu and change the selected debugger/programmer to the appropriate (only) EDBG • ATML###### option.
If you're not using an Atmel Xplained board, this may not be applicable.
I spend some time about this problem as well and found out that all I had to do was go to Device and Debugging options then go to Build and select All Configurations in the configuration box then the simulator should appear under tools.
In my case it was atbackend.exe which crashed after hibernating my laptop. I had to stop Atmel studio, ensure that no AtmelStudio or atbackend processes exist in system and then start ATmel STudio again. After that Simulator appeared in Tool-Selected debugger/programmer.

How do I get bluez 5 to accept a fixed pin?

I can find nothing on how to do this. I am programming an Intel Edison in C and an Android phone in Java. I want to pair the Edison from the Android phone. I would think simple pairing (sspmode 1) would work but I get an error message on the phone about a wrong pin where no pin was requested. With sspmode 0 I get asked for a password but have no idea what it is as it is randomly generated in my NoInputNoOutput Edison. We have everything else working. If we pair from Edison manually, the rest of the code can connect and send bluetooth messages back and forth from the Edison to the phone. But pairing from Edison to any random phone that walks by is not acceptable. I think it is called Bluejacking.
I have seen some posts about using simple-agent but frankly what I understand is that BlueZ security changed so much between 4 and 5 that most all that I see doesn't work. I also see that the switch from 4 to 5 broke a lot of systems so I don't feel alone. I would try it but simple-agent is not on Edison and I have not found a procedure to install it. And as I don't know if the little I can find applies to version 5 as it all references version 4 I am feeling a little lost.
Can anyone point me in the right direction to something that will work on BlueZ 5? I am on 5.18.
The solution presented on the last post of this article does work
http://www.linuxquestions.org/questions/linux-wireless-networking-41/setting-up-bluez-with-a-passkey-pin-to-be-used-as-headset-for-iphone-816003/
Edit simple-agent, put it somewhere, make it executable, put the missing files in the same directory and run it. It must stay running for it to be active.
In my case, the missing file was bluezutils.py.
Run hciconfig hci0 sspmode 0 first
Pl use Bluz5.30.
Initially it was really difficult to bring up bluetooth using Bluez 5. It seems it was okay with Bluez 4.I have tried different versions of Bluez 5 on my LFS build. Even up to Bluez 5.28 it was not satisfactory. Now it is Bluz5.30, with this, LFS doc and lot of trail, I could manage. I feel Bluez is one of the most badly documented user unfriendly software. I also feel it is very buggy. It can hang machines forcing to hard boot the system. I have seen bluetooth forcing the Android phone also to reboot. So it is important to get the latest version of the software. But to make the bluetooth speaker work Pulseaudio was needed. It is better to get the latest version; here also LFS doc was fine.
So the process of connecting speaker was using bluetoothctl is as follows;
>> power on
>> scan on
>> pairable on
>> pair <device>
>> agent on
>> default-agent
Now the actual sound. Here pactl and pacmd are useful.
paplay -d can test the devices.
using pacmd with command 'list-sinks' can show the devices.
pacmd ->list-modules can show the modules loaded.
How to change automatically the audio output to bluetooth speaker when it is connected?
For me in one machine it was working fine, with an identical LFS in another machine it was not working. Finally it was identified as a
missing module module-device-manager with arg do_routing=1.
Once it was loaded everything was fine. This particular module was not shown in the pulse configurations. So I have to find that and load,
pacmd
load-module module-device-manager do_routing=1
One can add a line in the default configuration file available in /etc/pulse.or one can add it in the user configuration file also.Now to make the new bluetooth speaker being used to play sound. For that issue the command 'move-sink-input ' using pacmd. You can find the sink names my issuing the command 'list-sinks'.
If your speaker is not connecting, it may be that it is already connected elsewhere. If it is not so, remove-device; scan on; pair; and connect using bluetoothctl. I was worrying how to make file transfer using bluetooth (Bluez5). Actually very little information is available in LFS documention or in general in the NET. This very true and unfortunate about Bluez in general. They do not provide any real user doc or nothing is available in net. So the steps are as follows:
You need to install OBEX library. Then you build Bluez5 (if it not done already). It will install obexd. After installation you can find obexd in $PREFIX/libexec/bluetooth/obexd.This is where you find bluetoothd also. One generally makes a link for bluetoothd in /usr/sbin. A similar link can be made for obexd also. Once you start bluetoothd and obexd you can find object transfer profiles in bluetoothctl->show.If you need a phone to push objects to the computer, you need to run obexd with options '-a' and '-r '. if '-a' is not given phone will fail to send the file. Now how to push a file from Computer to Phone. For this you need obexctl, I do not think it is a finished tool, and it will not be installed while we build Bluez 5. I have seen it in the source tree and copied to /usr/bin/. It should be used to connect the Phone and when the connection is established one can 'send ' and you have to accept the request in the phone.
Starting obexd as a deamon was a problem. When obexd was tried on a text terminal (init 3) it was not possible to start since it needs a dbus session which in turn needs X display. It means one need to login an X seession before you start obexd. If you dissable X while building DBUS (--without-x) then Window Managers will not work. But there is solution with 'dus-run-session < command> [args]'. That means you can start a service obexd (like bluetoothd) in the system start-up. So just by switching on the Computer ( if pairing, trusting etc... was done earlier) one can push files from Phone to computer.
>> connect <device>
Second time onwards just connection is fine. Probably you can trust the device.
>> trust <device>

Prevent Mac Laptop from sleeping when closed?

I'm writing a program in C and want it to have an option that will keep a mac laptop awake even if the lid is closed so processes can continue. There seems to be very little information available on this topic so I really don't know where to begin. If anyone knows how to accomplish this or where I can find more information I would really appreciate (i.e. will I need to work with the BIOS for this or are there built in functions?). Also, if it's easier to do it in another language that is fine as I'm not stubbornly set on using C.
You need to write a kernel extension for this. The OS doesn't support it by default because the laptops aren't designed to properly cool themselves with the lid closed and internal display enabled. SleepLess is a $10 utility that'll do what you want, too. If you warp the display or something, it's your own fault. :-).
If you want to write something yourself, LidSleep.kext looks like a good start (it does the opposite, i.e. sleeping on lid close) and comes with source code.
(It is possible and supported to wake up some Mac laptops with the screen closed by using an external input device.)
You can do this using the I/O Kit framework, see QA1340 listing 2 for sample code using IOPMAssertionCreateWithName to temporarily prevent sleep.
The link to LidSleep.kext listed above is not working, so I can inform that the author of NoSleep has made the source code available here, so you can see for yourself how it can be done:
https://code.google.com/p/macosx-nosleep-extension/
If your laptop is a reasonably recent model, you don't need to add anything. If you are running Lion, it simply works. If you're running an older OS you have to wake up the laptop by sending it a keystroke or mouse click from an external keyboard or mouse. See http://support.apple.com/kb/ht3131

How to work remotely under X/vim?

I've been long fan of NX nomachine for remote desktop, which worked just fine until some time ago.
Recently I have all the time problems with ALT and CAPSLOCK synchronization, and since I am programming under remote X with vim it starts to drive me crazy. I spent more time figuring out what I accidentally deleted, where I've made typo etc than moving forward.
I figured out that the problem appears only when I have lag of > 20ms to the server.
I use ssh tunnel but that's not the problem.
What are other alternatives to NX which do work for you?
btw, i am working with 3.4.0-8 NX under Mac and I connect to Linux machine.
Here is the unresolved bug report.
Greetings.
Why not just use ssh's X11 compression instead of NX? Enable X11 in the remote host's sshd, and do ssh -YC user#remote-host.
Besides, vi/vim is the only editor that can be used on very slow links with long delays. '8j' is much more reliable than pressing the up-arrow key 8 times under such conditions.
Starting out X11 under Mac before starting the NX client reduces this problem in a way which makes it possible to work.
You may want to try xpra, it has a switch for high latency links which prevents keys from getting stuck at the cost of not maintaining an always consistent keyboards state: xpra --no-keyboard-sync.
Unlike NX, it does not require an X11 server at the client end and will run natively in OSX.

Detecting attached USB devices under Mac OSX

First of all a statement: I'm a newbie when it comes to programming for the Mac. However I have an assignment which requires USB communication with a device so I thought I'll start with something basic.
I took the code from here, built it and ran it from the Terminal. It starts up and writes:
Looking for devices matching vendor ID=1351 and product ID=8193.
Starting run loop.
However after this, if I plug in and out USB devices (I tried: iPod, GPS, mouse) nothing gets written on the screen, although as much as I understand there should be whenever I connect and disconnect a device.
What am I doing wrong?
Thanks in advance.
You can also use system_profiler SPUSBDataType on a terminal
I found /Developer/Applications/Utilities/USB Prober to be of great use.

Resources