Fish doesn't like my bash commands?

Hello everyone. I need to alter my Thinkpad's bios in order to remove a battery whitelist so I can use an extended battery from another Thinkpad. The tutorial I'm using ( GitHub - hamishcoleman/thinkpad-ec: Infrastructure for examining and patching Thinkpad embedded controller firmware ) describes getting packages ready for different Linux distros, but no instruction for Arch, so I'm trying to make a persistent Parrot USB stick, which I've done many times in the past, but fish is complaining about the commands so I chsh'd to bash thinking bash wouldn't mind the commands because I've done this many times before.....but still fish is crying even though it's not the shell. What's going on here? Here's my inxi....

╭─user@newruda in ~
[🔴] × garuda-inxi
System:
Kernel: 6.4.2-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 13.1.1
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=66622e10-72fd-4fd1-8c39-c80959484d81 rw rootflags=subvol=@
quiet quiet rd.udev.log_priority=3 vt.global_cursor_default=0 loglevel=3
ibt=off
Desktop: KDE Plasma v: 5.27.6 tk: Qt v: 5.15.10 wm: kwin_x11 vt: 2
dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Laptop System: LENOVO product: 2344BZU v: ThinkPad T430
serial: <superuser required> Chassis: type: 10 serial: <superuser required>
Mobo: LENOVO model: 2344BZU v: Win8 Pro DPK TPG
serial: <superuser required> UEFI: LENOVO v: G1ET98WW (2.58 )
date: 10/23/2013
Battery:
ID-1: BAT0 charge: 52.0 Wh (87.0%) condition: 59.8/84.3 Wh (71.0%)
volts: 11.6 min: 11.1 model: LGC 42T4912 type: Li-ion serial: <filter>
status: discharging
CPU:
Info: model: Intel Core i5-3320M bits: 64 type: MT MCP arch: Ivy Bridge
gen: core 3 level: v2 built: 2012-15 process: Intel 22nm family: 6
model-id: 0x3A (58) stepping: 9 microcode: 0x21
Topology: cpus: 1x cores: 2 tpc: 2 threads: 4 smt: enabled cache:
L1: 128 KiB desc: d-2x32 KiB; i-2x32 KiB L2: 512 KiB desc: 2x256 KiB
L3: 3 MiB desc: 1x3 MiB
Speed (MHz): avg: 1733 high: 2550 min/max: 1200/3300 scaling:
driver: intel_cpufreq governor: schedutil cores: 1: 1197 2: 1197 3: 2550
4: 1988 bogomips: 20752
Flags: avx ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities: <filter>
Graphics:
Device-1: Intel 3rd Gen Core processor Graphics vendor: Lenovo driver: i915
v: kernel arch: Gen-7 process: Intel 22nm built: 2012-13 ports:
active: LVDS-1 empty: DP-1, DP-2, DP-3, HDMI-A-1, HDMI-A-2, HDMI-A-3,
VGA-1 bus-ID: 00:02.0 chip-ID: 8086:0166 class-ID: 0300
Device-2: Bison Integrated Camera driver: uvcvideo type: USB rev: 2.0
speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 1-1.6:5 chip-ID: 5986:02d5
class-ID: 0e02
Display: x11 server: X.Org v: 21.1.8 with: Xwayland v: 23.1.2
compositor: kwin_x11 driver: X: loaded: modesetting
alternate: fbdev,intel,vesa dri: crocus gpu: i915 display-ID: :0
screens: 1
Screen-1: 0 s-res: 1600x900 s-dpi: 96 s-size: 423x238mm (16.65x9.37")
s-diag: 485mm (19.11")
Monitor-1: LVDS-1 model: LG Display 0x0362 built: 2011 res: 1600x900
hz: 60 dpi: 132 gamma: 1.2 size: 309x174mm (12.17x6.85") diag: 355mm (14")
ratio: 16:9 modes: 1600x900
API: OpenGL v: 4.2 Mesa 23.1.3 renderer: Mesa Intel HD Graphics 4000 (IVB
GT2) direct-render: Yes
Audio:
Device-1: Intel 7 Series/C216 Family High Definition Audio vendor: Lenovo 7
driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:1e20
class-ID: 0403
API: ALSA v: k6.4.2-zen1-1-zen status: kernel-api tools: N/A
Server-1: sndiod v: N/A status: off tools: aucat,midicat,sndioctl
Server-2: PipeWire v: 0.3.73 status: active with: 1: pipewire-pulse
status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
Device-1: Intel 82579LM Gigabit Network vendor: Lenovo driver: e1000e
v: kernel port: 5080 bus-ID: 00:19.0 chip-ID: 8086:1502 class-ID: 0200
IF: enp0s25 state: down mac: <filter>
Device-2: Intel Centrino Advanced-N 6205 [Taylor Peak] driver: iwlwifi
v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 bus-ID: 03:00.0
chip-ID: 8086:0085 class-ID: 0280
IF: wlp3s0 state: up mac: <filter>
Bluetooth:
Device-1: Broadcom BCM20702 Bluetooth 4.0 [ThinkPad] driver: btusb v: 0.8
type: USB rev: 2.0 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-1.4:4
chip-ID: 0a5c:21e6 class-ID: fe01 serial: <filter>
Report: bt-adapter ID: hci0 rfk-id: 2 state: up address: <filter>
Drives:
Local Storage: total: 733.14 GiB used: 97.27 GiB (13.3%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/sda maj-min: 8:0 vendor: Western Digital
model: WD5000LPCX-75VHAT1 size: 465.76 GiB block-size: physical: 4096 B
logical: 512 B speed: 6.0 Gb/s tech: HDD rpm: 5400 serial: <filter>
fw-rev: 1A05 scheme: GPT
ID-2: /dev/sdb maj-min: 8:16 vendor: SK Hynix model: SC210 mSATA 256GB
size: 238.47 GiB block-size: physical: 512 B logical: 512 B speed: 3.0 Gb/s
tech: SSD serial: <filter> fw-rev: 1L00 scheme: GPT
ID-3: /dev/sdc maj-min: 8:32 model: General USB Flash Disk size: 28.91 GiB
block-size: physical: 512 B logical: 512 B type: USB rev: 3.2 spd: 5 Gb/s
lanes: 1 mode: 3.2 gen-1x1 tech: SSD serial: <filter> fw-rev: 1100
scheme: MBR
SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
Partition:
ID-1: / raw-size: 24 GiB size: 24 GiB (100.00%) used: 15.67 GiB (65.3%)
fs: btrfs dev: /dev/sdb2 maj-min: 8:18
ID-2: /boot/efi raw-size: 255 MiB size: 251 MiB (98.45%)
used: 562 KiB (0.2%) fs: vfat dev: /dev/sdb1 maj-min: 8:17
ID-3: /home raw-size: 214.22 GiB size: 214.22 GiB (100.00%)
used: 81.6 GiB (38.1%) fs: btrfs dev: /dev/sdb3 maj-min: 8:19
ID-4: /var/log raw-size: 24 GiB size: 24 GiB (100.00%)
used: 15.67 GiB (65.3%) fs: btrfs dev: /dev/sdb2 maj-min: 8:18
ID-5: /var/tmp raw-size: 24 GiB size: 24 GiB (100.00%)
used: 15.67 GiB (65.3%) fs: btrfs dev: /dev/sdb2 maj-min: 8:18
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 7.58 GiB used: 0 KiB (0.0%) priority: 100
dev: /dev/zram0
Sensors:
System Temperatures: cpu: 54.0 C mobo: N/A
Fan Speeds (RPM): fan-1: 3603
Info:
Processes: 212 Uptime: 7m wakeups: 1 Memory: available: 7.58 GiB
used: 2.49 GiB (32.8%) Init: systemd v: 253 default: graphical
tool: systemctl Compilers: gcc: 13.1.1 Packages: pm: pacman pkgs: 1254
libs: 344 tools: octopi,pamac,paru Shell: fish v: 3.6.1 default: Bash
v: 5.1.16 running-in: konsole inxi: 3.3.27
Garuda (2.6.16-1):
System install date:     2023-07-04
Last full system update: 2023-07-10
Is partially upgraded:   No
Relevant software:       snapper NetworkManager dracut
Windows dual boot:       No/Undetected
Failed units

and here is me trying to use bash....

╭─user@newruda in ~
╰─λ echo $SHELL
/bin/bash

╭─user@newruda in ~
╰─λ usb=/dev/sdc
fish: Unsupported use of '='. In fish, please use 'set usb /dev/sdc'.

So, how can I make fish shut up so bash can work?

So, you’re asking about something unrelated to your real problem here and not even providing any context of the problem.

describes getting packages ready for different Linux distros, but no instruction for Arch

It just describes how to build the source code, it doesn’t matter which distribution are you using, you just need to install the dependencies to build it: pacman -Syu --needed mtools make git will install them for Garuda.

so I’m trying to make a persistent Parrot USB stick

How’s that related to the forum thread?

and here is me trying to use bash…

It literally gives you the solution… please use ‘set usb /dev/sdc’

So, how can I make fish shut up so bash can work?

Just writing bash there?

6 Likes

The system shell is already Bash, which is why the chsh command is having no effect. The terminal is running Fish because of a profile set in Konsole. If you check your Konsole settings, you will see it is set to run /bin/fish automatically whenever the terminal is opened.

That’s right, just run bash and it will switch you back to the Bash shell.

4 Likes

I guess I’m just confused by the fact that I checked which shell was in use and it said bash but then fish said it didn’t like the syntax.

Yes Sir, I’m aware of that as a general statement, but it does matter when the repos have different names for the same things and when the script you are trying to use is just a bunch of apt-get commands. When I started, I had planned on doing it all with Garuda, of course, but after a bit of time looking for alternative package names I thought it might be quicker to just make a Parrot stick. I also have a suspicion that this bios tutorial might not work anymore and if I were using something Debian based it would save me a lot of headache to find that out quicker. Anyway, I guess I’m just a bit frustrated that what seemed to me to be the most efficient approach, which is something that should be easy for me, I’m having trouble with for reasons that seem to me absurd.

Yes Sir. I think that’s what I’m afraid of. I’ve had those installed as long as I can remember (I think 2/3 come preinstalled in Garuda; maybe all 3) and it’s just not working for me. At least if it doesn’t work in Parrot I’ll be able to just let it go. I was just so happy and refreshed when I searched for a solution to my battery problem and read that only Linux could fix it. Now, you said

Yes, it sure does, doesn’t it. I saw that too; even tried it. But if you give into fish’ s demands once, it just wants more, and the next command isn’t as easy to fix as that first one, at least, not for me. Here’s what fish has to say about it…

╭─user@newruda in ~ took 11ms
╰─λ set usb /dev/sdc

╭─user@newruda in ~ took 7ms
╰─λ sudo fdisk $usb <<< $(printf "n\np\n\n\n\nw")
[sudo] password for user:
fdisk: bad usage
Try 'fdisk --help' for more information.

I think some of the fdisk options have probably changed since that tutorial was written. Oh, it’s this tutorial, by the way. Adding Persistence to a Kali Linux Live USB Drive | Kali Linux Documentation
I will get the stick made. I have many ideas for that. I think I’m just frustrated that I have to stop work on one problem to deal with another problem that I thought I had figured out long ago.

And as for this,

Well, I’ve tried that 2 ways. The first it doesn’t see the device even though lsblk says it’s there…

╭─user@newruda in ~ took 4ms
[🔍] × lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 465.8G  0 disk
├─sda1   8:1    0   300M  0 part
├─sda2   8:2    0    32G  0 part
└─sda3   8:3    0 433.5G  0 part
sdb      8:16   0 238.5G  0 disk
├─sdb1   8:17   0   255M  0 part /boot/efi
├─sdb2   8:18   0    24G  0 part /var/tmp
│                                /var/log
│                                /var/cache
│                                /root
│                                /srv
│                                /
├─sdb3   8:19   0 214.2G  0 part /home
└─sdb4   8:20   0     7M  0 part
sdc      8:32   1  28.9G  0 disk
├─sdc1   8:33   1   4.9G  0 part
└─sdc2   8:34   1   896K  0 part
sr0     11:0    1   7.5G  0 rom
zram0  254:0    0   7.6G  0 disk [SWAP]

╭─user@newruda in ~ took 8ms
╰─λ bash usb=/dev/sdc
bash: usb=/dev/sdc: No such file or directory

and the second, well, I will just say, if I could change one single thing about Garuda, it most definitely would not come with “find-the-command”… I uninstalled and commented out the line in config.fish about it a long time ago…and still it’s a headache.

╭─user@newruda in ~
[🔴] × bash
bash: /usr/share/doc/find-the-command/ftc.bash: No such file or directory

So, you are breaking the distro and asking why it behaves bad. Also bash usb=/dev/sdc doesn't make any sense... Then...

Reinstall find-the-command or configure the rc file of the shell to not use it and then just write bash, without any arguments and once the new she'll opens, you can work there using bash syntax.

3 Likes

I find this package to be a nuisance as well.

The reason you are getting that error when you run bash is because the moment you switch to Bash, it sources .bashrc. You will have to comment out the line that calls find-the-command in your .bashrc as well.

5 Likes

Thank you for that!! I actually looked for that line in .bashrc before and didn’t see it but, since you mentioned it, I looked again and saw it right away. I haven’t tried again yet, but I bet it just might work now.

Nope. Fish is still complaining about the way I'm addressing bash and i guess it's stopping bash from working. At least, that's what it looks like to me. I don't want to mess up my Garuda, so I think I shouldn't need persistence anyway. I should report this to the fish team if this is really what it looks like because this seems like something they may have not intended....for fish to interrupt a bash session and prevent productivity.

╭─user@newruda in ~/Documents/iso/linux as 🧙 took 22ms
╰─λ usb=/dev/sdd
fish: Unsupported use of '='. In fish, please use 'set usb /dev/sdd'.


╭─user@newruda in ~/Documents/iso/linux as 🧙 took 22ms
[🔴] × echo $SHELL
/bin/bash

In your example there, it does not look like you have switched to Bash--unless you have gone ahead and set up Starship in Bash as well. Don't forget, each time you open a new terminal it will automatically switch to Fish because of the Konsole profile.

It may be helpful to download xfce4-terminal, and just use that for this thing you are working on so you don't have to worry about Fish at all.

5 Likes

Yes, I did wonder if a different terminal would help, so thank you for that. I will remember that if I ever have this problem again but, for now, I’ve abandoned the persistence idea. I think I can get it done in one shot. I know this doesn’t pertain to Garuda, but just an update for anyone interested…now that I’ve tried the procedure in Parrot I think it may still work, but the Parrot terminal crashes every time I enter a command to configure the bios build. I found a tutorial in which they used kubuntu for this and I’m downloading it now.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.