You are not logged in.
Hello everyone.
Today i'm trying to find a solution for my small problem - i would like to use i3lock instead default one. I have always struggled when tried to properly setup i3lock and than do something in order it to autolock session in idle activity. I used xautlock but on plasa it just does not work, or i don't know how to do it.
I have installed
-xautolock
-i3lock
I created in ~/.config/autostart/i3lock.sh file and placed this:
#!/bin/bash
xautolock -time 1 -locker '/usr/bin/i3lock -c 111111' &I did a chmod +x on i3lock.sh but after one minute in idle, it just does not lock session. Could somebody tell me what i did wrong here? I'm not asking about service files that should be in /etc/systemd/system because i do not ask about lock session after suspend/resume.
i3lock works with shortcut (i have ctrl+alt+b) and i see that it block with key combinations, but how to do this to automatically lock session? I tried to choose i3lock.sh with Plasma startup service in systemsettings but it does not work also. I did exacly the same thing that i always done for KDE4 but here i just cant set it.
Plase help.
Last edited by firekage (2015-10-26 21:25:25)
Offline
I don't use KDE, but according to the XDG specification, only .desktop files in $XDG_CONFIG_HOME/autostart are detected by whatever XDG-compliant environment is turning.
Offline
I added to .bashrc this:
/usr/bin/xautolock -time 1 -locker /usr/bin/i3lock -c 111111 &Does not work.
I added something like this
[firekage@Arch_BX_100 /etc/systemd/system]$ cat i3lock_screenlocker.service
[Unit]
Description=Lock the screen automatically after a timeout
[Service]
Type=simple
User=firekage
Environment=Display=:0
ExecStart=/usr/bin/xautolock -time 1 -locker /usr/bin/i3lock -c 111111
[Install]
WantedBy=graphical.target
[firekage@Arch_BX_100 /etc/systemd/system]$ to /etc/systemd/system/i3lock_screenlocker.service and it does not work at all. I rembember that i had once i3lock running fine, now i don't know where i should look for solution, what to change.
After many tries i found an solution to have working i3lock.
1. Firstly, create in /usr/lib file named, for an example, i3locker, so path sould be /usr/bin/i3locker
#!/bin/bash
i3lock -c 1111112. The only one step to do is to edit ~/.bashrc and add
xautolock -time 1 -locker i3locker &It works.
I tried to do many things based on Debian,. Manjaro, Ubuntu and so on - none of this works. I tried to do a complete, in some way, copy of thread from our Arch forum with i3lock fancy setup based on systemd unit - also, does not work, maybe it works when all the things mentioned would be done but i just wanted to copy main unit file and check it with no i3lock from aur package or git, but default i3lock - does not work.
I don'kt know if my solution is a dirty workaround but it works.
Last edited by firekage (2015-10-26 18:14:21)
Offline
Well, .bashrc is definitely not the place to put these kinds of things, because it is sourced/executed each time you launch a new shell. I would personally put it into .xinitrc, but given that it's KDE, that probably won't work.
Again: a proper solution would be to create a .desktop file and putting it into share/autostart in $KDEHOME.
Offline
I created .desktop file and put it in ~/.config/autostart but it didn't work. Sorry for stupid question - i don't know where is $KDEHOME, i don't have it
I have ~/.kde4/share and in /share i have
apps config kde4no autostart. Only in ~/.config/ i have /autostart but i placed a .desktop file and it did not work. This was my .desktop file in ~/.config/autostart
[Desktop Entry]
Type=Application
Exec=xautolock -time 1 -locker 'usr/bin/i3lock -c 111111' &
X-GNOME-Autostart-enabled=true
Name=i3lockLast edited by firekage (2015-10-26 21:25:01)
Offline
1.
[firekage@Arch_BX_100 ~]$ echo $KDEHOME
[firekage@Arch_BX_100 ~]$ 2.
[firekage@Arch_BX_100 ~]$ echo $KDEDIR
[firekage@Arch_BX_100 ~]$ Offline
have you tried
xautolock -time 1 -locker "/usr/bin/i3lock -c 111111"
notice the syntax.
Last edited by bleach (2015-10-26 22:28:00)
Offline
have you tried
xautolock -time 1 -locker "/usr/bin/i3lock -c 111111"notice the syntax.
The syntax has "" in command. Yes i tried it with "" and with '' signs. BTW, your command should be placed where?
I don't know if i did this time right, but i was able to do something like this, i created again file named i3lock.desktop and i put it in ~/.config/autostart:
[Desktop Entry]
Name=i3lock.desktop
Comment=i3lock desktop utility
Exec=xautolock -time 1 -locker i3locker
Type=Application
X-GNOME-Autostart-enabled=true
X-KDE-autostart-phase-1As you can see, there is Exec=xautolock -time 1 -locker i3locker, and the "i3locker" is not a "i3lock" but i created in /usr/bin file called i3locker and put this there:
i3lock -c 111111 &and this together works - still, don't know if this is dirty workaroud or ok solution.
Offline
is not kde in ~/.kde/autostart
Last edited by bleach (2015-10-26 22:28:30)
Offline
No, my working config that i created is in ~/.config/autostart.
Offline
ok well the script works so I would say something is wrong there.
Offline
There is no ./kde/autostart path with KF5 aka Plasma. You have ~/.config/autostart or ~/.kde4/ paths.
Offline