My Goal
I'd like to automatically open a text file in Kwrite, after logging into KDE. (The text file contains a list of tasks I want to preform each day.)
My Attempt
(Note: I changed my real username to "username" above, for privacy reasons)
My Problem
My Questions
Thanks for reading.
I'd like to automatically open a text file in Kwrite, after logging into KDE. (The text file contains a list of tasks I want to preform each day.)
My Attempt
- I checked online and learned that I could write a simple Bash shell script to open a text file on login.
- I followed some instructions and created the following shell script.
- I named the Bash shell script as "task_test.sh"
- I opened the KDE "Autostart" program, clicked on "Add Script", chose the "task_test.sh" file and clicked "OK"
Code:
#!/bin/bash xdg-open "/home/username/tasks.txt"
My Problem
- I logged in and out of KDE and saw Kwrite loading in the KDE "Task Manager" Plasmoid in my KDE Plasma Panel.
- Eventually I noticed that the usual KDE applications weren't loading. (ex: Kmix, KDE Network Manager, etc)
- After some time passed, I realized that KDE had frozen.
- I used the keyboard combination of [Ctrl] + [Shift] + [F1] to switch into a BusyBox terminal.
- I used the "Nano" text editor to remove the "task_test.sh" file from ~/.kde/Autostart
- When I logged in and out, KDE was able to start normally, without freezing.
- I again tried logging in and out of KDE and saw no problems loading KDE.
- I used the KDE Autostart program again, to try and add the same script.
- After I logged in and out of KDE, the freezing problem reappeared.
- I had to remove the "task_test.sh" file from ~/.kde/Autostart again, to stop KDE from freezing on login.
My Questions
- Why would my simple Bash script cause KDE to freeze?
- Did I make a typo somewhere in the Bash script?
- Is there a better way to automatically open a text file in Kwrite, after login?
Thanks for reading.
Comment