|
|
Created:
6 years, 9 months ago by Jamie Modified:
6 years, 8 months ago CC:
chromium-reviews, grt+watch_chromium.org Base URL:
svn://svn.chromium.org/chrome/trunk/src Visibility:
Public. |
DescriptionRespect CHROME_USER_DATA_DIR in start-up scripts.
This change allows CHROME_USER_DATA_DIR to override the default profile location
is Chrome is launched via a start-up script. The behaviour is unchanged if that
environment variable is not set.
BUG=351002
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=260461
Patch Set 1 #Patch Set 2 : Reviewer feedback. #Messages
Total messages: 17 (0 generated)
PTAL. Is there a build target I can use to generate a suitable .deb so that I can test this?
Sorry, I don't understand the need for this. Why not just use the command-line flag? Also the comment when that env variable is used seems inaccurate: // On Linux, Chrome does not support running multiple copies under different // DISPLAYs, so the profile directory can be specified in the environment to // support the virtual desktop use-case. I'm not aware of problems with running under multiple displays (provided each copy is using a different user data dir of course).
On 2014/03/11 18:11:13, Paweł Hajdan Jr. wrote: > Sorry, I don't understand the need for this. > > Why not just use the command-line flag? > > Also the comment when that env variable is used seems inaccurate: > > // On Linux, Chrome does not support running multiple copies under different > // DISPLAYs, so the profile directory can be specified in the environment to > // support the virtual desktop use-case. > > I'm not aware of problems with running under multiple displays (provided each > copy is using a different user data dir of course). That's exactly the problem. When using Chromoting, the user has two desktops--the physical one and the virtual one--with two different DISPLAYs. We set CHROME_USER_DATA_DIR in the virtual one so that all the shortcuts, command-line aliases etc. that the user has set up will work correctly. Asking the user to specify a command-line flag inside the virtual session would mean they'd need separate desktop profiles for the two cases, which seems unreasonable. The original change was motivated by lots of bug reports from users confused that running Chrome inside the virtual desktop appears to do nothing (in fact it has opened a new window on their console, but they don't see that). Worse, some people have Chrome set to auto-start in their profile; those users ended up in a situation whereby Chrome would appear not to run on the console because it was tied to the virtual session at boot-time. This change just extends the same logic to the start-up scripts.
On 2014/03/11 18:57:53, Jamie wrote: > On 2014/03/11 18:11:13, Paweł Hajdan Jr. wrote: > > Sorry, I don't understand the need for this. > > > > Why not just use the command-line flag? > > > > Also the comment when that env variable is used seems inaccurate: > > > > // On Linux, Chrome does not support running multiple copies under different > > // DISPLAYs, so the profile directory can be specified in the environment to > > // support the virtual desktop use-case. > > > > I'm not aware of problems with running under multiple displays (provided each > > copy is using a different user data dir of course). > > That's exactly the problem. When using Chromoting, the user has two > desktops--the physical one and the virtual one--with two different DISPLAYs. We > set CHROME_USER_DATA_DIR in the virtual one so that all the shortcuts, > command-line aliases etc. that the user has set up will work correctly. Asking > the user to specify a command-line flag inside the virtual session would mean > they'd need separate desktop profiles for the two cases, which seems > unreasonable. > > The original change was motivated by lots of bug reports from users confused > that running Chrome inside the virtual desktop appears to do nothing (in fact it > has opened a new window on their console, but they don't see that). Worse, some > people have Chrome set to auto-start in their profile; those users ended up in a > situation whereby Chrome would appear not to run on the console because it was > tied to the virtual session at boot-time. This change just extends the same > logic to the start-up scripts. After re-reading the comment you mention, I agree that it's a little confusing. It should really be talking about "windows", not "copies", and be explicit that it's only true if the same profile directory is being used.
Ping.
Sorry, I'm still confused. Does the user need to specify CHROME_USER_DATA_DIR manually? Whatever specifies it, it can specify a command-line flag instead it seems.
On 2014/03/20 19:16:17, Paweł Hajdan Jr. wrote: > Sorry, I'm still confused. > > Does the user need to specify CHROME_USER_DATA_DIR manually? Whatever specifies > it, it can specify a command-line flag instead it seems. The Chromoting host start-up script specifies the environment variable before it starts the desktop session, which means that it's inherited by all processes in that session, including Chrome. It can't specify the command-line flag because it doesn't run Chrome. Chrome will be run at some later point, perhaps via a command-line entered by the user or perhaps by a shortcut link on the desktop; in either case, it's not reasonable to expect the user to have to remember to use a different command-line or short-cut--everything should just work. Feel free to set up a quick VC if you think this would be easier to understand if I explained it face-to-face.
Please see https://code.google.com/p/chromium/issues/detail?id=264789 for instructions about building official packages. The actual launcher script is https://code.google.com/p/chromium/codesearch#chromium/src/chrome/installer/l...
On 2014/03/24 17:22:58, Paweł Hajdan Jr. wrote: > Please see https://code.google.com/p/chromium/issues/detail?id=264789 for > instructions about building official packages. > > The actual launcher script is > https://code.google.com/p/chromium/codesearch#chromium/src/chrome/installer/l... Thanks for the pointer. I've updated the CL to modify that script instead of the two build.sh scripts. When I build linux_packages_stable, and examine the resulting .deb file, I see my change in opt/google/chrome/google-chrome, but not in usr/bin/google-chrome-stable (in fact, I can't tell how the latter is built at all). Is that the expected result?
On 2014/03/25 19:36:50, Jamie wrote: > On 2014/03/24 17:22:58, Paweł Hajdan Jr. wrote: > > Please see https://code.google.com/p/chromium/issues/detail?id=264789 for > > instructions about building official packages. > > > > The actual launcher script is > > > https://code.google.com/p/chromium/codesearch#chromium/src/chrome/installer/l... > > Thanks for the pointer. I've updated the CL to modify that script instead of the > two build.sh scripts. When I build linux_packages_stable, and examine the > resulting .deb file, I see my change in opt/google/chrome/google-chrome, but not > in usr/bin/google-chrome-stable (in fact, I can't tell how the latter is built > at all). Is that the expected result? Ping
LGTM
The CQ bit was checked by jamiewalch@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jamiewalch@chromium.org/190473005/20001
The CQ bit was unchecked by cmp@chromium.org
The CQ bit was checked by cmp@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jamiewalch@chromium.org/190473005/20001
Message was sent while issue was closed.
Change committed as 260461 |