You are not logged in.
When ever I open a terminal emulator (I have tried many) I usually get the message: "bash: #: command not found". How can I get rid of it?
Things to note: it shows before my screenfetch which is at the end of my bash.bashrc file. Whenever I use vim to open the bash.bashrc file, I get a "E325: ATTENTION".
/etc/bash.bash.rc file (same as ~/.bashrc):
#
# /etc/bash.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
[[ $DISPLAY ]] && shopt -s checkwinsize
PS1='[\u@\h \W]\$ '
case ${TERM} in
xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${
PWD/#$HOME/\~}"'
;;
screen*)
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${
PWD/#$HOME/\~}"'
;;
esac
# export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
screenfetch/etc/xprofile:
tint2 &
nm-applet &I don't think I changed this file, but here it is:
# /etc/profile
# Set our umask
umask 022
# Append our default paths
appendpath () {
case ":$PATH:" in
*:"$1":*)
;;
*)
PATH="${PATH:+$PATH:}$1"
esac
}
appendpath '/usr/local/sbin'
appendpath '/usr/local/bin'
appendpath '/usr/bin'
unset -f appendpath
export PATH
# Load profiles from /etc/profile.d
if test -d /etc/profile.d/; then
for profile in /etc/profile.d/*.sh; do
test -r "$profile" && . "$profile"
done
unset profile
fi
# Source global bash config, when interactive but not posix or sh mode
if test "$BASH" &&\
test "$PS1" &&\
test -z "$POSIXLY_CORRECT" &&\
test "${0#-}" != sh &&\
test -r /etc/bash.bashrc
then
. /etc/bash.bashrc
fi
# Termcap is outdated, old, and crusty, kill it.
unset TERMCAP
# Man is much better than us at figuring this out
unset MANPATHEdit: I forgot to mention that my PATH environment variable is set to "usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:home/midfingr/Documents/panel". I'm not sure how to permanently fix that, but I doubt it's the problem.
Last edited by destruxio (2020-07-13 03:31:30)
Offline
Please edit your post and click the "BBCode" link just below the text editing box to learn how to properly use code tags. Then add them appropriately to your post.
You generally should be modifying your user's own ~/.bashrc rather than the system-wide /etc/bash.bashrc.
But for this problem, have you tried commenting / removing the screenfetch command? Does the problem persist? Do you have a ~/.bashrc? If so, what's in it?
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I'll make sure to edit the BBCode. I do not have a ~/.bashrc, I'm going to assume I was supposed to make that, so I have have been editing the one in /etc/ this whole time. I tried commenting the screenfetch and it did not get rid of the problem. Also, I made the ~/.bashrc by copying the bash.bashrc and that did not fix the problem either.
Offline
It looks like the code tags were properly used to me.
destruxio, you *can* edit the system-wide bashrc file as you have done - but for most changes that's probably not what you would want. You also should copy the system-wide file to your own ~/.bashrc. Instead you can just create a ~/.bashrc from scratch with nothing in it at first until you add something (like screenfetch) or you could copy /etc/skel/.bashrc to ~/.bashrc (this is the purpose of the /etc/skel files to be "skeleton" files to initialize new users with - but there is nothing required in them, just a good general default start.)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I posted the files I may or may not have touched and I copied /etc/bash.bashrc to ~/.bashrc
Offline
Just in case, here's the i3 config.
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
#
# This config file uses keycodes (bindsym) and was written for the QWERTY
# layout.
#
# To get a config file with the same key positions, but for your current
# layout, use the i3-config-wizard
#Needed for i3-gaps
#hide_edge_borders both
for_window [class="^.*"] border pixel 0
gaps inner 10
gaps outer 10
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:monospace 10
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
font pango:DejaVu Sans Mono 10
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet
# start ranger
bindsym Mod1+x exec alacritty -e ranger
# Screen brightness controls
# bindsym XF86MonBrightnessUp exec xbacklight -inc 20
# bindsym XF86MonBrightnessDown exec xbacklight -dec 20
bindsym XF86MonBrightnessUp exec light -A 5
bindsym XF86MonBrightnessDown exec light -U 5
# Keyboard brightness controls
bindsym XF86KbdBrightnessUp exec light -s sysfs/leds/smc::kbd_backlight -A 5 #increase Kbd brightness
bindsym XF86KbdBrightnessDown exec light -s sysfs/leds/smc::kbd_backlight -U 5 #decrease Kbd brightness
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
# use these keys for focus, movement, and resize directions when reaching for
# the arrows is not convenient
set $up k
set $down j
set $left h
set $right l
# use Mouse+Mod1 to drag floating windows to their wanted position
floating_modifier Mod1
# start a terminal
bindsym Mod1+Return exec alacritty
# kill focused window
bindsym Mod1+Shift+q kill
# launch firefox
bindsym Mod4+c exec firefox
# Launch rofi
bindsym Mod1+d exec --no-startup-id rofi -show run -lines 10 -eh 2 -width 30 -padding 800 -font "Cantarell 11"
# Launch rofi-todo
bindsym Mod4+d exec rofi -modi TODO:/home/tanay/rofi-todo/rofi-todo.sh -show TODO
# start dmenu (a program launcher)
# bindsym Mod1+d exec dmenu_run
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
# bindsym Mod1+d exec --no-startup-id i3-dmenu-desktop
# change focus
bindsym Mod1+$left focus left
bindsym Mod1+$down focus down
bindsym Mod1+$up focus up
bindsym Mod1+$right focus right
# alternatively, you can use the cursor keys:
bindsym Mod1+Left focus left
bindsym Mod1+Down focus down
bindsym Mod1+Up focus up
bindsym Mod1+Right focus right
# move focused window
bindsym Mod1+Shift+$left move left
bindsym Mod1+Shift+$down move down
bindsym Mod1+Shift+$up move up
bindsym Mod1+Shift+$right move right
# alternatively, you can use the cursor keys:
bindsym Mod1+Shift+Left move left
bindsym Mod1+Shift+Down move down
bindsym Mod1+Shift+Up move up
bindsym Mod1+Shift+Right move right
# toggle split
bindsym Mod1+t split toggle
# split in horizontal orientation
bindsym Mod1+z split h
# split in vertical orientation
bindsym Mod1+v split v
# enter fullscreen mode for the focused container
bindsym Mod1+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym Mod1+s layout stacking
bindsym Mod1+w layout tabbed
bindsym Mod1+e layout toggle split
# toggle tiling / floating
bindsym Mod1+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym Mod1+space focus mode_toggle
# focus the parent container
bindsym Mod1+a focus parent
# focus the child container
#bindsym Mod1+d focus child
# move the currently focused window to the scratchpad
bindsym Mod1+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym Mod1+minus scratchpad show
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
# switch to workspace
bindsym Mod1+1 workspace number $ws1
bindsym Mod1+2 workspace number $ws2
bindsym Mod1+3 workspace number $ws3
bindsym Mod1+4 workspace number $ws4
bindsym Mod1+5 workspace number $ws5
bindsym Mod1+6 workspace number $ws6
bindsym Mod1+7 workspace number $ws7
bindsym Mod1+8 workspace number $ws8
bindsym Mod1+9 workspace number $ws9
bindsym Mod1+0 workspace number $ws10
# move focused container to workspace
bindsym Mod1+Shift+1 move container to workspace number $ws1
bindsym Mod1+Shift+2 move container to workspace number $ws2
bindsym Mod1+Shift+3 move container to workspace number $ws3
bindsym Mod1+Shift+4 move container to workspace number $ws4
bindsym Mod1+Shift+5 move container to workspace number $ws5
bindsym Mod1+Shift+6 move container to workspace number $ws6
bindsym Mod1+Shift+7 move container to workspace number $ws7
bindsym Mod1+Shift+8 move container to workspace number $ws8
bindsym Mod1+Shift+9 move container to workspace number $ws9
bindsym Mod1+Shift+0 move container to workspace number $ws10
# reload the configuration file
bindsym Mod1+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym Mod1+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym Mod1+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the window’s width.
# Pressing right will grow the window’s width.
# Pressing up will shrink the window’s height.
# Pressing down will grow the window’s height.
bindsym $left resize shrink width 10 px or 10 ppt
bindsym $down resize grow height 10 px or 10 ppt
bindsym $up resize shrink height 10 px or 10 ppt
bindsym $right resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape or Mod1+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym Mod1+r mode "default"
}
bindsym Mod1+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
status_command i3status
}
# Background set
exec --no-startup-id feh --bg-fill /home/tanay/1443919259538.jpg
exec --no-startup-id pulseaudioOffline
Edit: I forgot to mention that my PATH environment variable is set to "usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:home/midfingr/Documents/panel". I'm not sure how to permanently fix that, but I doubt it's the problem.
I'd agree that this itself is not the cause if the problem, but it certainly is relevant as there is nothing in any of the files you posted that could create that path. So something else is being sourced / running. This something else would also be a prime candidate for the source of the current problem.
What instructions / tutorial did you follow to install this system?
And how many users are there on your system ... and what is your user's name? Your path refers to home/midfingr (oddly, not even /home/midfingr) yet your i3 config refers to /home/tanay.
Last edited by Trilby (2020-07-13 03:11:34)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I used the Arch Linux installation guide on the Arch Linux wiki and setup i3 using the Arch Linux wiki as well. The rest, keybinds and applications, was through the github pages. One issue might be that I initially tried to install BSPWM and SXHKD on this system and then went back and (I think) I deleted all files pertaining to that. I also failed to install polybar and again deleted the files related to that.
Offline
As you were posting that I found an answer to one of my questions - unfortunately it conflicts with what you have just said. I gather you used this spin-off (which is available on other sites as well):
https://sourceforge.net/projects/archmidfingr/
EDIT: So you copy/pasted these commands without even reading them?
https://gist.github.com/RomaniukVadim/7 … b277a50622
Last edited by Trilby (2020-07-13 03:24:42)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Please paste the output of `ls -la /home/yourusernamewhateveritis`
Trilby: the "code tags" were yellow highlights at one point...
#edit: more time wasted...
Last edited by jasonwryan (2020-07-13 03:16:50)
Offline
This is weird. I didn't use that at all. I remember I tried the zen installer, failed, and then just decided to do it the hard way. I'd think I'd know that because I broke Arch Linux eight times and went through the process myself again and again.\
Also, they were yellow highlights. I fixed them afterward. And here's the output:
total 4328
drwxrwxr-x 11 tanay tanay 4096 Jul 12 21:45 .
drwxr-xr-x 4 root root 4096 Jul 12 16:41 ..
-rw-r--r-- 1 root root 4343116 Jul 11 08:35 1443919259538.jpg
-rw------- 1 tanay tanay 7309 Jul 12 21:45 .bash_history
-rwxrwxr-x 1 tanay tanay 21 May 22 08:29 .bash_logout
-rwxrwxr-x 1 tanay tanay 57 May 22 08:29 .bash_profile
-rwxrwxr-x 1 tanay tanay 303 Jul 12 18:03 .bashrc
drwxrwxr-x 7 tanay tanay 4096 Jul 12 10:20 .cache
drwxr-xr-x 3 tanay tanay 4096 Jul 12 11:10 .cargo
drwxr-xr-x 3 root root 4096 Jul 12 21:36 .config
drwxr-xr-x 7 root root 4096 Jul 11 21:38 .git
drwx------ 4 tanay tanay 4096 Jul 12 18:54 .gnupg
drwxrwxr-x 3 tanay tanay 4096 Jul 10 22:12 .local
drwxrwxr-x 5 tanay tanay 4096 Jul 12 08:55 rofi-dmenu
drwxrwxr-x 4 tanay tanay 4096 Jul 12 09:21 rofi-todo
drwxr-xr-x 4 tanay tanay 4096 Jul 12 21:39 spotify
-rw-r--r-- 1 root root 75 Jul 12 18:52 tan
-rw------- 1 tanay tanay 10228 Jul 12 21:38 .viminfo
-rwxrwxr-x 1 tanay tanay 0 Jul 10 23:48 .Xauthority
-rwxrwxr-x 1 tanay tanay 619 Jul 10 23:12 .xinitrcLast edited by destruxio (2020-07-13 03:17:33)
Offline
I did not change .bash_profile, but here are some of the others:
.xinitrc
#!/bin/sh
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
# start some nice programs
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
sxhkd &
exec bspwm.bashrc:
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '
export PANEL_FIFO=/tmp/panel-fifo
# export PATH=$PATH:home/midfingr/Documents/panel
export PATH="/usr/local/sbin:/usr/local/bin:/use/bin"
then: source ~/.bashrcOffline
then: source ~/.bashrcthen is not a command...
Also, not the same as the file in post #1
/etc/bash.bash.rc file (same as ~/.bashrc):
Last edited by jasonwryan (2020-07-13 03:22:54)
Offline
Fixed that, but problem didn't go away. Also, the screenfetch and "bash: #: command not found" are running twice now when I open a new terminal.
Edit: Got rid of ~/.bashrc and the issue and screenfetch stopped running twice
Last edited by destruxio (2020-07-13 03:24:12)
Offline
And for the next surprise, what is in .bash_profile?
Offline
I noticed that when I posted and forgot to change it lol. I made it "exec i3" and the "bash: #: command not found" in terminal did not go away.
Offline
Please don't waste any more of the community's time by randomly posting other people's configs into your system (assumung you did install it, which I doubt very much).
Mark your thread as [Solved] by editing your first post and prepending it to the title.
Offline
Idk what to do man. I read the policy and I would not have posted if I didn't do it myself. The best answer I can give for the midfingr thing is that it may have came about when I was looking through github for solution when my BSPWN install failed.
Offline
Iso from : https://www.archlinux.org/download/
Installation and config I posted earlier. I guess at this point I might as well reinstall the system if I can't fix this then ![]()
Offline
Yes, please see the edit to my post when I suspected you used something else. I found the document you must have just completely copy-pasted blindly (which is a horrible and extremely dangerous thing to do). That was a mistake - but it removes any suspicion that you used a third party installer. It does not, however, remove suspicion that you are clueless about your system's configuration.
A lot of information has changed or been misreported in this thread - frankly I've lost track of what may not be in which files. But it's almost certain that your copy-paste habit created a problem in one of the configs.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I marked it as solved and I'll reinstall everything after my homework. Thank you so much for your time and I'll be more careful next time.
Offline