You are not logged in.

#1 2012-06-22 00:03:52

headkase
Member
Registered: 2011-12-06
Posts: 1,977

Ugly, ugly, Chromium did not shutdown correctly hack.

Chromium constantly gives errors when I launch it.  Either says it didn't shutdown correctly or that there was a problem with my user profile.  The following bash script checks to see if it is running and if it isn't it clears Chromium's cache and deletes the locks on the profile.  It checks to see if Chromium is running first as doing these actions while it is so is probably not the best idea.

Starting Chromium in this manner is working completely fine for myself going on a week now.

#/bin/bash
APP='chromium'
 
if ps ax | grep -v grep | grep $APP > /dev/null
then
    # Chromium is already running
    notify-send -t 3000 "Chromium" "Chromium is already running. A new instance will not be started."
else
    # Release the Chromium locks before starting

    # 1) The next four commented-out lines would be used to fix your user profile in most cases
    #    (Default profile given but applies to other named profiles too)
    #cd ~/.config/chromium
    #cp -r Default/ Default.bak/
    #rm -r Default
    #mv Default.bak/ Default/

    # 2) But, just deleting the locks works just as well
    rm ~/.config/chromium/SingletonCookie
    rm ~/.config/chromium/SingletonLock
    rm ~/.config/chromium/SingletonSocket

    # Clear Chromium's cache before starting
    rm -r ~/.cache/chromium/*

    # Start Chromium skipping any initial set-up and also with a maximized window
    chromium --no-first-run --start-maximized
fi

If Chromium actually does crash then it would probably not be a good idea to start it using this script.  This script is on my panel and what I usually use to launch Chromium.  In my application menu the default launcher is present and when Chromium does crash - hasn't yet - then I'll use that default launcher on the next run.

So, flame on!  Tell me how bad an idea this is!? wink

Last edited by headkase (2012-06-22 04:57:29)

Offline

#2 2014-06-21 13:56:18

ThePeach
Member
From: Berlin, DE
Registered: 2014-06-08
Posts: 40
Website

Re: Ugly, ugly, Chromium did not shutdown correctly hack.

It seems the post is already 2 years old, but I actually got the very same problem, both with Chromium and Chrome.

I appreciate your script but I was wondering what would cause this?
Are you still having the problem?
What WM are you currently on? I'm on gnome 3 ATM, and haven't tried with any other yet.
Ideas?

Offline

#3 2014-06-21 14:28:09

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: Ugly, ugly, Chromium did not shutdown correctly hack.

@ThePeach,

These forums have strict rules around necro-posting.
My suggestion: Create a new thread and if you think this particular one is relevant link to it.
Just friendly advice. smile

Welcome to the forums.

R.

Offline

#4 2014-06-21 15:56:41

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,791

Re: Ugly, ugly, Chromium did not shutdown correctly hack.

Expanding on what ralvez stated, here is our policy

It is highly unlikely that your issue is unrelated to these two year old problems.   Almost everything has changed in that time.   Please feel free to start a new thread, and if you feel this thread is appropriate, then go ahead and link back to this thread.

Thanks.
Closing


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB