Forum › Forums › New users › New Users and General Questions › IceWM Address Bar
- This topic has 16 replies, 6 voices, and was last updated Mar 26-11:46 am by oops.
-
AuthorPosts
-
December 3, 2020 at 11:51 pm #46475Member
fladd
There are two bugs in relation to the IceWM Address Bar:
1. The documentation says that it supports completion using <Tab> or <Ctrl-I>, but none of those works
2. The documentation says that running the entered command with <Ctrl-Enter> will run the command in a terminal. However, running any command with <Ctrl-Enter> seems to always open Claws mail for some reasonDecember 4, 2020 at 12:27 am #46476Anonymous
::Regarding the documentation, it will be helpful to know whether the misinfo was stated in a (perhaps outdated) antiX-provided doc, or something stated in the docs authored by the upstream iceWM author?
December 4, 2020 at 4:53 am #46479ModeratorBobC
::I went to the IceWM website and in the manual they said:
Ctrl+Alt+Space Activate the AddressBar. This is a command line in the taskbar where a shell command can be typed. Pressing the Enter key will execute the command. If AddressBarCommand was configured it will be used to execute the command otherwise /bin/sh is used. If the Control key was also pressed then the command is executed in a terminal as given by TerminalCommand. The address bar maintains a history which is navigable by the Up and Down keys. A rich set of editing operations is supported, including cut-/copy-/paste-operations and file completion using Tab or Ctrl-I.So try Ctrl+Alt+Space
It would be good to know where its wrong so we can get it fixed.
December 4, 2020 at 4:18 pm #46504Memberfladd
::Maybe I was not clear. Let me try again:
1. I open the AddressBar with Ctrl+Alt+Space
2. I type “python my_script.py”
3. According to the documentation (see the quote by BobC above), I run this command then by hitting Ctrl+Enter, as this will run the command in a terminal.However, what happens in Antix is that this will close the AddressBar and open Claws Mail for some reason. This is a bug.
In addition to that, according to the documentation (again, see the quote by BobC above), I should be able in step 2 above, to just type “python my_” and then hit TAB (or Ctrl-I) in order for the filename “my_script.py” to be completed. However, in Antix, this does not work. Hitting TAB (or Ctrl-I) does NOT complete the filename (it does nothing in fact). This is another bug.
December 4, 2020 at 4:26 pm #46506ModeratorBobC
::Ok, that is clearer. Yes, I can confirm it doesn’t work on mine, either. It didn’t open Claws Mail on mine, though.
I’d need to find someplace it does work to make sense of it. I’ve never had a use for it myself.
December 4, 2020 at 4:36 pm #46507Memberfladd
::Did you run with Ctrl+Enter (and not just Enter alone)?
I can make the first bug go away by replacing the following line in ./.icewm/preferences:
TerminalCommand="desktop-defaults-run -t"with:
TerminalCommand="roxterm"So it appears that
desktop-defaults-run -topens Claws Mail, but only when called from the IceWM AddressBar. Callingdesktop-defaults-run -tfrom a terminal, will correctly open another terminal.December 4, 2020 at 4:50 pm #46509Memberfladd
::Okay, the reason for the first bug is in the following comment above where you set the TerminalCommand in the preferences (line 649):
# Terminal emulator must accept -e option.
The command “desktop-defaults-run -t”, when given the “-e” option, will apparently translate to running “desktop-defaults-run -e”, which opens Claws Mail.
Hence, you have to explicitly set a terminal emulator as TerminalCommand! You cannot use this desktop-defaults-run thingy there, as this does not work.
That still leaves us with the second bug, namely that completion does not work. Any ideas on that?
December 4, 2020 at 5:59 pm #46515Forum Admin
anticapitalista
::I get completion to work when the script/app is in one of the usual places eg /usr/local/bin, /usr/bin, but not when it is in /home/username.
Thanks for finding the fix to the first bug. Perhaps x-terminal-emulator would be a better than roxterm though.
- This reply was modified 2 years, 5 months ago by anticapitalista. Reason: fix typos
Philosophers have interpreted the world in many ways; the point is to change it.
antiX with runit - leaner and meaner.
December 4, 2020 at 6:00 pm #46516Memberfladd
::Interesting. I also got a reply on an issue in their GitHub repo: https://github.com/ice-wm/icewm/issues/33
December 4, 2020 at 6:07 pm #46517Forum Admin
anticapitalista
::I get what you wrote in your last post over at the IceWM github repo.
It does seem a bit limited.I have to type antixcc. before it autocompletes to antixcc.sh but only cla for claws-mail to open.
Philosophers have interpreted the world in many ways; the point is to change it.
antiX with runit - leaner and meaner.
December 4, 2020 at 6:24 pm #46520Anonymous
::per BobC’s quote, the docs state “If AddressBarCommand was configured it will…”
antiX ships an icewm preferences file containing
# AddressBarCommand = “”
Not specific to the “bug” at hand, perhaps the stock preferences file should NOT outcomment that line and, instead, specify =/bin/bashAfter tracing through the iceWM v1.9.2 source code…
addressbar.cc
AddressBar::appendCommand()
ywordexp.h
wordexp.h (locally installed)
leafpad /usr/include/wordexp.h
…I’m not convinced the icewm doc should claim that its addressbar provides functionality beyond “command completion”If posix wordexp truly provided “file completion”, why does the “bash completion” component exist?
Anyhow, setting addressbar to /bin/bash only governs which shell interpreter will be invoked when the Enter key is pressed from within icewm’s addressbar. The keystroke-by-keystroke event handling is still (only) handled by wordexp.
I believe the docs should be amended to state that the addressbar is capable of only command completion.
December 4, 2020 at 6:43 pm #46521Memberfladd
::antiX ships an icewm preferences file containing
# AddressBarCommand = “”Just to be clear, this thread is about running commands with Ctrl+Enter, which calls TerminalCommand. AddressBarCommand I think is only called when running commands with Enter.
perhaps the stock preferences file should NOT outcomment that line and, instead, specify =/bin/bash
If I understand correctly, then if not configured it will be /bin/sh, which should be fine as well.
After tracing through the iceWM v1.9.2 source code…
addressbar.cc
AddressBar::appendCommand()
ywordexp.h
wordexp.h (locally installed)
leafpad /usr/include/wordexp.h
…I’m not convinced the icewm doc should claim that its addressbar provides functionality beyond “command completion”If posix wordexp truly provided “file completion”, why does the “bash completion” component exist?
Anyhow, setting addressbar to /bin/bash only governs which shell interpreter will be invoked when the Enter key is pressed from within icewm’s addressbar. The keystroke-by-keystroke event handling is still (only) handled by wordexp.
I believe the docs should be amended to state that the addressbar is capable of only command completion.
Interesting. I wonder how easy it would be to add full completion functionality to IceWM, given that that bash completion (or an alternative) is already available on most systems.
- This reply was modified 2 years, 5 months ago by fladd.
- This reply was modified 2 years, 5 months ago by fladd.
December 4, 2020 at 6:48 pm #46524Anonymous
::https://man7.org/linux/man-pages/man3/wordexp.3.html
The expansion The expansion done consists of the following stages: tilde expansion (replacing ~user by user's home directory), variable substitution (replacing $FOO by the value of the environment variable FOO), command substitution (replacing $(command) or <code>command</code> by the output of command), arithmetic expansion, field splitting, wildcard expansion, quote removal.December 4, 2020 at 7:05 pm #46527ModeratorBobC
::I’m trying to figure out the purpose of having an address bar. On my totally stock setup it does open claws mail.
December 4, 2020 at 7:24 pm #46530Anonymous
::this thread is about running commands with Ctrl+Enter, which calls TerminalCommand.
IIRC, antiX versions prior to 17 had associated roxterm with “desktop-defaults-run -t”
then, for antiX17 it switched, to lxterminal… and has switched again to roxterm for antiX19.
desktop-defaults-run -t
consults the Exec= line in “terminal.desktop”In antiX17, that line (in the etc/skel default copy) stated Exec=lxterminal
Now, in antiX19, that line (in the etc/skel default copy) states Exec=roxtermEach terminal emulator has quirks/differences in how they expect any launchstrings containing commandline options to be \\escaped\\ when passed to them.
$grep -r ‘desktop-defaults-run -t[^e] [^m][^a][^n]’ /usr/local/*
^—–v
The ‘desktop-defaults-run -t’ passthrough mechanism hasn’t seen much use except for launching a terminal emulator to display manpages, and may not be a suitable choice for icewm’s AddressBarCommand= -
AuthorPosts
- You must be logged in to reply to this topic.