⬆️ ⬇️

Sync open tabs via Dropbox

There are many Extensions / Additions image or solutions that are already embedded in the browser, allowing you to synchronize bookmarks, passwords, autocomplete, etc.

But, using this or that browser both at home and at work, often you have to perform several actions in order image to open working tabs from a remote computer (for example, using Xmarks).

In this article I will describe how to automate the synchronization of open tabs with other computers via Dropbox. If you still haven't got an account, I advise you .



So let's get started. All methods will be described for Windows 7 and Linux. Based on a simple copy of the session file.

First we need to set a variable for the Dropbox directory:



Windows
Command line

SET DROPBOX="%USERPROFILE%\Desktop\Dropbox"



Linux
 export DROPBOX="~/Desktop/Dropbox" 


Google chrome



Windows


copy "%DROPBOX%\Configs\Current Session" "%LOCALAPPDATA%\Google\Chrome\User Data\Default\Current Session"

"%LOCALAPPDATA%\Google\Chrome\Application\chrome.exe"

copy "%LOCALAPPDATA%\Google\Chrome\User Data\Default\Current Session" "%DROPBOX%\Configs\Current Session"




Linux
 #!/bin/bash cp -f $DROPBOX/Configs/Current\ Session ~/.config/google-chrome/Default/Current\ Session /opt/google/chrome/google-chrome %U cp -f ~/.config/google-chrome/Default/Current\ Session $DROPBOX/Configs/Current\ Session 


Firefox



Windows


copy "%DROPBOX%\Configs\sessionstore.js" "%APPDATA%\Mozilla\Firefox\Profiles\*default\sessionstore.js"

"%ProgramFiles%\Firefox\firefox.exe"

copy "%APPDATA%\Mozilla\Firefox\Profiles\*default\sessionstore.js" "%DROPBOX%\Configs\sessionstore.js"




Linux
 #!/bin/bash cp -f ~$DROPBOX/Configs/sessionstore.js ~/.mozilla/firefox/*default/sessionstore.js firefox cp -f ~/.mozilla/firefox/*default/sessionstore.js $DROPBOX/Configs/sessionstore.js 


Opera



Windows


copy "%DROPBOX%\Configs\autosave.win" "%APPDATA%\Opera\Opera\sessions\autosave.win"

"%ProgramFiles%\Opera\opera.exe"

copy "%APPDATA%\Opera\Opera\sessions\autosave.win" "%DROPBOX%\Configs\autosave.win"




Linux
 #!/bin/bash cp -f ~$DROPBOX/Configs/autosave.win ~/.opera/sessions/autosave.win opera cp -f ~/.opera/sessions/autosave.win ~$DROPBOX/Configs/autosave.win 




Conclusion


For Linux, it is enough to set the right to run the script, and in the browser shortcut specify the path to the script.

For Windows, the value “Minimized to icon” is also specified for the shortcut to the Bat file.

image

If you want to find fault with the minimized command window, then use the Advanced BAT to EXE Converter utility, which should be set to “Invisible application”

image

Archive with files


')

Source: https://habr.com/ru/post/116708/



All Articles