by Daniel MeiB-Wilhelm (leiche)
This is a YAD script I wrote to log in automatically to an account or website/homepage.
My homepage was not available, because I forgot to login into my account. As I get older, time goes by faster, and I forget to do some things. So I wrote a little bash script that will remind me to login or open my homepage. Instructions on writing a bash script can be found in our magazine. For example, check out this article.
What is needed?
YAD for the dialog, Firefox and nothing more.
My bash script is as follows:
What does it do?
First, we need a directory to store the timepoint to enter our homepage. That is why I created a folder named /.homepagelogin. You can name it whatever you like. I set it as a hidden folder under my home directory.
Now we need a if then else fi function, and a function to compare the time to login to my homepage. A window starts with the information that the time isn't right now to login.
If the time is right, Firefox will open my website and log me in (hopefully). After we close Firefox, we can set a new time for a future login.
The first start opens Firefox with your desired site, that you set in line 12 after the command "firefox".
And last, I created a desktop file and stored it under ~/.config/autostart.
I saved the desktop file as timer.desktop, and the bash file as timer.sh. You can name it however you like. But don't forget to make timer.sh executable.
If you like it, or have a better idea to login to a website after a certain time, please let me know it.