6
  1. Since upgrade to Ubuntu 16.04, the desktop 'Open in Terminal' context menu opens only in home directory. It's realy uncomfortable. Is there a way to make it open with prompt in desktop directory ?

  2. Is there a way to set a 'nautilus action' to display in the desktop context menu too .

Thanks

rcspam
  • 161

2 Answers2

3

I have resolve the first point myself ;)

In fact, I want to open the terminal in the desktop only when I open it from desktop menu context or from the Unity Launcher.

So, all I have do is add this line at the end of my .bashrc:

[[ $PWD == $HOME ]] && cd $HOME/Desktop

With the question 1, I would like to know about a possible configuration point somewhere (i.e. dconf, nautilus-actions...).

Thank you for your answers.

pomsky
  • 70,557
rcspam
  • 161
0

possible duplicate of How do I change the default working directory with which gnome-terminal opens?

Modify the .bashrc file of the user you want the console to open in Desktop and add this at the end:

cd ~/Desktop

Save and close the file.

If you prefer to add settings but keep it separate from the original .bashrc you can edit the file and at the end put

if [ -f .bashrcc ];
then
    source .bashrcc
fi

Then create a file called .bashrcc and all entries will also be loaded when loading the shell.

This isn't useful to most but in my case I have a .bashrc that is just a link to a file that I have synchronized over several pc's and this setup allows me to change the shell on one users without it changing it on all the pc's that the .bashrc is synchronized with. For instance if I wanted one user to have the availability of the alias findzombie I would add

alias findzombie='ps -A -ostat,ppid,pid,cmd | grep -e '^[Zz]' ' 

to the .bashrcc of that user and only he would have the use of that in his shell. Again probably not useful most and editing the .bashrc file is enough but though I would include it anyway

John Orion
  • 2,871