mbaltaks / doublecommand

DoubleCommand is a Mac OS X kernel extension that allows you to map keys on your keyboard to the way you want them.
http://doublecommand.sourceforge.net/
59 stars 5 forks source link

DoubleCommand needs to be reinstalled after each reboot on Yosemite #23

Open Thomas-Z opened 9 years ago

Thomas-Z commented 9 years ago

Everything seems to be working fine on Yosemite but it stops to work after each reboot. capture d ecran 2014-10-02 a 22 57 07 A reinstall fixes everything until the next reboot.

tigredanky commented 9 years ago

Yeah, just started experiencing this with the update. Pucha.

tsiger commented 9 years ago

Pucha indeed.

zbyna commented 9 years ago

Same problem :(

zbyna commented 9 years ago

There is a very good alternative which works even after restart: https://pqrs.org/osx/karabiner/

tigredanky commented 9 years ago

Thanks zbyna, I've got a post on settings for it, too. It still gets wiped after some restarts, though.

http://foxytigre.com/geekout/pc-keyboard-logitech-mk700-mac-using-karabiner/

andkrup commented 9 years ago

Got the same problem here as well

ghost commented 9 years ago

You don't need to reinstall DoubleCommand, just run it manually..

sudo /Library/StartupItems/DoubleCommand/DoubleCommand

kleuter commented 9 years ago

Same issue, workaround by fuzzyflop works

mbaltaks commented 9 years ago

I'm not 100% sure why it won't load automatically, but it could be that recent versions of Mac OS X don't use the /Library/StartupItems folder anymore.

There is a login.command file in /Library/StartupItems/DoubleCommand which was designed to be run as a login item to allow multi-user preferences for DoubleCommand. If you were to add:

sudo /Library/StartupItems/DoubleCommand/DoubleCommand start

after the sysctl=/usr/sbin/sysctl line, then that might ease the pain, but you'd still need to enter your password each login.

mbaltaks commented 9 years ago

Actually, has anyone tried sudo rsync -av /Library/StartupItems/DoubleCommandDoubleCommand.kext /System/Library/Extensions?

enjay314 commented 9 years ago

I think I got it working under Yosemite after #mbaltaks mentioned that it might not use StartupItems.

I made a LaunchDaemon by making a new com.doublecommand.plist (contents below) and putting it in /Library/LaunchDaemons.

In Terminal I used sudo nano /Library/LaunchDaemons/com.doublecommand.plist to make my new document and didn't have to mess with permissions later.

I suppose if you make a plain text file elsewhere and drag it to LaunchDaemons, you have to make sure the owner is root:wheel (sudo chown root:wheel /Library/LaunchDaemons/com.doublecommand.plist) and permissions are 755 (sudo chmod 755 /Library/LaunchDaemons/com.doublecommand.plist).

After things were in place, I ran this command: sudo launchctl load -w /Library/LaunchDaemons/com.doublecommand.plist then restarted and everything seemed to work.

This is my com.doublecommand.plist file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.doublecommand.plist</string>
<key>ProgramArguments</key>
<array>
  <string>/Library/StartupItems/DoubleCommand/DoubleCommand</string>
<string>start</string>
</array>
    <key>RunAtLoad</key>
    <true/>
    <key>KeepAlive</key>
    <true/>
</dict>
</plist>
kleuter commented 9 years ago

enjay314, anyway to have it directly in the setup ?

richard-griffiths commented 8 years ago

mbaltaks comment from May 18 works to fix this in El Capitan 11.11. you will need to insert a forward slash in the path between the two doublecommands, like this: sudo rsync -av /Library/StartupItems/DoubleCommand/DoubleCommand.kext /System/Library/Extensions

tobsn commented 8 years ago

fyi, all those fixes don't work on the new magic keyboard. the only way to make it work for me is to remove the prefpane and then install the pkg again.

same applies to karabiner app btw. it can't handle fn remapping on the new keyboard.

tobsn commented 8 years ago

Created a separate issue with a bounty attached to it: https://github.com/mbaltaks/doublecommand/issues/25

mbaltaks commented 8 years ago

Ok, I'm kinda amazed the kext still functions on the current Mac OS, but if someone can confirm whether the kext needs to be put into /System/Library/Extensions, or whether just the launchd solution above is required, making a new DoubleCommand package that does one or both of those is not too much work so I could find an hour or two to fix this up if there is still desire for this?

vancurtis commented 8 years ago

@mbaltaks -- yes please!!!

tobsn commented 8 years ago

alright - Karabiner now supports it completely even with new apple keyboards...

ericpruitt commented 8 years ago

A simpler alternative to using launchd is to run sudo crontab -e and add this entry to launch the DoubleCommand binary at startup as root:

@reboot /Library/StartupItems/DoubleCommand/DoubleCommand
darkguy2008 commented 7 years ago

I had this happen on Sierra too. I don't like Karabiner as it's hard to setup, editing XML files is not something I'd like to do. I tried both @richard-griffiths and @ericpruitt suggestions and nothing works, or maybe there's not enough documentation on how the app works.

I'm using a Razer Deathstalker Chroma (because it's sexy) and even though, only for a simple test, I enable the "PC-style Home & End keys", it does not behave the same way in a text editor - or am I missing something? The kext appears in kextstat so I dunno what could be wrong.

I'm also using the key preview in the keyboard settings and even though I select the option to swap Control with Option, or any of those swap keys, the app still highlights the original key. I haven't found a way yet to make a simple Control+C key combination work. However! if I tell DoubleCommand to disable Command and Option, that works -.- but it's useless then.

Any ideas? :)

enjay314 commented 7 years ago

Hello all. It's been awhile.

I've tested the kext method (@richard-griffiths and @mbaltaks), the launchd solution (@enjay314), and the crontab solution (@ericpruitt) under El Capitan 10.11.6 and all of them allow me to bring up the DoubleCommand System Preference with no error or warning.

The kext method is probably the easiest to do since it's just one line in Terminal. However, as @mbaltaks suggests, it seems like the kext would be the first to deteriorate as the OS updates.

The crontab method would be easier for me if the initial command didn't launch vim as the text editor ;) Once you figure that out, it's easy and this is the route I'm using now. Oh, and to get DoubleCommand to work without restarting I issued this command in Terminal: sudo /Library/StartupItems/DoubleCommand/DoubleCommand

Finally, the launchd method I originally posted still works for me. Should one of the other methods fail under an OS update, I'll try this one.

I don't know which of these methods would be best for the DoubleCommand package and I don't know how to code them into it but it would be awesome if one could be integrated!