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

bl-x-www-browser-pipemenu: select default browser should exit with a message... #49

Closed
capn-damo opened this issue Oct 14, 2016 · 2 comments

Comments

@capn-damo
Copy link
Contributor

...if only one browser is installed.

When running the command in a terminal:

sudo update-alternatives --config x-www-browser
[sudo] password for user: 
There is only one alternative in link group x-www-browser (providing /usr/bin/x-www-browser): /usr/bin/firefox-esr
Nothing to configure.

If run from the menu item, the screen just exits without informing the user there is nothing to configure. So causing confusion to a new user, who may think there is a bug! https://forums.bunsenlabs.org/viewtopic.php?id=2867

@johnraff
Copy link
Member

The easiest fix is to put in a delay before closing the terminal:

menuItem 'Select Default Browser' "x-terminal-emulator -T 'Select Default Browser' -e sh -c 'sudo update-alternatives --config x-www-browser; sleep 6'"

But an alternative would be to make $INSTALLED an integer, increment it each time an installed browser is found, and check if it's greater than one before displaying the menu item.

@johnraff
Copy link
Member

johnraff commented Oct 21, 2016

That second alternative mentioned above would miss browsers installed by some other route. For now, let's just add the 6 sec sleep.

Now done in deuterium branch. (sleep dropped to 5 sec)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants