Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Autostart Problem unter KDE [gelöst]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
deranonyme
Guru
Guru


Joined: 09 Jul 2005
Posts: 508

PostPosted: Fri Jan 12, 2024 4:43 pm    Post subject: Autostart Problem unter KDE [gelöst] Reply with quote

Ich möchte gern KeepassXC per autostart starten und sein Passwort dabei aus kwallet auslesen lassen. Der Start lässt sich von der shell her gut ausführen:
Code:
kwallet-query -f 'Passwörter' -r 'KeePassXC' kdewallet | keepassxc --pw-stdin ~/Daten/Dokumente/KeePass/FranksKeePassDatabase.kdbx


Aber der autostart funktioniert nicht. Hier die Autostartdatei:
Code:

[Desktop Entry]
Comment[de_DE]=
Comment=Opens Your password storage and enters the password stored in KWallet
Exec=kwallet-query -f 'Passwörter' -r 'KeePassXC' kdewallet | keepassxc --pw-stdin ~/Daten/Dokumente/KeePass/FranksKeePassDatabase.kdbx
GenericName[de_DE]=
GenericName=
Icon=
MimeType=
Name[de_DE]=KeePassXC.desktop
Name=KeePassXC.desktop
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-KDE-SubstituteUID=false
X-KDE-Username=


Das Log wirft folgendes aus:
Code:
Jan 12 17:36:28 franks systemd[1023]: Started app-KeePassXC-489fb743490f46139fa2008e5c8030cf.scope.
Jan 12 17:36:48 franks systemd[1023]: /run/user/1004/systemd/generator.late/app-KeePassXC@autostart.service:18: WorkingDirectory= path is not absolute, ignoring:
Jan 12 17:36:50 franks systemd[1023]: Starting app-KeePassXC@autostart.service...
Jan 12 17:36:51 franks systemd[1023]: Started app-KeePassXC@autostart.service.
Jan 12 17:36:52 franks systemd[1023]: app-KeePassXC@autostart.service: Main process exited, code=exited, status=1/FAILURE
Jan 12 17:36:52 franks systemd[1023]: app-KeePassXC@autostart.service: Failed with result 'exit-code'.


Woran kann das liegen?


Last edited by deranonyme on Sat Jan 13, 2024 7:17 am; edited 1 time in total
Back to top
View user's profile Send private message
Banana
Veteran
Veteran


Joined: 21 May 2004
Posts: 1392
Location: Germany

PostPosted: Fri Jan 12, 2024 4:59 pm    Post subject: Reply with quote

Da steht zwar " path is not absolute, ignoring:", vielleicht hilft es wenn es doch absolut ist?
_________________
My personal space
My delta-labs.org snippets do expire

PFL - Portage file list - find which package a file or command belongs to.
Back to top
View user's profile Send private message
firefly
Watchman
Watchman


Joined: 31 Oct 2002
Posts: 5188

PostPosted: Fri Jan 12, 2024 5:08 pm    Post subject: Reply with quote

Banana wrote:
Da steht zwar " path is not absolute, ignoring:", vielleicht hilft es wenn es doch absolut ist?


Es geht hierum:
Quote:
WorkingDirectory= path is not absolute, ignoring:

Und WorkingDirectory sehe ich nirgends in der definition der autostart datei
_________________
Ein Ring, sie zu knechten, sie alle zu finden,
Ins Dunkel zu treiben und ewig zu binden
Im Lande Mordor, wo die Schatten drohn.
Back to top
View user's profile Send private message
firefly
Watchman
Watchman


Joined: 31 Oct 2002
Posts: 5188

PostPosted: Fri Jan 12, 2024 5:13 pm    Post subject: Reply with quote

@deranonyme: Sicher dass ~ für "$HOME" in diesem kontext überhaupt funktioniert?
Ersetze das mal testweise mit dem absoluten pfad zur datei. Wenn das funktioniert ersetze den "~" Pfad part mit $HOME
_________________
Ein Ring, sie zu knechten, sie alle zu finden,
Ins Dunkel zu treiben und ewig zu binden
Im Lande Mordor, wo die Schatten drohn.
Back to top
View user's profile Send private message
deranonyme
Guru
Guru


Joined: 09 Jul 2005
Posts: 508

PostPosted: Sat Jan 13, 2024 6:52 am    Post subject: Reply with quote

firefly wrote:
@deranonyme: Sicher dass ~ für "$HOME" in diesem kontext überhaupt funktioniert?
Ersetze das mal testweise mit dem absoluten pfad zur datei. Wenn das funktioniert ersetze den "~" Pfad part mit $HOME


Auch mit den vollen Pfad gibt es kein anderes Ergebnis.
Ich habe mir jetzt mit einer Krücke beholfen. Die Autostartdatei zeigt jetzt auf ein Shell-Skript welches einzig den ausführbaren Befehl enthält. Im Shellskript kann ich mit $HOME oder ~ arbeiten, aber der Pfad in der Autostartdatei muss vollständig eingegeben sein.
Back to top
View user's profile Send private message
firefly
Watchman
Watchman


Joined: 31 Oct 2002
Posts: 5188

PostPosted: Sat Jan 13, 2024 7:20 pm    Post subject: Reply with quote

deranonyme wrote:
firefly wrote:
@deranonyme: Sicher dass ~ für "$HOME" in diesem kontext überhaupt funktioniert?
Ersetze das mal testweise mit dem absoluten pfad zur datei. Wenn das funktioniert ersetze den "~" Pfad part mit $HOME


Auch mit den vollen Pfad gibt es kein anderes Ergebnis.
Ich habe mir jetzt mit einer Krücke beholfen. Die Autostartdatei zeigt jetzt auf ein Shell-Skript welches einzig den ausführbaren Befehl enthält. Im Shellskript kann ich mit $HOME oder ~ arbeiten, aber der Pfad in der Autostartdatei muss vollständig eingegeben sein.


Dann liegt es daran, dass du in deinem befehl den pipe operator nutzt. Und dieser ist nur einer shell bekannt. Der code, welches das exec der autostart datei ausführt versucht direkt den angegebenen befehl, via api call, aufzurufen. Und da existiert keine shell der den befehl beim pipe operator aufsplittet und die beiden parts separat startet.
Was eventuell auch funktioniert hätte wäre den befehl via einer shell auszuführen mit bash würde das z.b. so aussehen
bash -c "<befehl>"

Aber die Verwendung eines shell scripts ist hier die optimalere Lösung(und keine Krücke), weil man so auch komplexere sachen machen kann.
_________________
Ein Ring, sie zu knechten, sie alle zu finden,
Ins Dunkel zu treiben und ewig zu binden
Im Lande Mordor, wo die Schatten drohn.
Back to top
View user's profile Send private message
deranonyme
Guru
Guru


Joined: 09 Jul 2005
Posts: 508

PostPosted: Sat Jan 13, 2024 9:57 pm    Post subject: Reply with quote

Danke für die Erklärung. Dann ist das wirklich okay so.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum