-   Linux - General (
-   -   Run user command on Terminal startup (

coolfrog 09-25-2004 03:10 AM

Run user command on Terminal startup
I want to automatically 'cd' into a particular drive whenever i start terminal. How do i get this done ? Do i have to do scripting ?

Boffy 09-25-2004 04:35 AM

If you are using KDE then create a script called "" - or whatever you want really ending in .sh. Then put the following lines in:

konsole --workdir /home/

Replace /home/ with the directory you want to go to.

Change the permissions of the file (right click and go to properties) to make it executable.

Then whenever you click on that you will open the konsole to that directory.


coolfrog 09-25-2004 07:00 AM

Thanx. You've made my life much easier.

coolfrog 09-26-2004 01:28 AM

What should i do if i use Gnome ?

Boffy 09-26-2004 09:08 AM

Well as long as you have KDE on the machine it will work fine as it is.
If not try:

gnome-terminal --working-directory=DIRNAME

Good Luck


All times are GMT -5. The time now is 01:32 PM.