Choose style:

Author Topic: database lock file contains a pid  (Read 239 times)

0 Members and 1 Guest are viewing this topic.

Offline JWW

  • nOOb
  • *
  • Posts: 11
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 9
database lock file contains a pid
« on: December 27, 2018, 09:59:44 am »
Just installed Peppermint 9 on a old Dell laptop. Installation went fine.  I installed Darktable via the software GUI not terminal. Then when trying to run it I got something like;

... database lock file contains a pid that seems to be alive in your system

So then I go looking for answers on the Internet.  Unfortunately I don't understand how to navigate the directory structure in Linux and I even tried reading about that as well. I came from the Windows world (as far back as the late 80's, DOS era).  I understand what a 'path' is but I haven't a clue how to navigate to the proper directory to delete the locked files (nor where they reside).  I have worked in terminal a little in Xubuntu on another machine so that's not completely new to me. Is it possible to get root privileges in the GUI interface and navigate to the files I need to delete? If not  then how (like precisely) do I accomplish this? I tried using the sudo command in terminal but without success thinking that would let me find the proper directory for the locked files. I'm pretty sure I need root privileges but even then I'm probably not savvy enough to find the locked files. Hopefully this makes sense and you realized I'm new to Linux.

Cheers ....


Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 22902
  • Karma: 2556
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: database lock file contains a pid
« Reply #1 on: December 27, 2018, 10:56:08 am »
Hi JWW, and welcome to the forum :)

Are you sure darktable wasn't already running ? .. the lockfile is created to stop a second darktable instance from starting and theoretically corrupting the database.

Or did you shut down the PC with darktable still open .. maybe this caused the lockfile to stay in place.

Make 100% sure darktable is NOT running, then delete the lockfile by opening a terminal and running:
Code: [Select]
rm ~/.config/darktable/library.db.lock
or to manually delete it from within the GUI...
(there is no need to do this 'as root' because it's in your home folder, so you already have permission to delete it)

Again with darktable CLOSED:-

1) Open the file manager.

2) in the left-hand pane, select "Home".

3) if you can't currently see hidden files and folders toggle them to show with Ctrl+H
(remember all files and folders whos name starts with an "." are hidden by default, unless you've toggled "Show hidden files")

4) In the main right-hand pane enter the ".config" folder now it's unhidden.

5) In the main right-hand pane enter the "darktable" folder.

6) Right-click the "library.db.lock" file, and select "Delete".



As I said, in this case there is no need to open the file manager 'as root' to do this because it's in your home folder where you already have read/write/execute permissions .. but should you ever require an instance of the file manager  with elevated privileges, simply:-

a) Open the file manager

b) Right-click any folder and select "Open as root"

c) Enter your password when prompted.

d) Use the new instance of the file manager that just opened with Elevated Privileges to do whatever you need to do 'as root'.
« Last Edit: December 27, 2018, 11:08:08 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline JWW

  • nOOb
  • *
  • Posts: 11
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 9
Re: database lock file contains a pid
« Reply #2 on: December 27, 2018, 02:28:58 pm »
Thanks ...

I'm not at all familiar with Peppermint O/S. To be honest I didn't realize any of those directories were hidden by default. <duh>  Just to clarify (before I do anything as you directed) when I installed Darktable (via Software Manager) it seemed to install correctly. Of course I was in the  GUI when it installed so no terminal information was shown.  Then I clicked on 'Launch' button while still in Software Manager and right after that I got the following message (assuming I just typed it correctly below);

-----
an error has occurred while trying to open the database from
/home/jbowlin/.var/app/org.darktable.Darktable/config/darktable/data.db
the database lock file contains a pid that  seems to be alive in your system:2
                                     close darktable
------

When I navigated to the /home directory I didn't know subdirectories were hidden. <duh> Anyway I initiated the Ctrl+H and presto they appeared. <g.>  I navigate to /home/jbowlin/.config directory but didn't see a Darktable directory.  More confused now.

-JWW
« Last Edit: December 27, 2018, 02:31:16 pm by JWW »

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 22902
  • Karma: 2556
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: database lock file contains a pid
« Reply #3 on: December 27, 2018, 05:37:37 pm »
Oh, hold on .. did you install it as a flatpak or snap ?

Can you open a terminal and post the output from:
Code: [Select]
flatpak list
and
Code: [Select]
snap list
and whilst you're at it, can you post the output from
Code: [Select]
ls /home/jbowlin/.var/app/org.darktable.Darktable/config/darktable
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline JWW

  • nOOb
  • *
  • Posts: 11
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 9
Re: database lock file contains a pid
« Reply #4 on: December 27, 2018, 07:25:24 pm »
I haven't a clue what flatpak or snap is, that is until I just looked it up.  As I mentioned before I used Software Manager which was installed with Peppermint 9.









-JWW:

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 22902
  • Karma: 2556
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: database lock file contains a pid
« Reply #5 on: December 27, 2018, 07:51:14 pm »
A snap and/or flatpak are new universal package formats .. we support them, but on the whole we generally suggest people stick to the .deb versions where possible.

You could probably just run:
Code: [Select]
rm /home/jbowlin/.var/app/org.darktable.Darktable/config/darktable/library.db.lock
to delete the lock file.

But if you want to switch to the .deb version, uninstall the flatpak version with
Code: [Select]
flatpak remove org.darktable.Darktable
then install the .deb version with
Code: [Select]
sudo apt-get install darktable
your call :)
« Last Edit: December 27, 2018, 07:56:06 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline JWW

  • nOOb
  • *
  • Posts: 11
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 9
Re: database lock file contains a pid
« Reply #6 on: December 27, 2018, 08:06:16 pm »
So is the GUI I used,  'Software Manager' actually flatpak?  Just trying  to understand.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 22902
  • Karma: 2556
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: database lock file contains a pid
« Reply #7 on: December 27, 2018, 08:14:14 pm »
No, the Software Manager has BOTH options...

If you search the Software Manager for "darktable", you'll see you are offered it twice...

One is labelled "Darktable", the other is labelled "Darktable (flathub)"

The one labelled "Darktable" is packaged using the older but tested and true .deb package format.

The one labelled "Darktable (flathub)" is packaged using the newer flatpak package format.

Personally I don't (currently) like flatpak's or snap's (which are another similar package format) .. but we had to include support for them because SOME software is ONLY available as a flatpak and/or snap as they are seen as 'the future' .. personally I don't think either are ready for prime time YET (both are still under heavy development, and don't always work well), so I advise people to use .deb's wherever possible .. but that's just my opinion, and some will disagree.
« Last Edit: December 27, 2018, 08:27:31 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline JWW

  • nOOb
  • *
  • Posts: 11
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 9
Re: database lock file contains a pid
« Reply #8 on: December 27, 2018, 09:23:14 pm »
Ok, I removed  darktable ... then ran apt-get and got the following;


Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 22902
  • Karma: 2556
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: database lock file contains a pid
« Reply #9 on: December 28, 2018, 08:32:57 am »
Okay lets add the latest version from their PPA

Open a terminal and run these commands in sequence
Code: [Select]
sudo add-apt-repository ppa:pmjdebruijn/darktable-release
then
Code: [Select]
sudo apt-get update
then
Code: [Select]
sudo apt-get install darktable
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline JWW

  • nOOb
  • *
  • Posts: 11
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 9
Re: database lock file contains a pid
« Reply #10 on: December 28, 2018, 03:04:52 pm »
Why don't the other two methods work?

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 22902
  • Karma: 2556
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: database lock file contains a pid
« Reply #11 on: December 28, 2018, 03:37:22 pm »
The flatpak does work .. I don't know what heppened on your system, but it tested fine on mine ???

The .deb version .. this was my fault, I was sitting at a Peppermint 8 PC when I tested the install, and apparently upstream have removed the .deb from their repositories. So for Peppermint 9 you have to add the PPA first.
(this is actually better, because the version in the darktable PPA is the very latest version .. and if/whenn they add a new version, it'll get automagically updated)
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline JWW

  • nOOb
  • *
  • Posts: 11
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 9
Re: database lock file contains a pid
« Reply #12 on: December 28, 2018, 04:01:46 pm »
... being a noob, I got gun shy after receiving this message, so I Ctrl-Ced the operation.  The Peppermint doc(s) suggest using the Software manager so I did, just following directions and the reason for my OP.


Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 22902
  • Karma: 2556
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: database lock file contains a pid
« Reply #13 on: December 28, 2018, 04:08:13 pm »
No need to get gunshy at that prompt .. it's just their standard message from the PPA .. you're using neither Debian or Xenial/Trusty/Precise so that message doesn't apply to you.

I'm the main developer of Peppermint .. I wouldn't intentionally steer you wrong my friend ;)
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline JWW

  • nOOb
  • *
  • Posts: 11
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 9
Re: database lock file contains a pid
« Reply #14 on: December 28, 2018, 04:24:25 pm »
... well that's comforting to know. I've wanted to learn Linux for years but have never taken the time.  I tried several times but wussed out.  I ran a AutoCAD and Graphics BBS way back in the dial up days in the late 80's but was using DOS with all those crazy lengthily batch files then onto OS/2. <g>  I have a couple other laptops running Xubuntu but one is simply used as a telemarketer call blocker (jcblock) and the other running Boinc Manager for the Milkyway@Home project so I really don't have to do much with the OS.  I wanted to setup an old Dell XPS M1530 with Linux for my granddaughter to use. BTW I appreciate the help.
« Last Edit: December 28, 2018, 04:26:33 pm by JWW »