I added these two lines in
/usr/bin/setxkbmap -option “ctrl:swapcaps”
/usr/bin/xcape -e ‘Control_L=Super_L’
But it’s not automatically loaded on startup/login. I have to run
source ./.profile manually every time. What is the cause & any fix?
It would probably be better to add those two commands to
I may be mistaken but as this is a shortcut I think you could put
Before the lines mentioned
Exec=/usr/bin/setxkbmap -option “ctrl:swapcaps”
Reboot the system
T+ = See you later
That would be a bad idea, because
exec replaces the current process with the one it calls.
@Creto : Sorry, you are mistaken.
@Aragorn: Luckily the proposed change is not a call to
Exec= and would set a variable …
zsh the shell you’re using? It uses
~/.zprofile instead of
Understood. But then the content of the variable should be quoted, considering that there are spaces in those commands.
Exec='/usr/bin/setxkbmap -option “ctrl:swapcaps”'
Correct me if I’m wrong, but I believe that the shell used for initializing things like X11 would still be
bash, rather than
I don’t know actually. I do not use
zsh but I’ve found (quite old) infos like this:
I think if
./.bash_login exists the
./profile is ignored for login shell.
Grateful for the correction @freggel.doe
This is the bad custom of using debian’s
T+ = See you later
~/profile is fine. Contents of
emulate sh -c '. ~/.profile'
Thank you for your suggestion. I tried putting the two lines in .bash_profile. But no luck…
Thank you for the suggestion. I’ve just tried and rebooted. It doesn’t work. Should I put prefix like
Exec= to make it work properly?
Oh god. Thank you. I ended up solving the issue by adding the lines to
I don’t know why it doesn’t work in
~/.bash_profile is read only upon login.
~/.bashrc is read every time you start a (
Hello @Teeeeze ,
This is just an idea… Correct me if am wrong
You are trying to swap CTRL with CapsLock …
If so this is the way to do it… ArchWiki
/etc/X11/xorg.conf.d/00-keyboard.conf and add
Option "XkbOptions" "caps:swapcaps"
This is how its suppose to look
Option "XkbLayout" "us"
Option "XkbOptions" "caps:swapescape" <----- Here I swapped caps and escape
Here you can find a list of possible swaps
Just open it with your favorite editor and look through.
As for your
~/.profile it works just fine. The thing that you are trying to do is not suitable for that file.
Again this is just my opinion .
Edit: Restart your PC or Laptop after. This is permanent change. For me it works just fine.
This is the only solution as for me
The answer to the .profile not being loaded is that .bash_profile is loaded instead.
But I wasn’t able to achieve what I wanted even with that. It temporarily works. To the change to take effect permanently, this is the only solution.
In case someone else reads my comment, I made a small typo Just saw it
It should be
Option "XkbOptions" "ctrl:swapcaps"