FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Edubuntu User

 
 
LinkBack Thread Tools
 
Old 09-16-2010, 10:05 PM
Nick Fenger
 
Default Google Chrome as Local App?

This is the final final final version, in production for a day now:again*/opt/tcs/chrome/profile/chromium/ contains the template profile copied from a user's account
#!/bin/bash

if [ ! -d "$HOME/.config/chromium" ]; then**# do this if profile doesn't exist**mkdir ~/.config/chromium.orig**cp -R /opt/tcs/chrome/profile/chromium/* ~/.config/chromium.orig

**chown -R $USER:$USER ~/.config/chromium.origelse**mv ~/.config/chromium ~/.config/chromium.origfiif [ -d "/tmp/.config-chromium/" ]; then**rm -rf /tmp/.config-chromium

fimkdir /tmp/.config-chromiumchmod 777 /tmp/.config-chromiumln -sf /tmp/.config-chromium ~/.config/chromiumln -sf ~/.config/chromium.orig/Default /tmp/.config-chromium/Default

chromium-browser --no-first-run $*


On Wed, Sep 15, 2010 at 12:23 PM, Nick Fenger <nick@trilliumcharterschool.org> wrote:


Here's the final final script:
#!/bin/bashif [ ! -d "$HOME/.config/chromium" ]; then

**# do this if profile doesn't exist**mkdir ~/.config/chromium.orig*
**cp -R /opt/tcs/chrome/profile/chromium/* ~/.config/chromium.orig**chown -R $USER:$USER ~/.config/chromium.origelse**mv ~/.config/chromium ~/.config/chromium.orig

fi
mkdir /tmp/.config-chromiumln -sf /tmp/.config-chromium ~/.config/chromiumln -sf ~/.config/chromium.orig/Default /tmp/.config-chromium/Defaultchromium-browser*


...where*/opt/tcs/chrome/profile/chromium/ is the location of the template profile

On Wed, Sep 15, 2010 at 10:56 AM, Nick Fenger <nick@trilliumcharterschool.org> wrote:



I believe I have resolved the issue when there is no chrome profile for a user.*
Here's the final script:
I needed to create a "template" profile in the client image /opt/tcs/chrome/profile/chromium. I simply copied a fresh profile from one of my users.*




mkdir ~/.config/chromium.origcp -R /opt/tcs/chrome/profile/chromium/* ~/.config/chromium.origchown -R $USER:$USER ~/.config/chromium.origmkdir /tmp/.config-chromium



ln -sf /tmp/.config-chromium ~/.config/chromiumln -sf ~/.config/chromium.orig/Default /tmp/.config-chromium/Defaultchromium-browser
I assume my "template" profile will need to be updated when chrome gets updated but I am not sure.*





On Tue, Sep 14, 2010 at 2:25 PM, Nick Fenger <nick@trilliumcharterschool.org> wrote:




Hello,

The script below seems to work for users who already have a chrome profile, however, if there is no profile I get:

nick@ltsp87:/tmp$ run-chrome
mv: cannot stat `/home/nick/.config/chromium': No such file or directory





[3231:3231:958859199:FATAL:chrome/browser/browser_main.cc(592)] Check failed: profile. Cannot get default profile.
/usr/bin/run-chrome: line 7:* 3231 Aborted**************** chromium-browser --no-first-run %U

I get the same error* when running without --no-first-run






Ideas?

Here's the current script (run-chrome.sh):

#!/bin/bashmv ~/.config/chromium ~/.config/chromium.orig






mkdir /tmp/.config-chromium
ln -sf /tmp/.config-chromium ~/.config/chromium
ln -sf ~/.config/chromium.orig/Default /tmp/.config-chromium/Default

chromium-browser --no-first-run


Thanks,

-Nick


On Tue, Sep 14, 2010 at 11:47 AM, Nick Fenger <nick@trilliumcharterschool.org> wrote:





Hello,
An update on this:
I*implemented*Stéphane's workaround and it appears to be working. One caveat is that chrome shows the first run prompt each time, however, chrome has a --no-first-run flag: (i.e.*chromium-browser --no-first-run ) *which takes care of this problem.






Here is my script placed in /opt/ltsp/i386/opt/run-chrome.sh
#!/bin/bashmv ~/.config/chromium ~/.config/chromium.orig






mkdir /tmp/.config-chromium
ln -sf /tmp/.config-chromium ~/.config/chromium
ln -sf ~/.config/chromium.orig/Default /tmp/.config-chromium/Default

chromium-browser --no-first-run*
$ sudo chroot /opt/ltsp/i386





then: $*chmod +x**/opt/run-chrome.shthen: $*ln -s*/opt/run-chrome.sh /bin/run-chrome

after rebuilding the image i can now run in a terminal on the client
$ ltsp-localapps run-chrome*

and I get chrome!!!
Thanks Again,
-Nick


On Tue, Sep 7, 2010 at 7:42 PM, Stéphane Graber <stgraber@ubuntu.com> wrote:






mv ~/.config/chromium ~/.config/chromium.orig

mkdir /tmp/.config-chromium

ln -sf /tmp/.config-chromium ~/.config/chromium

ln -sf ~/.config/chromium.orig/Default /tmp/.config-chromium/Default

--
Nick Fenger
-Information Technology

Trillium Charter School
5420 N. Interstate Ave






Portland, OR 97217
(503) 285-3833
http://www.trilliumcharterschool.org













--
Nick Fenger
-Information Technology

Trillium Charter School
5420 N. Interstate Ave
Portland, OR 97217
(503) 285-3833
http://www.trilliumcharterschool.org











--
Nick Fenger
-Information Technology

Trillium Charter School
5420 N. Interstate Ave
Portland, OR 97217
(503) 285-3833
http://www.trilliumcharterschool.org











--
Nick Fenger
-Information Technology

Trillium Charter School
5420 N. Interstate Ave
Portland, OR 97217
(503) 285-3833
http://www.trilliumcharterschool.org










--
Nick Fenger
-Information Technology

Trillium Charter School
5420 N. Interstate Ave
Portland, OR 97217
(503) 285-3833
http://www.trilliumcharterschool.org






--
edubuntu-users mailing list
edubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/edubuntu-users
 

Thread Tools




All times are GMT. The time now is 03:34 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org