Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-02-2013, 06:37 AM   #1
Registered: Mar 2013
Location: Yangon, Myanmar.
Distribution: Fedora, Arch
Posts: 171

Rep: Reputation: Disabled
Can I set terminals' default directory to each different ones?

I have 3 terminals on my Debian wheezy.
they are Gnome Terminal, Terminator and Guake.

Can I set their default directory to each different ones.
I want to set Gnome Terminal's default directory to ~/Desktop ,
Terminator default directory to ~/Download and
Guake's default directory to ~/mybin .

how can I do it?
Old 07-02-2013, 06:56 AM   #2
Senior Member
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
Do you mean that when you open a different type of terminal, you should get a different directory by default? Well, opening a different directory depends upon the logged in user, not on type of terminal. Let's say that if you have logged in as 'foo' user, then by default it will open '/home/foo' directory or the directory you've set as home directory for 'foo' user irrespective of terminal type.
Old 07-02-2013, 07:09 AM   #3
Registered: Mar 2013
Distribution: Redhat, Ubuntu
Posts: 537

Rep: Reputation: 149Reputation: 149
Dont know about Terminator and Guake. But on gnome-terminal, you can do following in its Properties->Command
gnome-terminal --working-directory=/path-to-dir
Where /path-to-dir, should be accessable to the logging in user.

$ gnome-terminal --help
$ gnome-terminal --help-terminal
$ gnome-terminal --help-window-options
$ gnome-terminal --help-terminal-options

Last edited by mddnix; 07-02-2013 at 07:13 AM.
Old 07-03-2013, 02:30 PM   #4
David the H.
Bash Guru
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian + kde 4 / 5
Posts: 6,845

Rep: Reputation: 2006Reputation: 2006Reputation: 2006Reputation: 2006Reputation: 2006Reputation: 2006Reputation: 2006Reputation: 2006Reputation: 2006Reputation: 2006Reputation: 2006
Most, if not all, gui console programs have some option available for specifying the default starting directory. The more feature-rich ones like konsole even have options for multiple profiles that can be individually configured.

Start digging into the options and documentation for the programs you're using.
Old 07-03-2013, 02:34 PM   #5
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,844

Rep: Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478Reputation: 1478
And even if they don't you can still do it by using a wrapper script to set the working directory before exec of the application.

Something simple like:

cd $1
shift   # to discard the first parameter (the new working directory)
exec $* # use any remaining parameters as the application to run + parameters

Last edited by jpollard; 07-03-2013 at 02:36 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Howto set default download directory to one on the network? hdp160 Linux - Newbie 2 08-27-2012 10:24 AM
Set default file/directory permissions replica88 Linux - Newbie 2 04-04-2010 11:12 AM
set default umask to a directory or a group luvlinux2009 Linux - Security 4 09-17-2009 09:54 PM
Can I set default file/directory permission levels? toes Linux - Security 5 01-05-2007 07:21 PM
How do I set a default directory upon login with Samba? frentzel Linux - Networking 2 07-20-2006 07:42 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:38 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration