LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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: 177

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
Madhu Desai
Member
 
Registered: Mar 2013
Distribution: Rocky, Fedora, Ubuntu
Posts: 541

Rep: Reputation: 153Reputation: 153
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 Madhu Desai; 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: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
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,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:19 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
Open Source Consulting | Domain Registration