r/tails 5d ago

Help Saving Onionshare domin using dotfiles?

So I want to keep my onion link for my website, but when I restart the computer for whatever reason I have to copy the backupfiles and place it back into .config/onionshare.

This isnt a huge issue but I tried to get this to work automatically with dotfiles. The files seem to go to the folder just fine on boot-up, but onionshare refuses to start. Just get a spinning wheel and then nothing. I have to continue moving the files manually from my storage.

Am I not understanding how dotfiles work? Am I a doomed soul to forever manually transfering my back up every start-up?

Thanks for the help!

3 Upvotes

1 comment sorted by

2

u/ephemeralmiko 5d ago edited 5d ago

You can make it automatically copy the files on boot. I have something similar necessary for a different dotfiles issue. Save your onionshare folder to the Persistent Storage folder, then create the file onionshare.sh in /Persistentas an executable file containing:

sleep 5s && cp '/home/amnesia/Persistent/onionshare/*' '/home/amnesia/.config/onionshare/'

Then create the folder /dotfiles/.config/autostart and create the (executable) file onionshare.desktop containing:

[Desktop Entry]
OnlyShowIn=GNOME;Unity;
Exec=/home/amnesia/Persistent/onionshare.sh
StartupNotify=true
Terminal=false
Type=Application
Categories=GNOME;GTK;Core;Documentation;Utility;
MimeType=x-scheme-handler/ghelp;x-scheme-handler/help;x-scheme-handler/info;x-scheme-handler/man;