I wish I used firefox really, the bar in chrome is just better then firefox, even then firefoxs omnibar. Chromes predicts what i want better and i dont need to click nearly as much
ex. to click go to youtube through the bar i type y - enter
firefox is y-down-enter
and searching with y-tab-search is way faster then firefox could do...
but I wish i could use firefox for better syncing, passwords/fennec browser
Although this isn't really an elegant solution and may even cause errors on some systems, here is what I just did:
1.) Moved the original shutdown and reboot script to new locations:
~$ sudo mv /sbin/reboot /sbin/reboot_original
~$ sudo mv /sbin/shutdown /sbin/shutdown_original
2.) Created new bash scripts that invoke the "…_original" ones but kill chrome first:
~$ sudo nano /etc/shutdown
~$ sudo chmod +x /etc/shutdownCode:#!/bin/sh kill -TERM $(pgrep chrom) args=`getopt r:h:H:P:ckqv $*` /sbin/shutdown_original $args
~$ sudo nano /etc/reboot
$ sudo chmod +x /etc/rebootCode:#!/bin/sh kill -TERM $(pgrep chrom) /sbin/reboot_original
As I said, works fine for me, could screw up things even worse for you. No guarantees here.
"640 k ought to be enough for anyone" - Bill Gates, 1981
- never trust the 'experts'
I was sure this would work. The commands killed chromium just fine but when everything was setup neither shutdown or reboot kill chrome in time... I could implement a sleep in there but that would slow down reboot times... maybe worth it actually
Im on a fairly fast SSD on a netbook so processes might run in weird orders because the ssd seeks fster then the processor can do some commands... so the future commands might finish before the killchrome was fully done
Have you experimented a bit how long the sleep would have to be? I'm sure you can afford to lose 1 or 2 seconds.
Another solution I've thought of would be to write a little daemon that runs on xserver session startup and just before it gets killed it nicely closes Chrome. I don't have the time to write one right now but I might get round to do it next week.
"640 k ought to be enough for anyone" - Bill Gates, 1981
- never trust the 'experts'
In my experience if you manually close Chrome before shutdown it may have more time to terminate completely. Chrome starts a number of separate processes and the all need to terminate. To me this was such a small issue that I didn't file a bug report. Perhaps you should.
Thank a veteran -- George 8)
Internet Coach & Writer
Personal Blog -- 3 Joes' Blog
I definitely can, shutdown time doesn't matter at all to me, (as long as its under 5sec). I'll experiment with it a little bit later this weekend.
I don't think it's appropriate to file a bug report here because in most situations this is a very useful feature, the ability to restore your crashed session with just one click. On my other computes this YBOD (yellow bar of death) has already saved me quite some time, imagine restoring multiple windows with 10-20 open tabs each.
And for the sake of speed Ubuntu doesn't end all possible processes 'nicely' which I perfectly understand. OS X does that and it can take ages just to shut down.
"640 k ought to be enough for anyone" - Bill Gates, 1981
- never trust the 'experts'
I just tried to use a Python script instead of bash. Closing chrome works nicely but the computer will hang later in the shutdown process (probably when /sbin/shutdown is invoked again but python's not available anymore).
EDIT: Let me know whether this works for you:
/sbin/shutdown:
Code:#!/bin/sh t=`/sbin/pidof chromium-browser` while [ -n "$t" ] # while chrome is running do `/bin/kill -TERM $(pgrep chrom)` t=`/sbin/pidof chromium-browser` done if [ -z "$t" ] # if it's not running: then args=`getopt h:r:H:P:ckqv $*` /sbin/shutdown_original $args fi exit 0
Last edited by Dysport; June 26th, 2010 at 11:44 AM.
"640 k ought to be enough for anyone" - Bill Gates, 1981
- never trust the 'experts'
Thank a veteran -- George 8)
Internet Coach & Writer
Personal Blog -- 3 Joes' Blog
Bookmarks