Skip to content

[Feature Request] Get the opened file path and application name along side class, id and pid  #13

@blueray453

Description

@blueray453

I am trying to find a better solution for https://unix.stackexchange.com/a/745519/206574

As you can see in that post: in the log file I have to enter id pid and path.

For Example,

81788964 76172 file:///home/ismail/Desktop/LibreOffice%20Writer%202.odt
92274695 77296 /media/ismail/SSDWorking/book-collection/_Books/kids/How to Be a Superhero Called Self-Control Super Powers to Help Younger Children to Regulate their Emotions and Senses (Lauren Brukner).epub

From the extension I can get id and pid. But path of the file and the application name is something i could not get.

I ran dbus-monitor --session > gnome-extension-log.txt to check whether I could get the path, and the file is attached here.

There I found lines like:

signal time=1684110883.068173 sender=:1.494 -> destination=(null destination) serial=22 path=/org/gtk/gio/DesktopAppInfo; interface=org.gtk.gio.DesktopAppInfo; member=Launched
   array of bytes "/usr/share/applications/org.gnome.Evince.desktop" + \0
   string ""
   int64 77268
   array [
      string "file:///media/ismail/SSDWorking/book-collection/_Books/kids/Riddles%20For%20Kids%20-%20Over%20300%20Riddles%20and%20Jokes%20for%20Children%20(M.%20Prefontaine)%20.pdf"
   ]

signal time=1684110909.105890 sender=:1.494 -> destination=(null destination) serial=26 path=/org/gtk/gio/DesktopAppInfo; interface=org.gtk.gio.DesktopAppInfo; member=Launched
   array of bytes "/home/ismail/.local/share/applications/mpv.desktop" + \0
   string ""
   int64 77424
   array [
      string "file:///media/ismail/8TBRaid0/_Agile/Agile%20Foundations/Understanding%20Agile.mp4"
   ]

signal time=1684110889.243135 sender=:1.494 -> destination=(null destination) serial=23 path=/org/gtk/gio/DesktopAppInfo; interface=org.gtk.gio.DesktopAppInfo; member=Launched
   array of bytes "/home/ismail/.local/share/applications/com.github.johnfactotum.Foliate.desktop" + \0
   string ""
   int64 77294
   array [
      string "file:///media/ismail/SSDWorking/book-collection/_Books/kids/How%20to%20Be%20a%20Superhero%20Called%20Self-Control%20Super%20Powers%20to%20Help%20Younger%20Children%20to%20Regulate%20their%20Emotions%20and%20Senses%20(Lauren%20Brukner).epub"
   ]

So, the file path (for example, string "file:///media/ismail/SSDWorking/book-collection/_Books/kids/How%20to%20Be%20a%20Superhero%20Called%20Self-Control%20Super%20Powers%20to%20Help%20Younger%20Children%20to%20Regulate%20their%20Emotions%20and%20Senses%20(Lauren%20Brukner).epub") and application name (For example array of bytes "/usr/share/applications/org.gnome.Evince.desktop") can be found.

Now I am looking at

https://gjs-docs.gnome.org/gio20~2.0/gio.desktopappinfo
https://gjs-docs.gnome.org/gio20~2.0-desktopappinfo/

If somehow you could add the file path and application name then it would be of great help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions