How to open the default text editor in Linux?
问题 I need to open the default text editor in Linux without having a file. I know that I could use the comand xdg-open to open a file in the default editor but I need to open the editor without having a file and let the user create the file. Edit: I solve with this script: #!/bin/sh cd /usr/share/applications/ atalho=`grep $1 defaults.list | tail -1 | sed "s:^$1=::" ` `grep '^Exec' $atalho | tail -1 | sed 's/^Exec=//' | sed 's/%.//'` & Works fine on Ubuntu but I'm worried if this script will work