You are not logged in.
Hi,
I have a strange warning when I launch tmux as a regular user, here is the warning message :
Couldn't get a file descriptor referring to the console
-bash: [: : integer expression expectedAnd then my prompt appears, as I need tmux in order to have a scrollback history this bothers me.
Being an i3 user I use "st -e tmux" when I press $mod + enter to open a new terminal.
The problem also appears if I log in one of the tty as a regular user and the launch tmux from there, and doesn't when I "sudo tmux".
A second problem that I have (not related to tmux but to i3 + st) is when I open a new terminal (with $mod + enter) my cursor switch from normal to loading (the circle) for
a few minutes and then go back to normal.
If you need more informations/logs I am at your disposal.
Thanks in advance.
I used Debian for 3 years and recently switched to arch, I really fell in love with it because I can make my config as clean as I want it to be, so any help would be really appreciated.
Last edited by nature (2016-09-02 09:17:48)
Offline
Post your ~/.profile
Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby
Offline
my .bash_profile :
#
# ~/.bash_profile
#
[[ -f ~/.bashrc ]] && . ~/.bashrc
# Set vim as default editor
export EDITOR=vim
# Add a bin dir inside home to the PATH
export PATH="${PATH}:~/bin"
# Start X11 on longin on tty1
[ -z "$DISPLAY" -a "$(fgconsole)" -eq 1 ] && startxOffline
I am really stuck with that. Its been like 5 days since I have this problem, I searched on google and on duckduckgo and found no solutions to this.
So please, if at least someone could point me somewhere where I could get an answer for this, it would already make my day ! ![]()
Thank you.
Last edited by nature (2016-09-02 08:02:22)
Offline
Does the problem exist with terminal emulators other than st?
Offline
Try replacing:
[ -z "$DISPLAY" -a "$(fgconsole)" -eq 1 ] && startxwith
if [ -z "$DISPLAY" ] && [ "$(fgconsole)" -eq 1 ]; then
startx
fiSide note, don't use quotes to set your PATH like that, as it would take the "~" literally (causing issues with find e.a.)
A second problem that I have (not related to tmux but to i3 + st) is when I open a new terminal (with $mod + enter) my cursor switch from normal to loading (the circle) for
a few minutes and then go back to normal.
It should be a single minute. See:
Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby
Offline
Wow thanks alot, everything is fixed now !
Would you mind if I asked you some explanation on what the problem was ? (for the first one)
Offline
Wow thanks alot, everything is fixed now !
Would you mind if I asked you some explanation on what the problem was ? (for the first one)
https://github.com/koalaman/shellcheck/wiki/SC2166
The version on the wiki had the same error (oops), but it's fixed now. ![]()
Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby
Offline
Now I've written this long ass introduction into bash tests for you and realized I had overlooked you actually had -a in there.
Short answer:
EXPRESSION1 -a EXPRESSION2
both EXPRESSION1 and EXPRESSION2 are true
It would have probably been enough to move that one double quote to the right:
[ -z "$DISPLAY" -a "$(fgconsole) -eq 1" ] && startx[ -z EXPRESSION -a EXPRESSION ]
"$(fgconsole)" -eq 1 are two expressions (as far as test is concerned, so you need to turn it into one, like "$(fgconsole) -eq 1".
[ -z $NOSECHEESE -a "$(echo 2) -eq 2" ] && date ... works just fine, while ...
[ -z $NOSECHEESE -a "$(echo 2)" -eq 2 ] && date ... throws that error of yours.
However, since you already managed to wrangle a bug into a simple test, Alad showed you how to avoid such problems, by writing clean and readable code. Everybody who will ever read this code, including all of your future selves, will thank you.
The bash test equivalent of "HC SVNT DRACONES".
Last edited by Awebb (2016-09-02 15:57:51)
Offline