You are not logged in.
Pages: 1
Hi all.
Description:
Just installed clipcat by following this guide here. After installing and config i launch the daemon myself and its works fine.
The problem:
After reboot either systemd or manually can't launch it.
Status show that its active, but dead.
systemctl -user status clipcat.serviceAnd then, when i try to handle it with
clipcatdit return error:
error: Could not call gRPC client, error: Error occurs while connecting to Clipcat Server gRPC endpoint /run/user/1000/clipcat/grpc.sock via local socket, error: transport errorExpected behavior:
Want to add it to auto launch for every boot or login.
Just quick search and can't find similar problem.
What i tried:
Add After key in clipcat.service (just a random advise from GPT)
After=grpc.serviceAdd clipcatd in my .xinitrc config
source /etc/X11/xinit/xinitrc.d/50-systemd-user.sh &
clipcat &
exec sxhkd &
exec bspwmBoth of them has identical error
Hope its will be useful, thx
Offline
Just installed clipcat by following this guide here.
What do you mean? What exactly did you do? Clipcat is in [extra], you should install it from there.
Have you generated the default configs? I can replicate your error when the config files are not present, but once they are generated it runs as expected.
PS: never ask chatbots for such things, its response was completely nonsensical gibberish.
Last edited by Trilby (2024-07-20 15:29:08)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
What do you mean? What exactly did you do?
Well, here's a replay of my steps:
sudo pacman -S clipcatclipcatd default-config ~/.config/clipcat/clipcatd.tomlclipcatd default-config ~/.config/clipcat/clipcatctl.tomlclipcatd default-config ~/.config/clipcat/clipcat-menu.tomlSo, i use fish shell, then i give it completions
clipcatd completions fishThan i integrate it with systemd
touch ~/.config/systemd/user/clipcat.serviceAnd just past default config from git
[Unit]
Description=Clipcat Daemon
PartOf=graphical-session.target
[Install]
WantedBy=graphical-session.target
[Service]
# NOTE: We assume that your `clipcatd` is placed at `/usr/bin/clipcatd`.
ExecStartPre=/bin/rm -f %t/clipcat/grpc.sock
ExecStart=/usr/bin/clipcatd --no-daemon --replace
Restart=on-failure
Type=simpleChech that somethin in /usr/bin/clipcatd
Than i enable and start it via systemctl
systemctl --user enable clipcat.servicesystemctl --user start clipcat.serviceTry clipcat with running clipcat-menu and it works great.
Reload pc to ensure auto start is works.
Check and get an error (
No failed logs shows
systemctl --failedThats it
Just in case, I'll add that I just updated my system this morning by
sudo pacman -SyuOffline
Do not ignore the errors you get at each step. Your attempt to create the default config files was wrong and it would have resulted in clear (rather obnoxious really) error messages.
Create the config directory, then properly (with a ">" redirection) create the default configs. (edit: and with the proper commands for each config - that's three strikes just in trying to create the configs!)
Last edited by Trilby (2024-07-20 17:30:39)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
(with a ">" redirection)
Apologize, i missed the > signs in replay, but in reality i do.
I assumed that I was missing environment variables like XDG_CONFIG_HOME. So i throw it in my fish shell and just in case reinstall clipcat:
- disable it in systemd
- remove all its configs and package itself
- install clipcat again
- generate default configs
clipcatd default-config > $XDG_CONFIG_HOME/clipcat/clipcatd.tomlclipcatd default-config > $XDG_CONFIG_HOME/clipcat/clipcatctl.tomlclipcatd default-config > $XDG_CONFIG_HOME/clipcat/clipcat-menu.toml- add completions for fish
clipcatd completions fish- clipcat.service (default config from git) already exists, so, nothing to do here
- enable and start it
systemctl --user enable clipcat.servicesystemctl --user start clipcat.serviceAfter reboot i see that the daemon is still dead
I will also clarify that the same result when i add clipcat in my .xinitrc
***
clipcatd &
exec bspwmIn fact, the same error occurs if just to launch clipcat-menu with its dead daemon
Offline
You still wrote the clipcatd default config to all three files instead of one for each tool. That should be fixed, though that's pretty unlikely to be the actual problem here as clipcatd is failing.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Damn, I'm being very inconsiderate today
Apologize, i missed the replay again)
I meant
clipcatd default-config > $XDG_CONFIG_HOME/clipcat/clipcatd.toml
clipcatctl default-config > $XDG_CONFIG_HOME/clipcat/clipcatctl.toml
clipcat-menu default-config > $XDG_CONFIG_HOME/clipcat/clipcat-menu.tomlBtw, u right, it doesn't work
Offline
Thanks - that certainly puts the last nail in the coffin of my initial hypothesis. While not a solution, I would recommend setting aside all the systemd service part of this until clipcatd itself can be run from a command line as it should. It's a bit simpler to troubleshoot and see any errors with just running "clipcatd" from the terminal: once that is working, the service should then also work.
As a bit of a longshot (and a bit scattershot) can you please post the complete output of "env" from a terminal within your graphical session (which is where I assume you've tried running "clipcatd" and got the error message).
Last edited by Trilby (2024-07-21 12:34:18)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Sure, just reproduced this error again
Here it is:
PWD=/home/user
nvm_current_version=v18.20.4
XDG_VTNR=1
ALACRITTY_LOG=/tmp/Alacritty-76116.log
ALACRITTY_SOCKET=/run/user/1000/Alacritty-:0-76116.sock
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
BROWSER=/usr/bin/firefox
DISPLAY=:0
XDG_CACHE_HOME=/home/user/.cache
MEMORY_PRESSURE_WATCH=/sys/fs/cgroup/system.slice/system-getty.slice/getty@tty1.service/memory.pressure
VISUAL=micro
SYSTEMD_EXEC_PID=882
XDG_DATA_HOME=/home/user/.local/share
XDG_STATE_HOME=/home/user/.local/state
USER=user
PATH=/home/user/.local/share/nvm/v18.20.4/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
SHELL=/usr/bin/fish
MOTD_SHOWN=pam
EDITOR=micro
LOGNAME=user
INVOCATION_ID=d95adffee75e4b30b62b0922e5a10262
COLORTERM=truecolor
HOME=/home/user
XDG_CONFIG_HOME=/home/user/.config
XDG_SESSION_TYPE=tty
XDG_SESSION_ID=1
XDG_SESSION_CLASS=user
MAIL=/var/spool/mail/user
MEMORY_PRESSURE_WRITE=c29tZSAyMDAwMDAgMjAwMDAwMAA=
WINDOWID=88080387
XDG_RUNTIME_DIR=/run/user/1000
TERM=alacritty
XDG_SEAT=seat0
LANG=C.UTF-8
CREDENTIALS_DIRECTORY=/run/credentials/getty@tty1.service
ALACRITTY_WINDOW_ID=88080387
XAUTHORITY=/home/user/.Xauthority
SHLVL=3
WINDOWPATH=1If I find any solution, I'll post it here
Thx you for your time
Offline
That all looks good. Thanks for providing the information, unfortunately I'm out of ideas of what might be wrong. But I did just search and found this upstream issue which appears to be the same:
https://github.com/xrelkd/clipcat/issues/336
Specifically if /run/user/1000/clipcatd.pid exists, it would be from a previous unclean shutdown. And clipcat does not properly detect this condition at startup but rather gives a bit of a misleading error. If that pid file exists, you could follow the steps on the upstream issue, but it'd bit a lot simpler to ensure all clipcat processes are terminated, then just delete the pid file (and apparently /run/user/1000/clipcat/*) and restart clipcatd.
Last edited by Trilby (2024-07-21 13:19:20)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Just find out that the issue was i start clipcat deamon asynroniusly. Removing "&" sign, everything worked as it should.
I have no idea how such a simple thing didn't occur to me erlier)
source /etc/X11/xinit/xinitrc.d/50-systemd-user.sh &
clipcatd
exec sxhkd &
exec bspwmOffline
Pages: 1