GNOME Bugzilla – Bug 414596
"open with" don't change to the current directory
Last modified: 2008-03-12 11:52:34 UTC
I try to compile directly C file of hello world which compile good from the console. I click on it in nautilus then "open with" and type gcc. And It not work. Other information: $ gcc hello.c [nadav@myhost C]$ ls a.out hello.c
__________a9016009 change:___________________________________________ Removed : open with dialog not execute good console programs. Added: "open with": gcc does not compile .c file _________________________________________________ It's not happen only in gcc but in other or all console program. I also try on Latex.
The bug is also exist in KDE: http://bugs.kde.org/show_bug.cgi?id=142597
I found the problem, "open with" don't change to the current directory. I create a little script which change to the current directory and when it success compile: _________________________________________________________________________ #!/bin/bash echo "The file is" $1 cd `dirname $1` gcc $1 echo "After execute gcc" exit 0 ______________________________________________________________________ without the "echo "The file is" $1", The file not compile. What is the default directory which "open with" open it?
Sorry without the "cd `dirname $1`" the file not compile
you will never want to "open" a .c file with gcc, you want to compile it instead. closing as wontfix.