mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #3570] No history, bookmarks etc. preserved in lynx browser #2239
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#2239
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Rosika2 on GitHub (Aug 5, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3570
Environment
Hi altogether,
I´ve got a question concerning the use of lynx (terminal-browser) and firejail with the private option.
Wanting to use firejail with a defined work directory I use the command
It works well but when shutting down lynx no search history, bookmarks or cookies are preserved.
I know that´s the case with "--private" alone but I added a work-directory. So theoretically those items should be saved I guess.
Besides in the kgw2-folder only two items are created: .Xauthority and .bashrc.
As a second step I used the command
to see if there´s any difference.
In my private folder there´s one additional entry: besides .Xauthority and .bashrc there´s a folder called .config.
In it there are the folders pulse and fish. Pulse is empty and fish just contains the file "fishd.rosika-Lenovo-H520e".
So no lynx history, bookmarks or config-file either.
What am I doing wrong here? Could you help me in some way?
Thanks a lot in advance.
Greetings.
Rosika
@bbhtt commented on GitHub (Aug 5, 2020):
What do you want to do? Retain changes when it is run inside the private directory after closing or use your current configuration inside private-directory or both?
@Rosika2 commented on GitHub (Aug 5, 2020):
@kortewegdevries:
Hi and thank you for your reply.
Yes. That´s basically what I want to achieve.
When running my main browser "chromium-browser" I use this command:
firejail --private=/home/rosika/Dokumente/work chromium-browserand all my bookmarks, history etc. are preserved.
I assumed this should work with lynx as well.
Greetings.
Rosika
@rusty-snake commented on GitHub (Aug 5, 2020):
It should work as well with lynx. I have absolutely no idea what causes this. @Rosika2 can you run
firejail --noprofile --private=/home/rosika/CLEAN/PRIVATE/DIR lynxto see where they are stored (in the hope that this stores it).@bbhtt commented on GitHub (Aug 6, 2020):
This is working for me. I'm using
firejail --private=/home/korte/TempDir /usr/bin/lynx wikipedia.comLynx saves all bookmarks inlynx_bookmarks.html,.lynxrcand it stays there.@Rosika2 commented on GitHub (Aug 6, 2020):
@rusty-snake and @kortewegdevries:
Hi again and thanks a lot for your answers,
alas none of your suggestions work for me.
I tried both of you solution commands and in both cases I get exactly the same results as before:
Those files and folders are created:
After closing lynx all bookmarks are lost.
Very strange.
Greetings.
Rosika
@bbhtt commented on GitHub (Aug 6, 2020):
Are you using a different shell other than bash? Is the bookmark file being created?
@Rosika2 commented on GitHub (Aug 6, 2020):
Hi again,
yes, I use fish as my default shell.
But I tried the commands in bash as well. The results are the same.
No idea if it helps at all but I also noticed something else which seems a bit off:
Using the command
firejail --noprofile --private=/home/rosika/CLEAN/PRIVATE/DIR lynx -dump "https://itsfoss.community/t/most-recent-grub2-updates-rendering-some-systems-unbootable/5146/3" > ziel.txtthe resulting text-file DOESN´T appear in /home/rosika/CLEAN/PRIVATE/DIR .
However I found it in /home/rosika !!!!!!!!
@Rosika2 commented on GitHub (Aug 6, 2020):
New info:
I just ran lynx outside firejail, just as a normal command.
It turns out that lynx doesn´t save bookmarks that way either. So it seems it´s a lynx issue.
Never would have thought that.
Curious though that @kortewegdevries says:
"This is working for me. I'm usingfirejail --private=/home/korte/TempDir /usr/bin/lynx wikipedia.com Lynx saves all bookmarks in lynx_bookmarks.html,.lynxrc and it stays there."
@kortewegdevries:
How do you do it? Do you use any special settings?
@Rosika2 commented on GitHub (Aug 6, 2020):
Hi,
my previous comment:
was a bit unqualified I think and seems to be rooted in a misconception on my part. Sorry.
It´s clear that the text-file should be saved in my home directory as I started the command from there.
But I noticed the following:
Using my locate-command I couldn´t find lynx_bookmarks.html or .lynxrc files anywhere on my system. They simply don´t seem to exist.
@rusty-snake commented on GitHub (Aug 6, 2020):
Is the history disabled in
/etc/lynxrc?@bbhtt commented on GitHub (Aug 6, 2020):
I forgot, open a link press "A">"L" save?
Supposed to be in
/home/<>/.lynxrcor you meanlynx.cfg?@Rosika2 commented on GitHub (Aug 6, 2020):
@rusty-snake and @kortewegdevries:
Sorry, I haven´t got a lynxrc file in /etc.
I have the following:
@bbhtt commented on GitHub (Aug 6, 2020):
My file if you need it: lynx_bookmarks.html https://termbin.com/9k7s
Did this work?
@Rosika2 commented on GitHub (Aug 6, 2020):
@kortewegdevries:
Sorry, I have to ask further.
What exactly do you mean, what should I do?
@bbhtt commented on GitHub (Aug 6, 2020):
To save a bookmark open a link on lynx press "A" the press "d" or "L" or "c" then enter? That's how I'm saving it and "enter" creates that file? https://imgur.com/DP83gTj
@Rosika2 commented on GitHub (Aug 6, 2020):
@kortewegdevries:
Thanks.
I´m not so sure about the bookmarks but I think the reason why the history isn´t saved is that it´s transferred to /tmp.
Lynx says:
And when I take a look in /tmp I find it:
Here is my history. I looked it up and every site I visited is stored in L5-4811TMP.html.
But as it is in /tmp it´s not available next time I use lynx of course.
@bbhtt commented on GitHub (Aug 6, 2020):
So bookmarks get saved?
No idea, I don't use lynx sorry. But
man firejailsaysSo
/tmpstays out of your temporary home directory.@Rosika2 commented on GitHub (Aug 6, 2020):
Hi,
Didn´t manage to save any bookmarks.
Perhaps I´m doing it wrong, despite your instructions. Yet I´ll keep trying and report back.
Thanks.
@Rosika2 commented on GitHub (Aug 6, 2020):
O.K. I tried again and lynx says something like "setting bookmarks [...etc] not possible".
I really think all the problems might be rooted within lynx itself as running lynx outside the sandbox doesn´t preserve history either.
@bbhtt commented on GitHub (Aug 6, 2020):
Can you like set it without firejail or with --noprofile? Press "A" then "L" then Enter.
@Rosika2 commented on GitHub (Aug 6, 2020):
Well I´ve been using --noprofile all along:
firejail --noprofile --private=/home/rosika/CLEAN/PRIVATE/DIR lynxAnd lynx explictely says that setting bookmarks isn´t possible.
@bbhtt commented on GitHub (Aug 6, 2020):
No idea, you can have my configs:
Local configs are likely stored in
.lynxrcI think, but I don't have it.@Rosika2 commented on GitHub (Aug 6, 2020):
@kortewegdevries:
Thank you so much. I´ll look into it.
Strange:
I could create bookmarks now!
And a lynx_bookmarks.html file is created in the private directory. That´s working now.
But: when shutting down lynx and then re-starting it lynx doesn´t find lynx_bookmarks.html despite the fact it´s there.
I suppose it loooks somewhere else for that file.
@bbhtt commented on GitHub (Aug 6, 2020):
This issue is too weird! I can read the bookmarks even when restarting under firejail+private: https://imgur.com/BwpEckT
About history I don't know where they are saved but if it's in
/tmplike you say maybe you can set up a temporary temp directory. About cookies, same as above. About local settings maybe try and copy.lynxrcto your temporary home so that lynx can read it,@Rosika2 commented on GitHub (Aug 7, 2020):
@kortewegdevries:
Yes, you´re right. Never mind. Thanks a lot anyway for your help.
Oh, believe it or not, I´ve just managed to save bookmarks.
Out of sheer desperation I tried the following:
Consdering it a bit curious that lynx puts its bookmarks file under
/home/rosika/CLEAN/PRIVATE/DIR/instead of.configI transferred the bookmark file to/home/rosika/CLEAN/PRIVATE/DIR/.configand changed the respective bookmarks path within lynx (pressing "o") to that path.And now it works.
BTW:my command is:
env LANG=en_GB:en firejail --noprofile --private=/home/rosika/CLEAN/PRIVATE/DIR /usr/bin/lynxThe env LANG part is just for the sake of getting the English language variant.
So bookmarks are working now. Yet ´ve still to figure out how I can get history to be saved as well.
Greetings.
Rosika
@Rosika2 commented on GitHub (Aug 7, 2020):
Hi again,
I almost solved the problem of how to save history.
I created a file
/home/rosika/CLEAN/PRIVATE/DIR/.config/.lynx_session/and within lynx:typing "o" and then under "Special Files and Screens" entered the respective path in "Session file".
Plus: turning "Auto Session" on.
That would work! The history is stored in lynx_session.
BUT: Auto Session (!) and Session file (!) have exclamation marks which means: "(options marked with (!) will not be saved)".
I.e.: when starting lynx anew the lynx_session file is still there but it is NOT accessed.
Any ideas how to make the changes in settings persist?
Greetings.
Rosika
@bbhtt commented on GitHub (Aug 7, 2020):
Lynx has this, maybe try:
I'll check on the history.
You can always subscribe and send an email to their mailing list for any queries: https://lists.nongnu.org/mailman/listinfo/lynx-dev. So as I understand the cookie file,history, local config file must be inside your private directory to retain them. If that doesn't work for some reason firejail has a
--getoption to retrieve files from a temporary directory I think:(The bug tag should be removed.)
@Rosika2 commented on GitHub (Aug 8, 2020):
@kortewegdevries:
Hello again and thank you so much for your help. You´re a genius.
SUCCESS!!
It finally worked.
This put me on the right track.
I looked up the "session"-entries in the man-pages and found this:
"−session=FILENAME
resumes from specified file on startup and saves session to that file on exit."
So I put the .lynx_session file into
/home/rosika/CLEAN/PRIVATE/DIR/and started lynx with the commandenv LANG=en_GB:en firejail --name=mysandbox --private=/home/rosika/CLEAN/PRIVATE/DIR lynx -session=.lynx_sessionThat way the .lynx_session file is read every time lynx starts and updated every time lynx is shut down.
Wonderful!
Now history is saved and bookmarks can be created as well.
Plus: everything works now as it´s supposed to with firejail (using the --private option with defined work-directory).
I´m so glad and thankful for your persistent help.
Thanks for not giving up on me. :)
Many greetings.
Rosika
P.S.:
I looked everywhere but couldn´t find a way to do this.
@rusty-snake commented on GitHub (Sep 1, 2020):
Can we close?
@Rosika2 commented on GitHub (Sep 1, 2020):
@rusty-snake:
Yes, I seem to have forgotten to close. Sorry.
Thanks @all for your kind help. It´s much appreciated.
Greetings.
Rosika