I up graded to Windows 10 and my Geany was fine. Now with a new computer and a full install of Windows 10, the execute button doesn't work with Geany 1.22 or 1.27
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018
What is configured as Execute action in Build->Set Builds Commands? Can you paste the contents of the Help->Debug Messages dialog?
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#issuecomment-216123466
What language is the program you are trying to run?
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#issuecomment-216123668
I am just trying to execute HTML. HTML runs right from File Explorer. My HTML and PHP pages display fine with my localhost. The BUILD->Set Build Commands says, "Builtin." Help->Debug Messages dialog: 07:03:08: Geany INFO : Geany 1.27, English_United States.1252 07:03:08: Geany INFO : GTK 2.24.28, GLib 2.46.2 07:03:08: Geany INFO : System data dir: C:\Program Files (x86)\Geany\data 07:03:08: Geany INFO : User config dir: C:\Users\ulato\AppData\Roaming\geany 07:03:08: Geany INFO : System plugin path: C:\Program Files (x86)\Geany\lib\geany 07:03:08: Geany INFO : Added filetype Clojure (61). 07:03:08: Geany INFO : Added filetype CUDA (62). 07:03:08: Geany INFO : Added filetype Cython (63). 07:03:08: Geany INFO : Added filetype Genie (64). 07:03:08: Geany INFO : Added filetype Graphviz (65). 07:03:08: Geany INFO : Added filetype JSON (66). 07:03:08: Geany INFO : Added filetype Scala (67). 07:03:08: Geany INFO : D:\xampp\htdocs\backgrounds\QuotesandExcerpts.html : HTML (UTF-8)
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#issuecomment-216220117
What browser command is set in Menu->Edit->Preferences->Tools->Browser?
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#issuecomment-216221011
Menu->Edit->Preferences->Tools->Browser: firefox My default browser is chrome, but I have Firefox installed and it works.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#issuecomment-216224057
On windows Geany runs `open file://path/to/file` rather than the browser command, to try to use your default browser, hence my late edit.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#issuecomment-216225021
I don't understand your last comment.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#issuecomment-216226358
On windows, to try to use your default browser Geany runs an `open` command with the filename as a URL, ie `file://....`. I am not a windows expert, but I assume that should have the same effect as opening the file in the file manager?
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#issuecomment-216227394
@elextr it [strips the `file://` part](/geany/geany/blob/master/src/win32.c#L789), if existing. And has [a *very* odd check](/geany/geany/blob/master/src/win32.c#L792) in addition, I don't know what it's supposed to do (f12ed2fabe848d8aaa63380b4655481a5f7372e8).
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#issuecomment-216228417
Oh, I thought it added it, oops :)
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#issuecomment-216230354
The BUILD->Set Build Commands says, "Builtin." Does anyone know what "builtin" translates to?
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#issuecomment-216281237
@tulatows as I said above, it runs the "open" action, which is the equivalent of selecting "open" in explorer. For HTML files that means opening in a browser.
The most likely problem is that it isn't finding the file. From some discussions on IRC it appears that it may have problems with files on a different drive or share than the current default, but somebody with windows needs to check it.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#issuecomment-216413714
Closed #1018.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#event-648400386
C:\Program Files (x86)\Google\Chrome\Application>chrome.exe pp.html The above line works from a DOS window, but the spaces wont work in the Build->Set Builds Commands->Execute window. "%20" does not work. "%f" substitutes for whatever is in the open editor window, so this should work: C:\Program Files (x86)\Google\Chrome\Application>chrome.exe %f
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#issuecomment-216429569
Reopened #1018.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#event-649640772
This works: D:\Comodo\Dragon\dragon.exe %d%f && exit but not well because the is an annoying double flash from opening and closing a DOS window.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#issuecomment-216726064
Closed #1018.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#event-651516860
Reopened #1018.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#event-652075169
Execute is for executing programs that are under development, so they run in a terminal to make error messges and printf() debugging visible. It is not possible to run them without the terminal.
It is intended to use "builtin" to run the browser without the window but there appears to be (a) bug(s).
Leave this issue open of it will be forgotten.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#issuecomment-217304951
This line: %f "\r" && exit has the same effect as: D:\Comodo\Dragon\dragon.exe %d%f && exit except it now uses the default browser instead of dragon. "\r" is a DOS carriage return; i.e. "Enter" or "Open" or "Execute" The problem with the opening and closing of a DOS window persists. Perhaps what is needed is the equivalent of the HTML setting <base target="_self">
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#issuecomment-217622077
Perhaps what is needed is the equivalent of the HTML setting target = _self
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#issuecomment-217622129
<>
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#issuecomment-217622246
@tulatows as I said above, "builtin" is the equivalent of "open", which is what you want to do, and with no terminal window, but it has a bug (related to filename handling).
Most use-cases for execute want the terminal window, so you would be better trying to fix that bug.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#issuecomment-217627939
Repeating, In my first post I suggested that windows 10 was the problem. If no one has any idea how to fix the problem, why are there so many posts? There are too many posts. Now the issue is obfuscated and no one has anything useful to say.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#issuecomment-217641209
@tulatows if the original reason for this bug is fixed or not valid, then close the bug. If you have any other issues not described in the title or description of this issue, then open a new issue about it.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#issuecomment-217656455
Geany's execute button still does not work right. As I said, my semi-fixes cause a black DOS window to open with an extra flash.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#issuecomment-217656844
@tulatows to summarise:
Unfortunately you have uncovered a bug in the "builtin" action of the execute command.
There have been many posts because there are two conversations happening:
1. attempts to confirm, and characterise the bug and to consider possible fixes
2. attempts to find interim workarounds
Both conversations are important, but unfortunately posts about one conversation can seem irrelevant and even obfuscating to the other.
As far as the bug goes, as I understand, it currently appears to be related to which drive or share the file is on and which one Geany is on, not the version of Windows. IIUC if both Geany and the file are on the same drive/share it will work. Please advise if you observe otherwise. This is the bug that needs fixing and is the one the issue is marked "bug" for.
As for the workaround, your latest version appears to be the best that can be done, it works, but with a flash of the terminal window. As explained above the terminal window is an intended behaviour of the execute command and is not avoidable. This is why the "builtin" action was added since it does not use the terminal. The appearance of the terminal is annoying for your workaround but it is not a bug that needs to be fixed.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#issuecomment-217702279
I cant try elextr's suggestion because I don't know how to get back to the default "Builtin" execute setting. Does anyone know how to get back to the default execute command setting? P.S. It is not "Open." Reinstalling does not help, and I can't find anything in the registry that seems relevant.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#issuecomment-218243204
Closed #1018.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#event-656148310
Reopened #1018.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#event-656508258
Closed #1018.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#event-656509018
@tulatows do not close this issue, it is marking a bug.
Set the build command to the string "builtin".
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#issuecomment-218325155
Reopened #1018.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#event-656509053
Weird "builtin" executed, "Builtin" (that matches the original) doesn't! Also there is still a slight flash when I exit my browser -- same black screen.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#issuecomment-218332599
Closed #1018.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#event-656542584
Reopened #1018.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#event-656553697
@eht16 what does the default execute command for HTML in the windows bundle say? For linux its all lower case which is correct.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#issuecomment-218336946
"Builtin"
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#issuecomment-218366279
Closed #1018.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#event-656691451
Reopened #1018.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#event-656719828
@eht16 what does the default execute command for HTML in the windows bundle say?
It's the same on Windows, there is nothing which changes the default value.
``` $ grep run_cmd /c/Program\ Files\ (x86)/Geany/data/filedefs/filetypes.html run_cmd=builtin ```
I have no clue why it should be "Builtin" on @tulatows installation.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1018#issuecomment-218392968
in geany 1.31, with win10 `builtin` still fails to work when the html source file to execute isn't on drive C:
error msg in status bar: failed to open URI "/myDir\subdir\myfile.html" the system cannot find the file specified
I concur with butterw: My HTML executes when on C: !! I was using D:
Its possibly because windows does not provide a `realpath()` equivalent and the home brewed version [here](https://github.com/geany/geany/blob/9185395c40c68b87cc462fe8ac5bdc95e069ea93...) does not handle drives outside the current working drive. Pull requests to fix are welcome.
It's rather `g_path_skip_root` in https://github.com/geany/geany/blob/master/src/build.c#L1243 which removes `c:` (or `d:`) from the URI passed to the browser. I justed on Windows with Firefox that passing the path root will work and it does. So we could just remove `g_path_skip_root` on Windows (on non-Windows systems it should be OK) to resolve this issue. Maybe this introduces other issues as side effects of this change, so it needs some testing. Hence, here are some binaries with this change (built from GIT master, be careful): Geany: https://download.geany.org/snapshots/geany-1.32nightly20171015_setup.exe Plugins: https://download.geany.org/snapshots/geany-plugins-1.32nightly20171015_setup...
Actually seems to be more complicated than that, [this](https://blogs.msdn.microsoft.com/ie/2006/12/06/file-uris-in-windows/) uses only two slashes for paths that don't use a device like `//my_fileserver` so the fixed `file:///` is not right.
If I read the text correctly, file URIs explicitly states for full paths, including the drive letter, it needs three slashes. This is what Geany would do if we remove `g_path_skip_root` on Windows. The example with hostnames where only two slashes are required, is not relevant for us as we never construct an URI containing the hostname when using the "builtin" feature.
we never construct an URI containing the hostname when using the "builtin" feature.
Sorry `s/hostname/sharename/` I'm not good with Windows terminology, can't open an HTML file being on a SMB mounted share where its path is //sharename/path/file?
after further testing it seems the path issue is not really related to drive C but rather to the last geany open dir.
in geany 1.31, with win10: - Geany File > Open: execute on .html mostly works, but fails in the root of the drive - if not on the same drive as last Open: always fails
@elextr IIRC the UNC path for a SMB share is like `\hostname\share\further\path\components\file.ext`. To be honest, I don't know whether it is possible to use such paths in Geany and I cannot test. Though, I guess using files from SMB shares directly in Geany is less common than opening files from drives other than C: and even if, SMB shares can be mapped to a drive letter and then handling in Geany should be fine again.
I'll prepare a PR for the change to not use `g_path_skip_root` on Windows.
@eht16 the reason I'm asking is because I was recently looking at NAS appliances, which are becoming more and more cheap and common, and its my understanding that the contents of those show up on Windows as paths like you showed above. But I didn't buy one yet, so obviously I can't test either :)
I guess it must work, I would have expected a lot of complains if Geany couldn't edit files stored on NAS devices.
Anyway this question should not stop fixing drive letters to work.
#1667 should fix the drive letter issue. @elextr opening files from SMB shares (like in the NAS example) via browser (e.g. using the "builtin" execute command) never worked and won't work with the changes in #1667. I assume opening/executing files from other drives than C: is a more common case and this should work now. And users can always map network shares to drive letters and so they behave transparently as normal files to Geany.
Closed #1018 via #1667.
github-comments@lists.geany.org