Skip to content

Start at login not working #441

Closed as not planned
Closed as not planned

Description

@realperest

OS

macos 13.3

LinearMouse

v0.8.0

Describe the bug

when I check start at login from within the program it has no effect. it is checked but the sign is ineffective. when the computer logs back in the sign disappears.

no manual addition to the login items in the settings screen.

To reproduce

No response

Expected behavior

No response

Anything else?

No response

Activity

  1. added
    bug
    on Apr 17, 2023
  2. lujjjh commented on Apr 18, 2023

    @lujjjh
    Collaborator

    Does LinearMouse launch from the Applications folder?

    Also, you may want to verify whether the LinearMouse background item is enabled in "Allow in the Background":

    image

  3. realperest commented on Apr 18, 2023

    @realperest
    Author

    Ekran Resmi 2023-04-18 21 22 04

    That's how my mac is set up.

    is there any relation between background update and run at startup ?

  4. lujjjh commented on Apr 19, 2023

    @lujjjh
    Collaborator

    is there any relation between background update and run at startup ?

    A typical start-at-login implementation on macOS is to register a launcher as a background item that starts the main application at login.

    I noticed that the LinearMouse icon in your screenshot. You could try reinstalling LinearMouse (make sure LinearMouse.app is placed in the /Applications folder) and see if the problem is solved.

  5. realperest commented on Apr 19, 2023

    @realperest
    Author

    Ekran Resmi 2023-04-19 20 42 28

    Hi.
    it is in the applications folder as it appears on the screen.
    it is also in the apps launchpad.
    I have uninstalled and installed the app several times

    result unchanged

  6. Luna-Runa commented on Apr 19, 2023

    @Luna-Runa

    I am having the same issue here. I never had this issue on my old PC, which I was using until about a month ago.

    It is not showing up in sudo launchctl list | grep "linear" and ls -la /Library/LaunchAgents/ ~/Library/LaunchAgents/

    As a temporary solution, com.lujjjh.LinearMouse.plist is being create and used in ~/Library/LaunchAgents

    <?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.lujjjh.LinearMouse</string>
     	<key>ProgramArguments</key>
     	<array>
      		<string>/Applications/LinearMouse.app/Contents/MacOS/LinearMouse</string>
     	</array>
     	<key>RunAtLoad</key>
     	<true/>
    </dict>
    </plist>
    
  7. lujjjh commented on Apr 20, 2023

    @lujjjh
    Collaborator

    @realperest @Luna-Runa Thanks for your feedback!

    Could you please check if the launch-at-login helper is working correctly?

    1. Quit LinearMouse.
    2. Run `open /Applications/LinearMouse.app/Contents/Library/LoginItems/LaunchAtLoginHelper.app' in Terminal.app.

    And @Luna-Runa, are you using macOS 13 as well?

    I'll migrate to the new API introduced in macOS 13 in the next release and see if it solves this problem.

  8. lujjjh commented on Apr 20, 2023

    @lujjjh
    Collaborator

    I'll migrate to the new API introduced in macOS 13 in the next release and see if it solves this problem.

    I've published v0.9.0-beta.4.

  9. realperest commented on Apr 20, 2023

    @realperest
    Author

    Hello.
    I'm new to macos.

    I understand that you have released a new version

    Where can I download this (dmg)?

    Thank you.

  10. lujjjh commented on Apr 20, 2023

    @lujjjh
    Collaborator

    Hello. I'm new to macos.

    I understand that you have released a new version

    Where can I download this (dmg)?

    Thank you.

    Hi @realperest,

    You may manually download it here.

    Alternatively, you can also turn on "Receive beta updates" and click "Check for Updates..." in general settings:

    Screenshot 2023-04-20 at 14 47 12

  11. realperest commented on Apr 20, 2023

    @realperest
    Author

    Great, thank you very much.

  12. Luna-Runa commented on Apr 20, 2023

    @Luna-Runa

    Yes, I'm using macOS 13.3.1. I'll try the new beta tomorrow. Thank you.

  13. realperest commented on Apr 20, 2023

    @realperest
    Author

    Ekran Resmi 2023-04-20 21 55 37

    unfortunately it didn't happen.

    it shows up in the list of opening items. but it doesn't work on startup.

  14. Luna-Runa commented on Apr 21, 2023

    @Luna-Runa

    It's exactly the same phenomenon as realperest for me.

    The difference is that '~/Library/Preferences/com.lujjjh.LinearMouse.plist' are created.

    But maybe something is wrong.

    image

  15. 4 remaining items

  16. lujjjh commented on Apr 21, 2023

    @lujjjh
    Collaborator

    Thank you! It appears that there are no issues with the file permissions.

    I couldn't reproduce this problem on a virtual machine running a fresh install of macOS 13.3.1, but like in your video, I found that I'm unable to manually add LinearMouse to the login items after deleting it. (However, I was able to re-enable 'Start at Login' in LinearMouse, and everything seems to be working fine.)

    This is likely due to the presence of the background item. To remove the background item, I would suggest:

    1. Delete LinearMouse.app in /Application.
    2. Wait a moment until LinearMouse disappears from the background items.
    3. Reinstall the latest beta directly.

    Since the latest beta uses the new API introduced in macOS 13, it no longer adds background items.

    I hope that this will fix the issue with your login items.

  17. realperest commented on Apr 22, 2023

    @realperest
    Author

    Hi.
    I've deleted and reinstalled linearmouse several times.

    I don't know what to do in macos to make a program disappear without any remnants. I don't know.

    I will try to uninstall and reinstall one more time. how about a completely clean delete?

  18. realperest commented on Apr 22, 2023

    @realperest
    Author

    Ekran Resmi 2023-04-22 12 16 26

    Even though I uninstalled linearmouse, it still appears here.

    although there is nothing else in the system called linearmouse.

    image

  19. lujjjh commented on Apr 22, 2023

    @lujjjh
    Collaborator

    Does it still exist after you logout and login again?

  20. realperest commented on Apr 22, 2023

    @realperest
    Author

    I turned the system off and on again, it's still there.

    is there any way to recover the system from these residues, to clean it completely?

  21. lujjjh commented on Apr 22, 2023

    @lujjjh
    Collaborator

    Sounds tricky. I did a search and there are a few people experiencing the same problem, not sure if this is a bug or feature of macOS.

    macOS Ventura stores background items in /private/var/db/com.apple.backgroundtaskmanagement/BackgroundItems-*.btm, and deleting this file seems to fix the problem.

    However, due to macOS's System Integrity Protection (SIP), it is a bit tricky to actually do.

    First, you need to disable System Integrity Protection temporarily.

    After reboot, verify that SIP is disabled in Terminal.app using:

    csrutil status

    image

    Then, you may grep the LinearMouse item using

    plutil -p /private/var/db/com.apple.backgroundtaskmanagement/BackgroundItems-*.btm | grep LinearMouse -B 10 -A 10

    image

    It could be helpful to share the result.

    Move the file into Trash:

    sudo mv /private/var/db/com.apple.backgroundtaskmanagement/BackgroundItems-*.btm ~/.Trash

    You will be asked your login password. It is designed not to output anything when you input your password. Press return after you input the password.

    Reboot the computer and the background items should be gone.

    If everything works fine, empty the Trash and finally re-enable SIP.

  22. realperest commented on Apr 22, 2023

    @realperest
    Author

    Unfortunately I don't have that much experience with macos.

    I'd like to ask about the equivalent of the Linear mouse app, I've only ever used it to invert the scroll feature. Is there another small application that I can do this simple operation?

  23. lujjjh commented on Apr 22, 2023

    @lujjjh
    Collaborator

    I've only ever used it to invert the scroll feature. Is there another small application that I can do this simple operation?

    Sure, you might want to check out Scroll Reverser.

    Thank you for taking the time to help test this. I will wait for others to see if they can reproduce this issue. If this issue continues to bother you, you can unsubscribe from it at any time.

  24. lujjjh commented on Apr 22, 2023

    @lujjjh
    Collaborator

    I seem to have reproduced this in some ways, but I'm not sure if these are the cases for you two.

    If LinearMouse.app was moved after it registered the background item (i.e. the first time to toggle Start at Login), the situation will be like yours.

    Even if "Start at Login" is toggled off and on again in subsequent launches, macOS will not update the location of the background item. In other words, the icon of the background item will remain empty and the background item will not be launched at login. In this case, you'll need to remove LinearMouse.app files from the disk and logout / login again, and the broken background item will be removed.

    Worse still, if LinearMouse.app was launched directly from within LinearMouse.dmg (in the mounted read-only filesystem, to be precise), after LinearMouse.dmg was ejected, even if LinearMouse.app was completely removed from the disk, macOS would still show the background item. To verify this, mount LinearMouse.dmg again and open Login Items to see if the background item icon becomes normal.

    To the second case, an easy workaround I've found is to create an empty directory /Volumes/LinearMouse and logout / login again.

  25. Luna-Runa commented on Apr 24, 2023

    @Luna-Runa

    Good. When I created the directory /Volumes/LinearMouse, it removed from the background item.
    image

    And when I reinstall the latest beta, there was a window that moved LinearMouse to Applications unlike before.
    image

    Now 'Start at login' runs correctly and this issue has been resolved.
    image

    Thank you always for your quick care and useful application development !!

  26. github-actions commented on Jun 24, 2023

    @github-actions
    Contributor

    This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days.

  27. github-actions commented on Jun 30, 2023

    @github-actions
    Contributor

    This issue was closed because it has been stalled for 5 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stalebug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions