Re: Where are the /tmp/konsole-xxxxx.history files?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/12/20 1:33 PM, Myriam Schweingruber wrote:
Hi,

On Thu, 5 Nov 2020 at 10:05, chiasa.men <chiasa.men@xxxxxx <mailto:chiasa.men@xxxxxx>> wrote:

    kmail -v
    kmail2 5.15.2 (20.08.2)

    Earlier the konsole history was saved in /tmp/konsole-xxxxx.history. These
    files seem to be gone (update?). The history still exists, so where is it
    stored if not in /tmp/konsole-xxxxx.history?

I would never even have thought of looking in /tmp as that is often set to be erased when shutting down the computer. Also storing something system wide which should be user-specific makes little sense.

How about looking where it logically should be, namely ~/.bash-history ?

Seems to be a conflation with the user-input shell history and the scrollback history of the terminal going on here.

I think original request was for the scrollback history.  Here's how to get that info...

(ins)sdowdy@carrotcake$ pstree -Alpsa $$
systemd,1
  `-konsole,23071 --separate
      `-bash,5456
          `-pstree,6513 -Alpsa 5456

so, our parenting konsole for this shell is PID 23071, check the open files with 'lsof'...

(ins)sdowdy@carrotcake$ lsof -p 23071 | awk '$NF~/konsole.*\.history$/{print $NF}'
/run/user/7771/konsole-k23071.history
/run/user/7771/konsole-G23071.history
/run/user/7771/konsole-C23071.history
/run/user/7771/konsole-s23071.history
...

If i go into the Settings:

   Settings->Edit Current Profile->[Scrolling]->  switch from "unlimited scrollback" to "No scrollback"

then check again:

(ins)sdowdy@carrotcake$ lsof -p 23071 | awk '$NF~/konsole.*\.history$/{print $NF}'
(ins)sdowdy@carrotcake$

as expected (no more scrollback history files).

Note that this directory is ${XDG_RUNTIME_DIR} (part of FreeDesktop aka XDG) which is where applications are supposed to keep their runtime non-persistent data.
It defaults to (on my system)  /run/user/{uid} (user id)

now, the bigger question...   these generally aren't user-serviceable parts, so what exactly do you need to do with them?

--stephen



[Index of Archives]     [Trinity (TDE) Desktop Users]     [Fedora KDE]     [Fedora Desktop]     [Linux Kernel]     [Gimp]     [GIMP for Windows]     [Gnome]     [Yosemite Hiking]
  Powered by Linux