Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 months ago.
Improve this question
I use two browsers on my laptop - Brave for my personal stuff (Facebook, personal email, interesting things I want to read) and Firefox for my work browsing (work email, internal webpages, work communication). Normally I like having my default browser for the computer set to Brave (personal), since most of the time I use the laptop outside of work.
I now have the Slack desktop app to keep in better communication with folks at work. But when I click on links from there, it goes to Brave where I am not logged-in to anything work related.
Is there a way to change the browser that Slack opens without changin my system wide default browser?
I'm on a Mac, Mojave, if that helps.
I tried many options; nothing worked for me.
Firfox is my default browser but slack opened links Opera. So i uninstalled Opera. Then slack opened links in Chrome.
Here is what i did that worked for me.
I use Kubuntu and firefox is already the default browser (verified from firefox's settings)
I want slack to open links in firefox
Open System Settings -> Applications -> Default Applications
Select Firefox as the default for Web Browser.
Now slack opens links in firefox.
You could use Browserosaurus or Finicky or even a combination of them.
When Browserosaurus is set up as default browser, and a link is clicked, it shows a list of installed/configured browsers in which to open that link that can be selected with a one-character shortcut.
Finicky can also be setup as a default browser and it allows me to setup rules that can launch a suitable browser based upon those rules. For example: open slack.com links in Firefox, Box.com in Safari and so on.
References:
Browserosaurus - https://github.com/will-stone/browserosaurus
Finicky - https://github.com/johnste/finicky
Maybe this Firefox Workaround helps you:
Open web link in slack
In the Firefox browser instance opened by Slack write "about:profiles" in adress field
Change the profile used as default to your regular profile
found on https://askubuntu.com/questions/1103461/slack-shows-opened-links-to-browser-as-another-slack-instance-in-task-bar
I'm looking to do the same thing, for the same reason.
Even though you can set the default browser system wide, there doesn't appear to be a way to set the default browser per app (e.g. for Slack). There also isn't a way to set a preference in Slack for which browser to launch.
The only option I've found so far is Choosy (https://www.choosyosx.com) but it costs money, though you can trial it for 40 days or so.
I'm trying it out now and works nicely so far.
You can't achieve this straight forward on mac OS, but on Linux you can: Default Browser for certain application | https://askubuntu.com/a/1188672
Considering moving to the Linux world may be one option.
EDIT: Desktop entries are not part of macOS, but maybe one can mimic it by using AppleScript and booting applications from there, or writing a shellscript and booting application from the CLI.
Default Browser for certain application
The above answer by #maxim deals with how to set default browser per app, and fortunately, it uses slack as the example.
I gave up. There's no way in Slack to specify a browser. But with the Firefox Containers extension (I have both the Facebook and Multi-account Container extensions), I can better compartamentalize how I use my tabs. So, now everything defaults to Firefox.
One alternative solution is to open Slack on your favorite browser and open links directly there.
I'm using Windows 10 and frustrated by this problem daily. Annoying as it is, instead of clicking on the item to open it, if you right-click you can copy the link and paste it into your work-related browser. I don't know how / if this would work on a mac though.
In windows 10, i solved this by doing the following:
Start > Settings > Apps > Default Apps > Web Browser -> Your browser.
If you using Ubuntu (Linux) you can just go to about:preferences and click on "make default" button.
on mac: System Preferences -> General -> Default web browser
I'm developing an firefox WebExtensions,and for some reason, I need firefox restart required when the user remove or disable the extensions.
I did see some extensions have this feature like that.
So if someone know about this, please help. Thanks.
Only Legacy Firefox Add-on need restart Firefox to enable. It's a hint from Firefox instead of Extension. The extension which based WebExtensions needless to that.
AFAICS, it seems that the WebExtensions has no reason to need that restart Firefox, and the WebExtensions has no power to do that restart Firefox.
I'm using my desktop to automate getting files from a site using RAutomation and Watir. I couldn't find anything on how RAutomation works with a locked screen if at all. There might be better ways to do this but I'm now more interested in knowing if it's possible to automate sending keys through RAutomation still works or it doesn't just because of the locked screen.
No, it is not possible to interact with the windows and their controls when the screen has been locked. It is a security feature of Windows.
However, you could do something through Remote Desktop. Maybe the discussion at this issue might help you:
https://github.com/jarmo/RAutomation/issues/69
Build a site and using IsMobileDevice.
But how can I test without publish my site and browse to it with my mobile?
Have tried http://www.responsinator.com/ and others and it only looks at size.
Any ideas?
You can use Ripple Emulator or you can use the User Agent Override feature of Chrome Developer Tools to change your user agent. You can also find many other Chrome or Firefox extensions which help you change your user agent. IsMobileDevice works by checking the user agent, so this should help you get what you want.
I am setting up Selenium testing for Safari 5 on Mac. I need to install our Safari extension before hand, and it needs to happen silently and without any user prompting. From previous posts, I've found this works in that it loads the browser with the extension:
open -a Safari okta.safariextz
But it leaves the browser opened with a prompt to the user: "Are you sure you want to install the extension?"
Selenium doesn't have access to this prompt and can't click install. I need to configure Safari such that it does not prompt the user to install, but just allows the extension to be installed.
Is there any way to do this?
Any pointers appreciated.
-Denali
Edit: Possible new method: The answer here might suggest (it's somewhat unclear) that, with a possible risk of messing up your future safari upgrades, you might be able to manually install an extension, skipping the confirmation prompt, via a file move and a plist hack. I haven't tried it, but it looks as if it might work:
If you're just doing this for in-house deployment and don't mind if it breaks on a Safari upgrade, then you can quit Safari, install the extension into ~/Library/Safari/Extensions and update ~/Library/Safari/Extensions/Extensions.plist (the format is rather obvious; /usr/libexec/PlistBuddy is useful for such things).
You can't do what you're after--at least, not with any commandline switch or plist hack that I know of. Extension install confirmation is a core part of Safari's security model, and is not easily circumvented.
Instead, I'd consider using automator (if you're not familiar with it, think Selenium but for desktop apps, and more) to send a click on the appropriate button, and then distributing an automator app that launches safari with the appropriate parameters, sends the click when the extension dialog appears, and then goes on to run Selenium-based (rather than automator-based) automations. To get started, I'd check out the following links:
Automating via applescript rather than the "duplo legos" automation builder: http://www.mactech.com/articles/mactech/Vol.21/21.06/UserInterfaceScripting/index.html
Very brief overview of macro recording (you hit record, send the click you want, hit save, and you can re-execute your recorded actions): http://automator.us/leopard/features/virtual-user.html
My favorite intro to automator tutorial: http://cjrtools.org/mac/tutorials/autohowto.html
I don't believe there is any way to do a silent extension install as it would be a security hole. You may want to try incorporating an AppleScript to do the extension install before running your Selenium tests.
Here is another question on StackOverflow with AppleScript details for Safari extension reloading that can be used for your purposes:
How to reload a Safari Extension from the command line?