LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 07-02-2013, 05:37 AM   #1
mshlinux
Member
 
Registered: Mar 2013
Location: Yangon, Myanmar.
Distribution: Fedora, Arch
Posts: 157

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.
Eg:
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, 05:56 AM   #2
shivaa
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, 06:09 AM   #3
mddnix
Member
 
Registered: Mar 2013
Distribution: Redhat, Ubuntu
Posts: 525

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

More:
Code:
$ 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 06:13 AM.
 
Old 07-03-2013, 01:30 PM   #4
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959Reputation: 1959
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, 01:34 PM   #5
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,688

Rep: Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259Reputation: 1259
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:
Code:
#!/bin/sh

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 01:36 PM.
 
  


Reply


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 09:24 AM
Set default file/directory permissions replica88 Linux - Newbie 2 04-04-2010 10:12 AM
set default umask to a directory or a group luvlinux2009 Linux - Security 4 09-17-2009 08:54 PM
Can I set default file/directory permission levels? toes Linux - Security 5 01-05-2007 06:21 PM
How do I set a default directory upon login with Samba? frentzel Linux - Networking 2 07-20-2006 06:42 AM


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

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