Unable to run files under /profile.d

Hello everyone. I'm having some issues with my system. I wanted to change the default konsole prompt to something else using fish_config. But when that didn't work I installed oh-my-fish and that didn't work either so I removed it also. But now not only can't change the konsole prompt, the files under /etc/profile.d are not running also. I tried sourcing ~/.profile, /etc/profile but its not working. So can someone help me. I appreciate any help.

Here is my inxi -Faz

System:
Kernel: 5.15.10-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.1.0
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=f5872255-22fe-430c-8410-37f46767bc01 rw rootflags=subvol=@
quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
systemd.unified_cgroup_hierarchy=1
resume=UUID=8a6a7f05-a582-4586-b941-2ce01745d611 loglevel=3
Desktop: KDE Plasma 5.23.4 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11
vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Laptop System: Dell product: Inspiron 5559 v: N/A
serial: Chassis: type: 10 serial:
Mobo: Dell model: 063W6M v: A00 serial:
UEFI-[Legacy]: Dell v: 1.7.0 date: 05/10/2019
Battery:
ID-1: BAT0 charge: 1.7 Wh (100.0%) condition: 1.7/41.4 Wh (4.1%)
volts: 16.6 min: 14.8 model: LGC-LGC2.80 DELL 991XP69 type: Li-poly
serial: status: Full
CPU:
Info: model: Intel Core i7-6500U bits: 64 type: MT MCP arch: Skylake
family: 6 model-id: 0x4E (78) stepping: 3 microcode: 0xEA
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: 4 MiB desc: 1x4 MiB
Speed (MHz): avg: 3058 high: 3077 min/max: 400/3100 scaling:
driver: intel_pstate governor: performance cores: 1: 3047 2: 3044 3: 3077
4: 3065 bogomips: 20799
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Vulnerabilities:
Type: itlb_multihit status: KVM: VMX disabled
Type: l1tf
mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
Type: mds mitigation: Clear CPU buffers; SMT vulnerable
Type: meltdown mitigation: PTI
Type: spec_store_bypass
mitigation: Speculative Store Bypass disabled via prctl
Type: spectre_v1
mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional,
IBRS_FW, STIBP: conditional, RSB filling
Type: srbds mitigation: Microcode
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: Intel Skylake GT2 [HD Graphics 520] vendor: Dell driver: i915
v: kernel bus-ID: 00:02.0 chip-ID: 8086:1916 class-ID: 0300
Device-2: Intel Intel RealSense 3D Camera (Front F200) type: USB
driver: uvcvideo bus-ID: 2-3:2 chip-ID: 8086:0a66 class-ID: 0e02
serial:
Display: x11 server: [X.Org](http://X.Org) 1.21.1.2 compositor: kwin_x11 driver:
loaded: intel unloaded: modesetting alternate: fbdev,vesa display-ID: :0
screens: 1
Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2")
s-diag: 582mm (22.9")
Monitor-1: eDP1 res: 1920x1080 hz: 60 dpi: 143
size: 340x190mm (13.4x7.5") diag: 389mm (15.3")
OpenGL: renderer: Mesa Intel HD Graphics 520 (SKL GT2) v: 4.6 Mesa 21.3.2
direct render: Yes
Audio:
Device-1: Intel Sunrise Point-LP HD Audio vendor: Dell
driver: snd_hda_intel v: kernel alternate: snd_soc_skl bus-ID: 00:1f.3
chip-ID: 8086:9d70 class-ID: 0403
Sound Server-1: ALSA v: k5.15.10-zen1-1-zen running: yes
Sound Server-2: JACK v: 1.9.19 running: no
Sound Server-3: PulseAudio v: 15.0 running: no
Sound Server-4: PipeWire v: 0.3.42 running: yes
Network:
Device-1: Intel Wireless 3160 driver: iwlwifi v: kernel bus-ID: 01:00.0
chip-ID: 8086:08b3 class-ID: 0280
IF: wlp1s0 state: up mac:
Device-2: Realtek RTL810xE PCI Express Fast Ethernet vendor: Dell
driver: r8169 v: kernel port: e000 bus-ID: 02:00.0 chip-ID: 10ec:8136
class-ID: 0200
IF: enp2s0 state: down mac:
Bluetooth:
Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8
bus-ID: 1-8:4 chip-ID: 8087:07dc class-ID: e001
Report: bt-adapter note: tool can't run ID: hci0 rfk-id: 0 state: down
bt-service: N/A rfk-block: hardware: no software: no address: N/A
Drives:
Local Storage: total: 931.51 GiB used: 24.3 GiB (2.6%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/sda maj-min: 8:0 vendor: Western Digital
model: WD10JPVX-75JC3T0 size: 931.51 GiB block-size: physical: 4096 B
logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 5400 serial:
rev: 1A02 scheme: MBR
Partition:
ID-1: / raw-size: 278.72 GiB size: 278.72 GiB (100.00%)
used: 24.3 GiB (8.7%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
ID-2: /home raw-size: 278.72 GiB size: 278.72 GiB (100.00%)
used: 24.3 GiB (8.7%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
ID-3: /var/log raw-size: 278.72 GiB size: 278.72 GiB (100.00%)
used: 24.3 GiB (8.7%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
ID-4: /var/tmp raw-size: 278.72 GiB size: 278.72 GiB (100.00%)
used: 24.3 GiB (8.7%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 11.4 GiB used: 2 MiB (0.0%) priority: 100
dev: /dev/zram0
ID-2: swap-2 type: partition size: 4.65 GiB used: 0 KiB (0.0%)
priority: -2 dev: /dev/sda6 maj-min: 8:6
Sensors:
System Temperatures: cpu: 55.0 C pch: 49.5 C mobo: 40.0 C sodimm: SODIMM C
Fan Speeds (RPM): cpu: 0
Info:
Processes: 226 Uptime: 5m wakeups: 1 Memory: 11.4 GiB
used: 2.13 GiB (18.7%) Init: systemd v: 249 tool: systemctl Compilers:
gcc: 11.1.0 clang: 13.0.0 Packages: pacman: 1771 lib: 517 Shell: fish
v: 3.3.1 running-in: konsole inxi: 3.3.11

And this is my fish.config file

## Set values
# Hide welcome message
set fish_greeting
set VIRTUAL_ENV_DISABLE_PROMPT "1"
set -x MANPAGER "sh -c 'col -bx | bat -l man -p'"

## Export variable need for qt-theme
if type "qtile" >> /dev/null 2>&1
   set -x QT_QPA_PLATFORMTHEME "qt5ct"
end

# Set settings for https://github.com/franciscolourenco/done
set -U __done_min_cmd_duration 10000
set -U __done_notification_urgency_level low


## Environment setup
# Apply .profile: use this to put fish compatible .profile stuff in
if test -f ~/.fish_profile
  source ~/.fish_profile
end

# Add ~/.local/bin to PATH
if test -d ~/.local/bin
    if not contains -- ~/.local/bin $PATH
        set -p PATH ~/.local/bin
    end
end

# Add depot_tools to PATH
if test -d ~/Applications/depot_tools
    if not contains -- ~/Applications/depot_tools $PATH
        set -p PATH ~/Applications/depot_tools
    end
end


## Starship prompt
if status --is-interactive
   source ("/usr/bin/starship" init fish --print-full-init | psub)
end

## Advanced command-not-found hook
source /usr/share/doc/find-the-command/ftc.fish

## Functions
# Functions needed for !! and !$ https://github.com/oh-my-fish/plugin-bang-bang
function __history_previous_command
  switch (commandline -t)
  case "!"
    commandline -t $history[1]; commandline -f repaint
  case "*"
    commandline -i !
  end
end

function __history_previous_command_arguments
  switch (commandline -t)
  case "!"
    commandline -t ""
    commandline -f history-token-search-backward
  case "*"
    commandline -i '$'
  end
end

if [ "$fish_key_bindings" = fish_vi_key_bindings ];
  bind -Minsert ! __history_previous_command
  bind -Minsert '$' __history_previous_command_arguments
else
  bind ! __history_previous_command
  bind '$' __history_previous_command_arguments
end

# Fish command history
function history
    builtin history --show-time='%F %T '
end

function backup --argument filename
    cp $filename $filename.bak
end

# Copy DIR1 DIR2
function copy
    set count (count $argv | tr -d \n)
    if test "$count" = 2; and test -d "$argv[1]"
	set from (echo $argv[1] | trim-right /)
	set to (echo $argv[2])
        command cp -r $from $to
    else
        command cp $argv
    end
end

## Useful aliases
# Replace ls with exa
alias ls='exa -al --color=always --group-directories-first --icons' # preferred listing
alias la='exa -a --color=always --group-directories-first --icons'  # all files and dirs
alias ll='exa -l --color=always --group-directories-first --icons'  # long format
alias lt='exa -aT --color=always --group-directories-first --icons' # tree listing
alias l.="exa -a | egrep '^\.'"                                     # show only dotfiles

# Replace some more things with better alternatives
alias cat='bat --style header --style rules --style snip --style changes --style header'
[ ! -x /usr/bin/yay ] && [ -x /usr/bin/paru ] && alias yay='paru'

# Common use
alias grubup="sudo update-grub"
alias fixpacman="sudo rm /var/lib/pacman/db.lck"
alias tarnow='tar -acf '
alias untar='tar -zxvf '
alias wget='wget -c '
alias rmpkg="sudo pacman -Rdd"
alias psmem='ps auxf | sort -nr -k 4'
alias psmem10='ps auxf | sort -nr -k 4 | head -10'
alias upd='/usr/bin/update'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias ......='cd ../../../../..'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias hw='hwinfo --short'                                   # Hardware Info
alias big="expac -H M '%m\t%n' | sort -h | nl"              # Sort installed packages according to size in MB
alias gitpkg='pacman -Q | grep -i "\-git" | wc -l'			# List amount of -git packages

# Get fastest mirrors
alias mirror="sudo reflector -f 30 -l 30 --number 10 --verbose --save /etc/pacman.d/mirrorlist"
alias mirrord="sudo reflector --latest 50 --number 20 --sort delay --save /etc/pacman.d/mirrorlist"
alias mirrors="sudo reflector --latest 50 --number 20 --sort score --save /etc/pacman.d/mirrorlist"
alias mirrora="sudo reflector --latest 50 --number 20 --sort age --save /etc/pacman.d/mirrorlist"

# Help people new to Arch
alias apt='man pacman'
alias apt-get='man pacman'
alias please='sudo'
alias tb='nc termbin.com 9999'

# Cleanup orphaned packages
alias cleanup='sudo pacman -Rns (pacman -Qtdq)'

# Get the error messages from journalctl
alias jctl="journalctl -p 3 -xb"

# Recent installed packages
alias rip="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -200 | nl"


## Run paleofetch if session is interactive
if status --is-interactive
   neofetch
end

Please, read and edit your post

Sorry for the mess and thanks

1 Like

There is also another user currently having troubles with this. I couldn’t find much info. How did you install/uninstall it?

What do you mean here exactly?
Maybe an ownership issue? Everything in /etc should belong to root, anything in ~ to the user.
Maybe you can check with
ls /etc/profile.d

3 Likes

I installed oh-my-fish by cloning it git repo. You can find more info in. GitHub - oh-my-fish/oh-my-fish: The Fish Shell Framework. To uninstall it you can simply run omf destroy

1 Like

This is the out put of ls /etc/profile.d

ls /etc/profile.d
lrwxrwxrwx   37 root 19 Dec 22:06 ď’‰ conky-start.sh -> /home/aleruss/.conky/conky-startup.sh
.rwxr-xr-x   74 root 17 Dec 03:07 ď’‰ flutter.csh
.rwxr-xr-x   73 root 17 Dec 03:07 ď’‰ flutter.sh
.rw-r--r--  545 root  2 Dec 17:24 ď’‰ freetype2.sh
.rw-r--r-- 1.1k root 29 Oct 08:57 ď’‰ gawk.csh
.rw-r--r--  757 root 29 Oct 08:57 ď’‰ gawk.sh
.rw-r--r--  105 root 31 Aug 22:06 ď’‰ gpm.sh
.rw-r--r--  207 root 16 May  2020 ď’‰ jre.csh
.rw-r--r--  205 root 16 May  2020 ď’‰ jre.sh
.rw-r--r--   40 root 20 Dec 07:10 ď’‰ libinput.sh
.rw-r--r--  766 root  7 Dec 05:41 ď’‰ locale.sh
.rw-r--r--   22 root  2 Dec 15:05 ď’‰ mercurial.sh
.rw-r--r--  468 root 13 Nov 23:22 ď’‰ perlbin.csh
.rw-r--r--  464 root 13 Nov 23:22 ď’‰ perlbin.sh
.rw-r--r--  963 root  5 Dec 17:55 ď’‰ vte.csh
.rw-r--r-- 1.9k root  5 Dec 17:55 ď’‰ vte.sh

strong text

That “pattern” is OK in my opinion.
Why don’t you simply try resetting the Fish config with the relevant flag in the Garuda Assistant?

2 Likes

I did try that several times and rebooted my system but still not working. The files I want to start in /etc/profile.d are not still starting and still cant change the konsole prompt

What do you mean precisely with this? Can you make an example?
These are all configuration files, so should not be started/launched, but rather updated/configured, as root, with sudo micro <filename>

1 Like

Ok here is what I want. I want to start the files conky-start.sh and libinput.sh at startup. The conky-start.sh as you have probably guessed it, is for starting a custom conkyrc that i have. And all libinput.sh does is libinput-gestures-setup start because the libinput-gestures wont start in boot. So I added it to /etc/profile.d/. They were working fine until I tried to update fish with oh-my-fish. But they stoped working and I had to start the files manually after the system boot up. I tried to reset the fish config using Garuda-Assistant but they'r still not working.

I'm afraid this goes in my opinion a little beyhond the normal support we can provide.
You should check your desktop files and autostart entries.
Also the .sh scripts should be checked. E.g. (even if this is an extreme example) sometimes people forget to add #!/bin/sh as first line and make it executable.
If necessary, check a few info in the Arch Wiki https://wiki.archlinux.org/title/KDE#Autostart.
Also search in the forum.
For example for libinput I remember this one (but it is not necessarily the same problem):
https://forum.garudalinux.org/t/how-to-setup-libinput-gestures-in-kde/13411/11

4 Likes

Ok. Thanks for the info. The problem with libinput is fixed. How about the problem with changing konsole prompt in fish_config. I cant seem to find any solution for that

In our standard config, the prompt in fish is provided by starship.
You can check the relevant "connection" in
~/.config/fish/config.fish

## Starship prompt
if status --is-interactive
   source ("/usr/bin/starship" init fish --print-full-init | psub)
end

And the configuration is here:
~/.config/starship.toml
while the standard config is:
/etc/skel/.config/starship.toml
If you want to change the config or the tool, it is up to you...
For Konsole (but I don't think you were referring to this, if you talk about the prompt), you can go to Settings -> Edit current profile.

3 Likes

How?
Mark the solution, please

One topic, one problem. :slight_smile:

1 Like

same issue because of my fish framework, here's my solution

the problem is here (in ~/.config/fish/config.fish)

## Starship prompt
if status --is-interactive
   source ("/usr/bin/starship" init fish --print-full-init | psub)
end

and here's the solution once comment these lines the fish works fine


## Starship prompt
# if status --is-interactive
#    source ("/usr/bin/starship" init fish --print-full-init | psub)
# end

then you can remove the theme or remove oh my fish

@ale1 Try this solution it may work fine for you

1 Like

Thanks man. That's one way for solving the issue with changing the console prompt theme. Another way is editing the file in ~/.config/starship.toml without commenting out the /usr/bin/starship in ~/.config/fish/confi.fish . Since fish uses /usr/bin/starship for handling the console prompt theme, you can change the theme by editing the ~/.config/starship.toml file. You can find more info here about how to edit the starship.toml file.

2 Likes

good job @ale1

1 Like

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