Activity log for bug #1511154

Date Who What changed Old value New value Message
2015-10-28 23:35:47 Michał Roszka bug added bug
2015-10-28 23:37:47 Michał Roszka description The first user-facing symptom: Google Chrome stable is correctly set as the default browser in System Settings / Details / Default Applications as well as in `update-alternatives --display x-www-browser`, yet it keeps complaining about not being a default browser. Clicking "Make Google Chrome the default browser." has no response. The problem is reported here http://askubuntu.com/questions/688779/google-chrome-stable-keeps-asking-if-it-should-be-set-to-default but the answer is somewhat wrong. I have successfully reproduced and debugged the problem. I managed to establish that it is connected to xdg-utils, namely to /usr/bin/xdg-settings script. ``` michal@furia:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 15.10 Release: 15.10 Codename: wily michal@furia:~$ xdg-settings get default-web-browser firefox.desktop michal@furia:~$ xdg-settings set default-web-browser google-chrome.desktop michal@furia:~$ echo $? 2 michal@furia:~$ xdg-settings get default-web-browser firefox.desktop ``` There is a function in /usr/bin/xdg-settings called desktop_file_to_binary() and it has a bug. It is slightly different than the one in the vanilla xdg-utils 1.1.0 rc3. It is implemented in scripts/xdg-utils-common.in. See line 65 in xdg-utils-1.1.0~rc3+git20150907/scripts/xdg-utils-common.in : ``` command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | sed -e 's/ .*$//'`" ``` When executed against google-chrome.desktop or firefox.desktop it results with: ``` google-chrome-stable google-chrome-stable google-chrome-stable ``` or ``` firefox firefox firefox ``` respectively. When passed to `which` and then to `readlink -f` it results with no path to the actual binary. In the vanilla xdg-utils package (version 1.1.0 rc3) the `sed` part is replaced with `first_word`. An alternative would be adding `| head -1`. Then we would have only one `google-chrome-stable` or `firefox` which in turn would result with the actual path to binary resolved correctly and that would make xdg-settings work fine. The first user-facing symptom: Google Chrome stable is correctly set as the default browser in System Settings / Details / Default Applications as well as in update-alternatives --display x-www-browser yet it keeps complaining about not being a default browser. Clicking "Make Google Chrome the default browser." has no response. The problem is reported here http://askubuntu.com/questions/688779/google-chrome-stable-keeps-asking-if-it-should-be-set-to-default but the answer is somewhat wrong. I have successfully reproduced and debugged the problem. I managed to establish that it is connected to xdg-utils, namely to /usr/bin/xdg-settings script. michal@furia:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 15.10 Release: 15.10 Codename: wily michal@furia:~$ xdg-settings get default-web-browser firefox.desktop michal@furia:~$ xdg-settings set default-web-browser google-chrome.desktop michal@furia:~$ echo $? 2 michal@furia:~$ xdg-settings get default-web-browser firefox.desktop There is a function in /usr/bin/xdg-settings called desktop_file_to_binary() and it has a bug. It is slightly different than the one in the vanilla xdg-utils 1.1.0 rc3. It is implemented in scripts/xdg-utils-common.in. See line 65 in xdg-utils-1.1.0~rc3+git20150907/scripts/xdg-utils-common.in : command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | sed -e 's/ .*$//'`" When executed against google-chrome.desktop or firefox.desktop it results with: google-chrome-stable google-chrome-stable google-chrome-stable or firefox firefox firefox respectively. When passed to `which` and then to `readlink -f` it results with no path to the actual binary. In the vanilla xdg-utils package (version 1.1.0 rc3) the `sed` part is replaced with `first_word`. An alternative would be adding `| head -1`. Then we would have only one `google-chrome-stable` or `firefox` which in turn would result with the actual path to binary resolved correctly and that would make xdg-settings work fine. Also, it is possible to set Google Chrome as the default browser via its preferences and the aforementioned first user-facing symptom is gone.
2015-10-29 05:21:21 Michał Roszka description The first user-facing symptom: Google Chrome stable is correctly set as the default browser in System Settings / Details / Default Applications as well as in update-alternatives --display x-www-browser yet it keeps complaining about not being a default browser. Clicking "Make Google Chrome the default browser." has no response. The problem is reported here http://askubuntu.com/questions/688779/google-chrome-stable-keeps-asking-if-it-should-be-set-to-default but the answer is somewhat wrong. I have successfully reproduced and debugged the problem. I managed to establish that it is connected to xdg-utils, namely to /usr/bin/xdg-settings script. michal@furia:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 15.10 Release: 15.10 Codename: wily michal@furia:~$ xdg-settings get default-web-browser firefox.desktop michal@furia:~$ xdg-settings set default-web-browser google-chrome.desktop michal@furia:~$ echo $? 2 michal@furia:~$ xdg-settings get default-web-browser firefox.desktop There is a function in /usr/bin/xdg-settings called desktop_file_to_binary() and it has a bug. It is slightly different than the one in the vanilla xdg-utils 1.1.0 rc3. It is implemented in scripts/xdg-utils-common.in. See line 65 in xdg-utils-1.1.0~rc3+git20150907/scripts/xdg-utils-common.in : command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | sed -e 's/ .*$//'`" When executed against google-chrome.desktop or firefox.desktop it results with: google-chrome-stable google-chrome-stable google-chrome-stable or firefox firefox firefox respectively. When passed to `which` and then to `readlink -f` it results with no path to the actual binary. In the vanilla xdg-utils package (version 1.1.0 rc3) the `sed` part is replaced with `first_word`. An alternative would be adding `| head -1`. Then we would have only one `google-chrome-stable` or `firefox` which in turn would result with the actual path to binary resolved correctly and that would make xdg-settings work fine. Also, it is possible to set Google Chrome as the default browser via its preferences and the aforementioned first user-facing symptom is gone. The first user-facing symptom: Google Chrome stable is correctly set as the default browser in System Settings / Details / Default Applications as well as in update-alternatives --display x-www-browser yet it keeps complaining about not being a default browser. Clicking "Make Google Chrome the default browser." has no response. The problem is reported here http://askubuntu.com/questions/688779/google-chrome-stable-keeps-asking-if-it-should-be-set-to-default but the answer is somewhat wrong. I have successfully reproduced and debugged the problem. I managed to establish that it is connected to xdg-utils, namely to /usr/bin/xdg-settings script. michal@furia:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 15.10 Release: 15.10 Codename: wily michal@furia:~$ xdg-settings get default-web-browser firefox.desktop michal@furia:~$ xdg-settings set default-web-browser google-chrome.desktop michal@furia:~$ echo $? 2 michal@furia:~$ xdg-settings get default-web-browser firefox.desktop There is a function in /usr/bin/xdg-settings called desktop_file_to_binary() and it has a bug. It is slightly different than the one in the vanilla xdg-utils 1.1.0 rc3. It is implemented in scripts/xdg-utils-common.in. See line 65 in xdg-utils-1.1.0~rc3+git20150907/scripts/xdg-utils-common.in : command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | sed -e 's/ .*$//'`" When executed against google-chrome.desktop or firefox.desktop it results with: google-chrome-stable google-chrome-stable google-chrome-stable or firefox firefox firefox respectively. When passed to `which` and then to `readlink -f` it results with no path to the actual binary. In the vanilla xdg-utils package (version 1.1.0 rc3) the `sed` part is replaced with `first_word`. An alternative would be adding `| head -n 1`. Then we would have only one `google-chrome-stable` or `firefox` which in turn would result with the actual path to binary resolved correctly and that would make xdg-settings work fine. Also, it is possible to set Google Chrome as the default browser via its preferences and the aforementioned first user-facing symptom is gone.
2015-10-29 12:01:31 Michał Roszka description The first user-facing symptom: Google Chrome stable is correctly set as the default browser in System Settings / Details / Default Applications as well as in update-alternatives --display x-www-browser yet it keeps complaining about not being a default browser. Clicking "Make Google Chrome the default browser." has no response. The problem is reported here http://askubuntu.com/questions/688779/google-chrome-stable-keeps-asking-if-it-should-be-set-to-default but the answer is somewhat wrong. I have successfully reproduced and debugged the problem. I managed to establish that it is connected to xdg-utils, namely to /usr/bin/xdg-settings script. michal@furia:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 15.10 Release: 15.10 Codename: wily michal@furia:~$ xdg-settings get default-web-browser firefox.desktop michal@furia:~$ xdg-settings set default-web-browser google-chrome.desktop michal@furia:~$ echo $? 2 michal@furia:~$ xdg-settings get default-web-browser firefox.desktop There is a function in /usr/bin/xdg-settings called desktop_file_to_binary() and it has a bug. It is slightly different than the one in the vanilla xdg-utils 1.1.0 rc3. It is implemented in scripts/xdg-utils-common.in. See line 65 in xdg-utils-1.1.0~rc3+git20150907/scripts/xdg-utils-common.in : command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | sed -e 's/ .*$//'`" When executed against google-chrome.desktop or firefox.desktop it results with: google-chrome-stable google-chrome-stable google-chrome-stable or firefox firefox firefox respectively. When passed to `which` and then to `readlink -f` it results with no path to the actual binary. In the vanilla xdg-utils package (version 1.1.0 rc3) the `sed` part is replaced with `first_word`. An alternative would be adding `| head -n 1`. Then we would have only one `google-chrome-stable` or `firefox` which in turn would result with the actual path to binary resolved correctly and that would make xdg-settings work fine. Also, it is possible to set Google Chrome as the default browser via its preferences and the aforementioned first user-facing symptom is gone. The first user-facing symptom: Google Chrome stable is correctly set as the default browser in System Settings / Details / Default Applications as well as in update-alternatives --display x-www-browser yet it keeps complaining about not being a default browser. Clicking "Make Google Chrome the default browser." on Chrome's settings page has no response. The problem is reported here http://askubuntu.com/questions/688779/google-chrome-stable-keeps-asking-if-it-should-be-set-to-default but the answer is somewhat wrong. I have successfully reproduced and debugged the problem. I managed to establish that it is connected to xdg-utils, namely to /usr/bin/xdg-settings script. michal@furia:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 15.10 Release: 15.10 Codename: wily michal@furia:~$ xdg-settings get default-web-browser firefox.desktop michal@furia:~$ xdg-settings set default-web-browser google-chrome.desktop michal@furia:~$ echo $? 2 michal@furia:~$ xdg-settings get default-web-browser firefox.desktop There is a function in /usr/bin/xdg-settings called desktop_file_to_binary() and it has a bug. It is slightly different than the one in the vanilla xdg-utils 1.1.0 rc3. It is implemented in scripts/xdg-utils-common.in. See line 65 in xdg-utils-1.1.0~rc3+git20150907/scripts/xdg-utils-common.in : command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | sed -e 's/ .*$//'`" When executed against google-chrome.desktop or firefox.desktop it results with: google-chrome-stable google-chrome-stable google-chrome-stable or firefox firefox firefox respectively. When passed to `which` and then to `readlink -f` it results with no path to the actual binary. In the vanilla xdg-utils package (version 1.1.0 rc3) the `sed` part is replaced with `first_word`. An alternative would be adding `| head -n 1`. Then we would have only one `google-chrome-stable` or `firefox` which in turn would result with the actual path to binary resolved correctly and that would make xdg-settings work fine. Also, it is possible to set Google Chrome as the default browser via its preferences and the aforementioned first user-facing symptom is gone.
2015-11-10 15:37:41 Launchpad Janitor xdg-utils (Ubuntu): status New Confirmed
2015-11-10 16:03:01 Iuri Chaer attachment added Add head -n1 to grep for Exec inside .desktop file, so the next command doesn't get a multiline input. https://bugs.launchpad.net/ubuntu/+source/xdg-utils/+bug/1511154/+attachment/4516300/+files/xdg-settings.patch
2015-11-10 16:20:02 Ubuntu Foundations Team Bug Bot tags patch
2015-11-10 16:20:12 Ubuntu Foundations Team Bug Bot bug added subscriber Ubuntu Review Team
2015-11-10 16:23:51 Iuri Chaer attachment added Patching all lines grepping for Exec inside .desktop files with head -n1. https://bugs.launchpad.net/ubuntu/+source/xdg-utils/+bug/1511154/+attachment/4516305/+files/xdg-settings.1.patch
2015-11-13 11:03:12 Sebastien Bacher bug added subscriber Ubuntu Sponsors Team
2015-11-13 21:22:45 Mathew Hodson xdg-utils (Ubuntu): importance Undecided Medium
2015-11-13 21:23:00 Mathew Hodson tags patch patch wily
2015-11-20 03:06:46 Launchpad Janitor xdg-utils (Ubuntu): status Confirmed Fix Released
2016-03-01 17:56:24 Michael Schaller bug added subscriber Michael Schaller
2016-03-22 09:42:47 Ryan Lux bug added subscriber Ryan Lux
2016-03-22 18:05:17 Saikrishna Arcot bug added subscriber Saikrishna Arcot
2016-03-22 19:15:50 Launchpad Janitor branch linked lp:~saiarcot895/ubuntu/wily/xdg-utils/fix-multiple-execs
2016-03-22 19:23:49 Saikrishna Arcot description The first user-facing symptom: Google Chrome stable is correctly set as the default browser in System Settings / Details / Default Applications as well as in update-alternatives --display x-www-browser yet it keeps complaining about not being a default browser. Clicking "Make Google Chrome the default browser." on Chrome's settings page has no response. The problem is reported here http://askubuntu.com/questions/688779/google-chrome-stable-keeps-asking-if-it-should-be-set-to-default but the answer is somewhat wrong. I have successfully reproduced and debugged the problem. I managed to establish that it is connected to xdg-utils, namely to /usr/bin/xdg-settings script. michal@furia:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 15.10 Release: 15.10 Codename: wily michal@furia:~$ xdg-settings get default-web-browser firefox.desktop michal@furia:~$ xdg-settings set default-web-browser google-chrome.desktop michal@furia:~$ echo $? 2 michal@furia:~$ xdg-settings get default-web-browser firefox.desktop There is a function in /usr/bin/xdg-settings called desktop_file_to_binary() and it has a bug. It is slightly different than the one in the vanilla xdg-utils 1.1.0 rc3. It is implemented in scripts/xdg-utils-common.in. See line 65 in xdg-utils-1.1.0~rc3+git20150907/scripts/xdg-utils-common.in : command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | sed -e 's/ .*$//'`" When executed against google-chrome.desktop or firefox.desktop it results with: google-chrome-stable google-chrome-stable google-chrome-stable or firefox firefox firefox respectively. When passed to `which` and then to `readlink -f` it results with no path to the actual binary. In the vanilla xdg-utils package (version 1.1.0 rc3) the `sed` part is replaced with `first_word`. An alternative would be adding `| head -n 1`. Then we would have only one `google-chrome-stable` or `firefox` which in turn would result with the actual path to binary resolved correctly and that would make xdg-settings work fine. Also, it is possible to set Google Chrome as the default browser via its preferences and the aforementioned first user-facing symptom is gone. (Existing description has been broken up into sections.) [Impact] The first user-facing symptom: Google Chrome stable is correctly set as the default browser in System Settings / Details / Default Applications as well as in update-alternatives --display x-www-browser yet it keeps complaining about not being a default browser. Clicking "Make Google Chrome the default browser." on Chrome's settings page has no response. The problem is reported here http://askubuntu.com/questions/688779/google-chrome-stable-keeps-asking-if-it-should-be-set-to-default but the answer is somewhat wrong. [Test Case] I have successfully reproduced and debugged the problem. I managed to establish that it is connected to xdg-utils, namely to /usr/bin/xdg-settings script. michal@furia:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 15.10 Release: 15.10 Codename: wily michal@furia:~$ xdg-settings get default-web-browser firefox.desktop michal@furia:~$ xdg-settings set default-web-browser google-chrome.desktop michal@furia:~$ echo $? 2 michal@furia:~$ xdg-settings get default-web-browser firefox.desktop There is a function in /usr/bin/xdg-settings called desktop_file_to_binary() and it has a bug. It is slightly different than the one in the vanilla xdg-utils 1.1.0 rc3. It is implemented in scripts/xdg-utils-common.in. See line 65 in xdg-utils-1.1.0~rc3+git20150907/scripts/xdg-utils-common.in : command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | sed -e 's/ .*$//'`" When executed against google-chrome.desktop or firefox.desktop it results with: google-chrome-stable google-chrome-stable google-chrome-stable or firefox firefox firefox respectively. When passed to `which` and then to `readlink -f` it results with no path to the actual binary. In the vanilla xdg-utils package (version 1.1.0 rc3) the `sed` part is replaced with `first_word`. An alternative would be adding `| head -n 1`. Then we would have only one `google-chrome-stable` or `firefox` which in turn would result with the actual path to binary resolved correctly and that would make xdg-settings work fine. Also, it is possible to set Google Chrome as the default browser via its preferences and the aforementioned first user-facing symptom is gone. [Regression Potential] Limited. The commands after the modified lines assume that there is only one line, so passing the output of the modified lines through `head -n1` should ensure that. In the case of there being 0 or 1 lines before the `head -n1` command, nothing will be changed. In the worst case, there may exist a .desktop file where the first Exec line isn't the main program (mentioned in comment 2 below). In that case, however, this change will result in the incorrect program being chosen; this may or may not be better than the command not working at all.