ændrük Asked: 2010-12-28 21:11:44 +0800 CST2010-12-28 21:11:44 +0800 CST 2010-12-28 21:11:44 +0800 CST How can I make a command run once the next time I log in? 772 How can I schedule a command to run the next time I log in? I don't want it to run every time, just once. autostart login scheduled 3 Answers Voted Best Answer Vojtech Trefny 2010-12-29T00:02:08+08:002010-12-29T00:02:08+08:00 This is really "ugly" solution, but you can add classic logon/startup script and after first run remove this script automatically. #!/bin/bash your command & rm /path/to/script/yourscript.sh The script will be removed, so it can't be started again. (I'm sure there's a bettter solution, but I don't know it.) narkisr 2010-12-29T00:16:26+08:002010-12-29T00:16:26+08:00 running a script has couple of options How to run scripts on start up? I would try .gnomerc one, you can make it one time by making your script remove itself from .gnomerc once its done. Scaine 2010-12-29T01:22:59+08:002010-12-29T01:22:59+08:00 This is already covered on this very site : How to run scripts on start up? The second answer down seems to be the cleanest solution.
This is really "ugly" solution, but you can add classic logon/startup script and after first run remove this script automatically.
The script will be removed, so it can't be started again.
(I'm sure there's a bettter solution, but I don't know it.)
running a script has couple of options How to run scripts on start up?
I would try .gnomerc one, you can make it one time by making your script remove itself from .gnomerc once its done.
This is already covered on this very site : How to run scripts on start up?
The second answer down seems to be the cleanest solution.