You are not logged in.

#1 2021-03-07 01:39:44

dlk
Member
Registered: 2021-02-26
Posts: 25

Strange startup problem with fish

A bit of context before:
1) I use fish as my default shell
2) Today i was helping a friend setting up a script to run at startup end we inserted it in the /etc/rc.local file but we made an error and we deleated it then i decided to paste him the content of my rc.local, that i never touched before... and it was empty.
3) I am running dwm without any desktop manager (i think they are called that , staff as lightdm) and i inserted in my ~/.config/fish/config.fish the usual if to autostart the xserver

Now we come to the problem, when i shut down dwm with the key combination and inserted my credential i got some "errors" and then x didnt start. i decided to investigate i hopped into the root user and swaped to bash and then the x server started.

I decided to uninstall oh-my-fish cause the errors were about its files but that didn't solved the issue.

I also decided to remove the if statement around the starx in the config.fish and now starts but ... i can't use the terminal it gives me some errors and then quits

I was wondering if the rc.local content magically disappearing may have caused this problem cause i didn't change anything else (exept my dunstrc file but ... it's dunst ok -.- i don't actually think that is the problem)

This is the terminal staff

X.Org X Server 1.20.10
X Protocol Version 11, Revision 0
Build Operating System: Linux Arch Linux
Current Operating System: Linux archbook 5.11.2-zen1-1-zen #1 ZEN SMP PREEMPT Fri, 26 Feb 2021 18:26:44 +0000 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux-zen root=UUID=1576fba5-59f5-4a54-9b98-812ada66c0d8 rw loglevel=3 quiet
Build Date: 14 December 2020  12:10:29PM

Current version of pixman: 0.40.0
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/home/mattia/.local/share/xorg/Xorg.1.log", Time: Sun Mar  7 02:30:28 2021
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(EE)
Fatal server error:
(EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied)
(EE)
(EE)
Please consult the The X.Org Foundation support
	 at http://wiki.x.org
 for help.
(EE) Please also check the log file at "/home/mattia/.local/share/xorg/Xorg.1.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.

PS: if i use bash as the default shell i can use the terminal (but i get the errors, the difference is that i can Ctrl+C the process and the terminal doesn't die out)
PPS: i don't know if x started or not but i assumed that cause i got stack in the tty

Last edited by dlk (2021-03-07 01:44:54)

Offline

#2 2021-03-07 01:46:05

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Strange startup problem with fish

Where did you get the idea to use rc.local?
Arch hasn't used it since the systemd switchover 10 years ago...

You mention 'some errors' several times in your post. You need to actually tell us what they are.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2021-03-07 07:48:45

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,552

Re: Strange startup problem with fish

X11 tries to start on :1 (ie. there's already/still a server on :0?) and fails becuse the https://wiki.archlinux.org/index.php/Xorg#Rootless_Xorg conditions aren't met.
That's not related to any shell, but a configuration problem.

Offline

#4 2021-03-07 10:29:17

dlk
Member
Registered: 2021-02-26
Posts: 25

Re: Strange startup problem with fish

to Slithery my friend had a raspberry pi with raspberry OS lite on it and we got the idea from internet, i suggested him to use the .bashrc but he was very strong on not needing to login in order to start the service.
The "errors" i didnt tell you about are the omf errors but, as obvious as it seems, when i removed omf they disappeared, now i only get pointed to line 5 of my config.fish
specifically to the startx

this is the content of the config.fish:

# Start X at login
if status --is-login
  if test -z "$DISPLAY" -a $XDG_VTNR = 1
    export PATH=$HOME/.local/bin:$PATH
    exec startx
  end
end

to seth, i don't know cause this issue "survived" a reboot and i can actually enter in the x session (now i am in) i think there is also a fish error cause when i start with fish i get stack in tty and the shell points me to the config.fish line that starts x and then greets me in fish with the annoying as heck default welcome prompt and doesn't recognize a lot of commands like chsh or nvim and also startx so maybe we have a conjunction problem between the x server and fish

~/.config/fish/config.fish (line 5)
             startx
             ^
from sourcing file ~/.config/fish/config.fish
           called during starup
Welcome to the ... (fish welcome prompt)

Last edited by dlk (2021-03-07 11:24:16)

Offline

#5 2021-03-07 13:40:33

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,552

Re: Strange startup problem with fish

I'd assume the $PATH in fish is broken?

this issue "survived" a reboot and i can actually enter in the x session

The failing server does not relate to a broken fish setup, failing to resolve startx.
Either your xinitrc is broken (see the link in my signature) or your xserverrc is or something else was/is. Is your X11 server running as root right now?

Offline

#6 2021-03-07 13:49:34

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Strange startup problem with fish

Which Arch OS are you running on your machine?

Raspberry Pi OS Lite which your friend is running is a Debian based distro, it has nothing to do with Arch.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#7 2021-03-08 08:47:27

dlk
Member
Registered: 2021-02-26
Posts: 25

Re: Strange startup problem with fish

i am running mainline arch and the problem i shared in the first post i trought about it and it could be that every time i start a terminal bash is launched, bash executes the .bashrc and tries to run startx and it conflicts with the running xserver of my graphical environment so that isn't a problem
I just need to work on my .bashrc my biggest problem now is fish beeing "dumb" in tty, in the sens that it doesn't understand commands (like startx) and so i can't start xorg with that

Edit: I am on linux-zen 5.11.2 if that matters

Last edited by dlk (2021-03-08 11:15:46)

Offline

#8 2021-03-08 14:12:50

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,552

Re: Strange startup problem with fish

Slithery didn't ask about the kernel, but which derivate you're running because your comments do not convince that you could possibly have managed to install archlinux.

I just need to work on my .bashrc my biggest problem now is fish

Fish won't care about your bashrc, again: your not setting or actively damaging the $PATH variable in fish which is why "startx" etc. cannot be resolved - you'd have to address them by their full path like /usr/bin/startx

Offline

Board footer

Powered by FluxBB