Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AltTab does not start on startup/login. #4154

Open
vx-github opened this issue Jan 22, 2025 · 13 comments
Open

AltTab does not start on startup/login. #4154

vx-github opened this issue Jan 22, 2025 · 13 comments
Labels
bug Something isn't working unreproducible Need help from the author to reproduce the issue

Comments

@vx-github
Copy link

vx-github commented Jan 22, 2025

Describe the bug

AltTab does not start on startup/login. When this happens "Start on login" preference in AltTab is on. AltTab is absent from "Open at Login" and "Allow in the Background" MacOs settings. When AltTab is added to "Open at Login", it has disappeared on next startup.

At the moment I only can start AltTab by manually staring the application and it will work fine. It did worked before, I'm not sure when it didn't start on startup anymore. I experience this problems since ... I cannot recall, but it was some 7.x.x version.

Steps to reproduce the bug

  1. Have AltTab installed
  2. Start MacOs
  3. AltTab is not started
  4. Add AltTab to "Open at Login" MacOs settings
  5. Restart MacOs
  6. AltTab is not started and the entry in "Open at Login" is removed

Your environment

  • AltTab version: 7.19.1
  • macOS version: 15.2
  • Other relevant info: external USB keyboard (different layout) and external monitor is attached, some key remapping is done (not sure how that would explain the disappearance of AltTab in the "Open at Login" settings)
@vx-github vx-github added the bug Something isn't working label Jan 22, 2025
@lwouis
Copy link
Owner

lwouis commented Jan 22, 2025

Hi,

You can't add the app manually to the Login Items list. You need to go in the app's preferences > check the Open at login checkbox. This will add the app to LaunchAgents and it will launch at login.

We had people have multiple launches at login so we added code to remove the manual edition. Only the built-in way from the app itself is supported.

Thank you

@lwouis lwouis closed this as completed Jan 22, 2025
@vx-github
Copy link
Author

Hi @lwouis, Thanks for you quick reponse. I also tried to trigger the switch for "Start on Login" in the AltTab preferences, but that seems to do nothing. Please reopen this issue.

@lwouis
Copy link
Owner

lwouis commented Jan 22, 2025

Have you tried to log out then log back in? AltTab doesn't launch then? When the checkbox is checked?

@vx-github
Copy link
Author

I tried:

  • restarting
  • shutdown / start
  • logout / login

AltTab won't start unless I manually start it.

@lwouis lwouis reopened this Jan 22, 2025
@lwouis
Copy link
Owner

lwouis commented Jan 22, 2025

Is AltTab in /Applications?
Do you have corporate security software like JAMF which could prevent this?

@vx-github
Copy link
Author

vx-github commented Jan 22, 2025

Yes, AltTab is in /Applications.
No JAMF is installed, just anti-virus and VPN software.

I use the option "Reopen windows when logging back in." on shutdown/restart/logout. I disabled this and did a logout/login, but AltTab would wouldn't start. Even if the AltTab preference window is open and this option is checked, AltTab won't open the preference window on login.

@lwouis
Copy link
Owner

lwouis commented Jan 22, 2025

It seems that AltTab is properly starting at launch for you now. Is that so?

Now you have an issue with the preference window not being restored at launch, if it was open when you restarted, is that so?

@vx-github
Copy link
Author

Not sure what you mean with "AltTab is properly starting at launch for you now". This is the case:

  • AltTab won't start at startup/login (AltTab icon is not visible in the menu bar(status menus) and key short cuts configured in AltTab won't work.
  • AltTab preference window won't reopen on next login when shutdown/restart/logout with the option "Reopen windows when logging back in" is used.

I don't mind the second 'issue', but I really like AltTab to start on login (first issue).

@lwouis
Copy link
Owner

lwouis commented Jan 22, 2025

I understand. I thought AltTab was launching for you, when I read your message:

I disabled this and did a logout/login, but AltTab would start

Do you see this entry in System Settings?

Image

Could you please run this command in Terminal.app?

ls ~/Library/LaunchAgents/com.lwouis.alt-tab-macos.plist

@vx-github
Copy link
Author

vx-github commented Jan 22, 2025

Ow, I see where this went wrong, your quote of my comment contains a typo would --> wouldn't (I corrected the original comment). My apologies, solving this and trying the get some work done seemingly isn't a good combination. So AltTab was not started/launched on login in any case (but it did before, that was a while ago).

AltTab is not in the list of "Allow in the Background" applications, this was also in my initial issue and didn't change. I understood that the application should handle if it is in the "Allow in the Background" list and I can not manually add it (via the GUI).

❯ ls ~/Library/LaunchAgents/com.lwouis.alt-tab-macos.plist
ls: /Users/myuser/Library/LaunchAgents/com.lwouis.alt-tab-macos.plist: No such file or directory

@lwouis
Copy link
Owner

lwouis commented Jan 22, 2025

Thank you

The file is not where it should be. I imagine that somehow, AltTab doesn't have the permission to add the file there.

Could you please run AltTab from Terminal with this command /Applications/AltTab.app/Contents/MacOS/AltTab --logs=debug?

Then when you toggle the launch-at-login checkbox in the preferences, I think it will log an error because it can't add the file. Could you please share the logs here, especially around the time you toggle the checkbox on?

Thank you

@lwouis lwouis added the unreproducible Need help from the author to reproduce the issue label Jan 22, 2025
@vx-github
Copy link
Author

vx-github commented Jan 22, 2025

When I run the command a permission dialogue pops up mention I don't have set permissions for "Screen & System Audio Recording". If I head over to these permissions settings, the setting for AltTab does not reflect the status in the AltTab permission popup: MacOs settings screen show a permission set to true, but the AltTab dialogue still says it needs the permission.

Going back and forth and finally remove AltTab from /Applications and removing all permissions (Access and Screen & System Audio Recording) and starting from zero, I got mismatches again, AltTab started twice (menu bar) and a suddenly popup of the permissions screen when I thought AltTab already was closed. I even got a crash at some point.

I will investigate some more to have a clean test.

Anyway, when I got AltTab (debug) to somewhat run (without the permission for Screen & System Audio Recording), I got this from the debug logging when I toggled (off to on) the "Start on login" switch:

11:29:15 DEBG GeneralTab.swift:106 startAtLoginCallback() file:///Users/myuser/Library/LaunchAgents/com.lwouis.alt-tab-macos.plist written

I listed the file and it wasn't there.

I will get back on this later.

@lwouis
Copy link
Owner

lwouis commented Jan 22, 2025

Thank you for your continuous support

Note that when running AltTab from Terminal.app, you'll need to give Accessibility and Screen Recording permissions to Terminal.app, since it's the parent process running AltTab

Could you please try running this custom build, from Terminal.app, and share the logs? I've updated the code to have more intermediate steps, and to better log what fails.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unreproducible Need help from the author to reproduce the issue
Projects
None yet
Development

No branches or pull requests

2 participants