This post here served as a guide at my attempt to force the gedit Text Editor to open a specific file each time I startup my computer. Here are the steps I took:
- Create a sample directory and sample text file via
mkdir ~/sample && touch ~/sample/sample.txt
. - Add the gedit Text Editor to my startup applications via the GNOME Tweak Tool.
- Modify the gedit startup command via Startup Applications Preferences. Change the startup command from
gedit %U
togedit ~/sample/sample.txt
. I also eventually triedgedit "~/sample/sample.txt"
, which didn't work. - Save, Close, Restart
Upon reboot, gedit Text Editor is automatically launched, but the file opened is "Untitled Document 1". Why isn't gedit opening "~/sample/sample.txt" as I commanded it to? As a test I issued the gedit ~/sample/sample.txt
command into GNOME Terminal and it did open "sample.txt" in gedit, as you'd expect.
What's wrong with my process described above? Why isn't "sample.txt" loading upon each restart of my computer, instead of "Untitled Document 1".
~
home shortcut? e.g.gedit /home/whatever/sample/sample.txt
sleep 60 && gedit /home/jophuh/sample/sample.txt
in the Startup Applications Preferences program for a one minute delay? Is that what you meant?sleep 5
, unless you want to wait a minute.