You are not logged in.
If I write "xterm" in my shell, a terminal window with none of my config files loaded (plain white, says "sh-4.3$"). My zshrc file has not loaded in this case (as my aliases aren't working).
If I launch a terminal from i3wm's standard hotkey (Mod1+return), xterm is loaded perfectly.
If I launch a terminal from rofi (program launcher), xterm is loaded perfectly.
What is going on here?
If relevant, echo $TERM gives xterm-256color.
Last edited by grindv1k (2016-01-11 22:55:55)
Offline
What does `type xterm` return?
Offline
What does `type xterm` return?
Output:
"xterm is /usr/bin/xterm".
Offline
Are you launching xterm as your user (and not with sudo/as root)?
No, I am launching it via my user.
I tried launching via sudo, and the result was the same, except the prompt now showed up as
"root@<hostname>", instead of
"sh-4.3$".
Offline
If I launch a terminal from i3wm's standard hotkey (Mod1+return), xterm is loaded perfectly.
If I launch a terminal from rofi (program launcher), xterm is loaded perfectly.
Could you please open a "correctly" running xterm (e.g. through the launcher) and an "incorrectly" running xterm (launched from the command line), then post the output of this?
ps aux xtermOffline
Grasping at straws, but maybe your default shell is misconfigured or unconfigured and terminals launched otherwise are using some other configuration than /etc/passwd ?
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
grinv1k wrote:If I launch a terminal from i3wm's standard hotkey (Mod1+return), xterm is loaded perfectly.
If I launch a terminal from rofi (program launcher), xterm is loaded perfectly.Could you please open a "correctly" running xterm (e.g. through the launcher) and an "incorrectly" running xterm (launched from the command line), then post the output of this?
ps aux xterm
Tried having both up side by side, both times starting with a "correct xterm". First time typing "xterm" which launches a "wrong" xterm while the first is busy, second time typing "xterm &" so I could write input on the correct xterm. Lastly I tried the command from just a single "correct" xterm.
Anyway the output was the same each time:
$ ps aux xterm
error: TTY could not be found
Usage:
ps [options]
Try 'ps --help <simple|list|output|threads|misc|all>'
or 'ps --help <s|l|o|t|m|a>'
for additional help text.
For more details see ps(1).Offline
Grasping at straws, but maybe your default shell is misconfigured or unconfigured and terminals launched otherwise are using some other configuration than /etc/passwd ?
Maybe? The output of "printenv" lists:
TERM=xterm-256colorWhich I can't remember setting anywhere else than in .Xresources by:
xterm*termName: xterm-256colorIt also mentions
XTERM_SHELL=/usr/bin/zshbut there is no mention of just "SHELL". Is this configuration wrong?
EDIT: Thanks! I added this to my .zshrc
SHELL=/usr/bin/zsh, and ran
source ~/.zshrcNow it works! Typing "xterm" from my terminal now opens a "correct" version. Solved.
Last edited by grindv1k (2016-01-11 22:55:09)
Offline
The output of "printenv" lists:
TERM=xterm-256colorWhich I can't remember setting anywhere else than in .Xresources by:
xterm*termName: xterm-256color
Remove that line from .Xresources
Let the terminal set that variable.
EDIT: Oh, you solved it.
Last edited by Head_on_a_Stick (2016-01-11 22:56:11)
Jin, Jîyan, Azadî
Offline
I added this to my .zshrc
SHELL=/usr/bin/zsh, and ran
source ~/.zshrcNow it works! Typing "xterm" from my terminal now opens a "correct" version. Solved.
This isn't a fix, it is a workaround. I think alphaniner is right, your shell is misconfigured. How did you change to Zsh?
Offline
grindv1k wrote:I added this to my .zshrc
SHELL=/usr/bin/zsh, and ran
source ~/.zshrcNow it works! Typing "xterm" from my terminal now opens a "correct" version. Solved.
This isn't a fix, it is a workaround. I think alphaniner is right, your shell is misconfigured. How did you change to Zsh?
Interesting. I remember installing Zsh via pacman. I later also installed oh-my-zsh via github which I am guessing you know of.
I also ran the "initial setup wizard" at some point, which I think starts on the first Zsh run.
At some point I believe I ran the two commands from this part of the wiki: https://wiki.archlinux.org/index.php/Co … ault_shell which was linked from the Zsh article.
$ chsh -l
$ chsh -s full-path-to-shellOffline
I would look at what OMZ has done with it's setup: something is definitely not right if you have to export that var to get a sane environment...
Offline
I would look at what OMZ has done with it's setup: something is definitely not right if you have to export that var to get a sane environment...
OK. For future reference, if I was to install Arch fresh and wanted to change shell, would I have to do anything other than installing the shell (pacman/aur) and running the two commands mentioned above?
That is
$ chsh -l
$ chsh -s full-path-to-shellOffline
Nope: that is all you need to do (which is why I suspect OMZ has broken something).
Offline
The reason why I asked for getting the list of all xterm processes was to find out whether OP is running xterm as a login shell in some cases (and whether perhaps OMZ has somehow set up its stuff in .zlogin/.zprofile instead of .zshrc).
Scratch that, he says it works fine after sourcing .zshrc.
EDIT OK, but still, what are the command lines for each xterm process?
Also, is the ZDOTDIR environment variable set, and if yes to what value?
Last edited by ayekat (2016-01-12 10:32:53)
Offline