方法一:

sudo apt-get install nautilus-open-terminal

然后重启

方法二:

Ubuntu中,默认右键菜单中没有“在终端中打开”。要想添加此菜单,可以在主目录中新建如下内容的脚本文件:

 




[plain] ​​view plain​​ ​​copy​

 


  1. #!/bin/bash  
  2.   
  3. # This script opens a gnome-terminal in the directory you select.  
  4.   
  5. # Distributed under the terms of GNU GPL version 2 or later  
  6.   
  7. # Install in ~/.gnome2/nautilus-scripts or ~/Nautilus/scripts  
  8. # You need to be running Nautilus 1.0.3+ to use scripts.  
  9.   
  10. # When a directory is selected, go there. Otherwise go to current  
  11. # directory. If more than one directory is selected, show error.  
  12.   
  13. if [ -n "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" ]; then  
  14. set $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS  
  15. if [ $# -eq 1 ]; then  
  16. destination="$1"  
  17. # Go to file's directory if it's a file  
  18. if [ ! -d "$destination" ]; then  
  19. destination="`dirname "$destination"`"  
  20. fi  
  21. else  
  22. zenity --error --title="Error - Open terminal here" \  
  23. --text="You can only select one directory."  
  24. exit 1  
  25. fi  
  26. else  
  27. destination="`echo "$NAUTILUS_SCRIPT_CURRENT_URI" | sed 's/^file:\/\///'`"  
  28. fi  
  29.   
  30. # It's only possible to go to local directories  
  31. if [ -n "`echo "$destination" | grep '^[a-zA-Z0-9]\+:'`" ]; then  
  32. zenity --error --title="Error - Open terminal here" \  
  33. --text="Only local directories can be used."  
  34. exit 1  
  35. fi  
  36.   
  37. cd "$destination"  
  38. exec x-terminal-emulator