Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

firefox URL abfragen?

0 views
Skip to first unread message

Ulli Horlacher

unread,
Feb 28, 2023, 8:48:36 AM2/28/23
to
(Wie) kann man die URL abfragen, die im aktuellen firefox tab steht?
Also das, was der User grad sieht.
Dabei wuerde es reichen, wenn die danach im X11 clipboard steht.
Da draus kann ich sie mit clip abfragen.

Manuell gehts so:
mit rechter Maustaste ins Adressfeld klicken, dann [c] tippen.

Ich will/muss das aber von einem externen Skript aus machen.


--
Ullrich Horlacher Server und Virtualisierung
Rechenzentrum TIK
Universitaet Stuttgart E-Mail: horl...@tik.uni-stuttgart.de
Allmandring 30a Tel: ++49-711-68565868
70569 Stuttgart (Germany) WWW: http://www.tik.uni-stuttgart.de/

Ulli Horlacher

unread,
Feb 28, 2023, 9:24:17 AM2/28/23
to
Ulli Horlacher <fram...@rus.uni-stuttgart.de> wrote:
> (Wie) kann man die URL abfragen, die im aktuellen firefox tab steht?

Habs selber rausgekriegt :-)

xdotool key ctrl+l key ctrl+c key Escape
xclip -o -selection clipboard

Leah Neukirchen

unread,
Mar 10, 2023, 8:49:52 AM3/10/23
to
Ulli Horlacher <fram...@rus.uni-stuttgart.de> writes:

> (Wie) kann man die URL abfragen, die im aktuellen firefox tab steht?

https://leahneukirchen.org/dotfiles/bin/curtab

lz4jsoncat ~/.mozilla/firefox/*.default/sessionstore-backups/recovery.jsonlz4 |
jq -r '.windows[.selectedWindow-1] |
.tabs[.selected-1] |
.entries[.index-1].url'

--
Leah Neukirchen <le...@vuxu.org> https://leahneukirchen.org/

Ulli Horlacher

unread,
Mar 11, 2023, 3:01:16 AM3/11/23
to
Leah Neukirchen <le...@vuxu.org> wrote:
> Ulli Horlacher <fram...@rus.uni-stuttgart.de> writes:
>
>> (Wie) kann man die URL abfragen, die im aktuellen firefox tab steht?
>
> https://leahneukirchen.org/dotfiles/bin/curtab
>
> lz4jsoncat ~/.mozilla/firefox/*.default/sessionstore-backups/recovery.jsonlz4 |
> jq -r '.windows[.selectedWindow-1] |
> .tabs[.selected-1] |
> .entries[.index-1].url'

Was ist lz4jsoncat?


--
Ullrich Horlacher Server und Virtualisierung
Rechenzentrum TIK
Universitaet Stuttgart E-Mail: horl...@tik.uni-stuttgart.de
Allmandring 30a Tel: ++49-711-68565868
70569 Stuttgart (Germany) WWW: https://www.tik.uni-stuttgart.de/

Tim Landscheidt

unread,
Mar 11, 2023, 7:32:07 AM3/11/23
to
Ulli Horlacher <fram...@rus.uni-stuttgart.de> wrote:

>>> (Wie) kann man die URL abfragen, die im aktuellen firefox tab steht?

>> https://leahneukirchen.org/dotfiles/bin/curtab

>> lz4jsoncat ~/.mozilla/firefox/*.default/sessionstore-backups/recovery.jsonlz4 |
>> jq -r '.windows[.selectedWindow-1] |
>> .tabs[.selected-1] |
>> .entries[.index-1].url'

> Was ist lz4jsoncat?

Die wichtigere Frage wäre, warum kann Mozilla kein stinknor-
males LZ4 (oder irgendetwas anderes) verwenden, sondern muss
sich unbedingt sein eigenes Format basteln? *argl* (Das
reiht sich ein in die Frage, warum Mozilla SQLite-Datenban-
ken gegen Lesezugriff locken muss.)

Tim

Jens Schüßler

unread,
Mar 11, 2023, 3:40:04 PM3/11/23
to
* Ulli Horlacher <fram...@rus.uni-stuttgart.de> [11-03-23 08:01]:
> Leah Neukirchen <le...@vuxu.org> wrote:
>> Ulli Horlacher <fram...@rus.uni-stuttgart.de> writes:
>>
>>> (Wie) kann man die URL abfragen, die im aktuellen firefox tab steht?
>>
>> https://leahneukirchen.org/dotfiles/bin/curtab
>>
>> lz4jsoncat ~/.mozilla/firefox/*.default/sessionstore-backups/recovery.jsonlz4 |
>> jq -r '.windows[.selectedWindow-1] |
>> .tabs[.selected-1] |
>> .entries[.index-1].url'
>
> Was ist lz4jsoncat?

LMGTFY
:~$ aptitude show lz4json
Package: lz4json
Version: 2-1
State: installed
Automatically installed: no
Priority: optional
Section: web
Maintainer: Adam Borowski <kilo...@angband.pl>
Architecture: amd64
Uncompressed Size: 26,6 k
Depends: libc6 (>= 2.4), liblz4-1 (>= 0.0~r113)
Conflicts: lz4json:i386
Description: unpack lz4json files, usually generated by Mozilla programs
Instead of a standard .json.lz4, Firefox uses its own format to compress its bookmarks and session restore files.
This tool lets you read them, converting to json. Going from json to a human-readable format is then up to you.
Homepage: https://github.com/andikleen/lz4json


0 new messages