Solved Restore last session
-
@chorn I've had the same problem and I reached the same place that you seemed to (having seemingly successfully converted the 'Last Tabs' file and put it in the 'session storage' folder) and am also still unable to open them in Vivaldi.
You say that using that PHP script was able to solve your issue but could you elaborate on how to use it? I've downloaded PHP and am able to successfully execute the program after copying it into a php document and using the command you gave, but how do I direct the program to the 'LAST_TABS' file? i.e. where do I select the file I want to convert to bookmarks?
EDIT: Okay, I realised where I need to put the 'LAST_TABS.log' file (I just replaced the 'current_session.log' part with it. But now I've run into a second issue which is that, despite the .log file having hundreds of tabs (as verified by the hundreds of URLs in its text), the html document the PHP script produces only has one of the tabs, rather than all of them as desired.
Nevertheless, I've been able to solve my problem and open all the tabs by running the LAST_TABS.log file through this program I quickly put together (note that I'm well aware it's crap, but it worked for me and it was quick and easy to write):
lines=open("LAST_TABS.log").read().split("\n") #Change the "LAST_TABS.log" to whichever file you want to input n=0 a=[] while n<len(lines): if "SelectedNavigationInTab" in lines[n]: a.append(n-1) n+=1 for n in range(len(a)-1,-1,-1): a[n]=lines[a[n]] lines="\n".join(a) lines=lines.split("\n") for i in range(0,5): n=0 while n<len(lines): try: b=lines[n].index("http") lines[n]=lines[n][b:] except: lines.append(lines[n]) del lines[n] n+=1 lines="\n".join(lines) open("LAST_TABS.log",'w').write(lines) #Change the "LAST_TABS.log" to whichever file you want to output it to
This should turn it into a text file with all the URLs by themselves and the home pages, options tabs and files from your computer at the bottom. It also gets rid of all the history tabs (for if you were to click the back button) and just keeps the one that you would have had open at the time. Then you can just copy and paste the URLs into an online tab opener tool to open them en masse (rather than clicking on one at a time). This is a pretty crap way of doing it as it's still pretty slow, my program is a chucked together mess that may not work for all cases (I've only tried it on mine), you lose a bit of the information like your history and the tab stacks etc, and it's all round just a pretty crap method but it worked for me so if your trying to get all your tabs back and all else fails, this might possibly work for you... maybe.
-
Is it really no easy way to recover session? In the past I just replacing Current Session/ Current Tabs with Last ones and everything worked fine... until now. And in the window side menu I see only one closed window which I do not need. So I dig into that php shit and eventually got these session.log and tabs.log which obviously not worked wherever I put them.
Now I opened that session.log in text editor and searching for needful URLs and opening them by hand in browser.
update. There is a small extension Open Multiple URLs which can extract urls from copypasted text and it fits perfectly for this task (except for tabs history lines which have to be removed manually leaving only last url).
-
It's ridiculous to still have this problem in a v3 software with 4 years of releases behind it, beyond the Chromium heritage.
Ridiculous that I have to remind myself every now and then to File\Save Open Tabs as Session, manually type the current date, manually prune the collection of old backup sessions. (Or get an extension to do that.)It's the software's job to do all that, especially when it's so simple to do and basic. It's a core feature, it should just work.
It's also annoying that it uses cryptic binary formats instead of plain text. Makes it difficult to manually extract the URLs from "Last Tabs".
-
@Gwen-Dragon I have no idea how Python works, and it is a little ridiculous that I have to do something this technical just to unlock a previous session. I put in the commands as you did, correcting the paths as needed, and all it did was tell me that I had a syntax error.
"File "[path to chromagnonSession.py", line 38 print command ^" and then "SyntaxError: Missing parentheses in call to 'print'. Did you mean print(command)?"
Like I said, I've never used python, I just want to restore my mom's enormous session from her old hard drive, it had like 100 tabs in it.
-
@somnomania Sounds like the script might be written for Python 2 but you have Python 3 installed.
-
@Gwen-Dragon Nevermind, @Komposten had it right, I installed Python 2 and it worked just fine. The files didn't have my mom's session in them, unfortunately, but at least I got the commands to work.
-
You must save the Last Session file (before closing the browser) and then rename it to Current Session. Then you simply have to replace the Current Session file in the Default folder with the new renamed Current Session file (formerly Last Session file).
-
Hello. I followed all the steps above however I am having some issues with getting the tool to extract the Session file URLs. It works fine with the Tabs file and extracts the URLs to the log, however when I try to get the URLs from the Session file, it is giving me an error telling me that the file is corrupt. The file is about 25mb. Is there anyway to get the data from the Session file? Please let me know. Thank you.
-
Here's an alternative version that takes into account multiple windows in the output file, supports both "Session" and "Tabs" files with any kind of URI (not only http), uses an argument for the input file and writes to a corresponding output file directly, and with a line to uncomment when the log file was created from Chromagnon using PowerShell instead of cmd:
-
Why can't we just have a 'Restore last session' button? This is nuts!
-
@biggly Because, at this stage of development, Vivaldi does not automatically back up sessions. Aside from the "startup with last session" setting, they are only saved if you consciously save them. Then you do have a button to open them.
-
@ayespy Actuallu I didn't realize before you could save like that, so have done so now
Cheers!
-
@nebu said in Restore last session:
- Download the Chromagnon tool, unzip & put the Last session/tab files into it
like, uh, download ? there isn't any 'download' button, file, etc
download what ?
unzip ? i'm looking for a zip file, and there isn't a zip file
like, uh, what am i suppose to download
-
@hmazuji Click on the green button that says "Code" and it will give you an option to "Download ZIP".
(I'm pretty sure that button used to have a more descriptive name...)
-
There is a half-way method to get one's disapeared tabs, which works sometimes.
When you closed your windows with all your tabs and you see that there is still a window with one or few tabs that you don't care. You unplug your computer and take out your battery. Then your system session is killed and what you did with your browser has not been registered. The next time that you start your computer and your browser. This one will open as it was the last you closed it normally. -
@hmazuji
this python script isn't the way
the scenario is that you have a session with 50 tabs, and you want to watch netflix on your other monitor, so you move that tab to a 'new window'. without thinking, you close the 50 tabs first, then close vivaldi with netflix on it
so when you open vivaldi, only the netflix tab will repopulate. to retrieve your 50 tab session:
on the vivalidi window, the four buttons on the top right are (from left to right): exit, restore, minimize, show closed tabs
the 'show closed tabs' icon looks like a trash can
it tell you to ctrl click to restore your 'last closed tab', but it will actually open your previous 50 sessions
or, click on the trashcan looking icon, then select from the list
" windows with 'n' tabs " -
Whenever I've inadvertently closed a densely tab-populated window and see that it's not showing up in the 'trash can', I create a new dummy window, add a few tabs to it, then close it. There's a good chance the trash can will now have the window that was closed by mistake.
This has worked for me numerous times but it's a crap-shoot. I now try to regularly save important windows as a session to be safe and that's a pain.
-
@ern said in Restore last session:
I create a new dummy window, add a few tabs to it, then close it.
That would save some time, but restarting is more reliable if you have Vivaldi to start from last session.
-
Ppafflick marked this topic as a question on
-
Ppafflick has marked this topic as solved on
-
Ppafflick moved this topic from Vivaldi for Windows on