LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-30-2019, 03:47 PM   #1
justasalad
LQ Newbie
 
Registered: May 2019
Distribution: Debian testing (11) with MATE
Posts: 7

Rep: Reputation: Disabled
Something is "blocking" Ctrl+S


I recently installed GalliumOS (based on Ubuntu 16.04) on my Chromebook, and it seems that Ctrl+S is the only key combination that doesn't work. It does however work after I open keyboard settings and assign a dummy shortcut to Ctrl+S, and then remove it. My desktop environment is Xfce4. Here's the output when I run xev and press Ctrl+S:

Code:
KeyPress event, serial 37, synthetic NO, window 0x4000001,
    root 0x176, subw 0x0, time 315118, (361,183), root:(1232,647),
    state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

FocusOut event, serial 37, synthetic NO, window 0x4000001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 37, synthetic NO, window 0x4000001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 37, synthetic NO, window 0x0,
    keys:  4294967267 0   0   0   32  0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0

I'll happily provide logs, but I don't know what logs are useful here? :P
 
Old 05-31-2019, 12:23 PM   #2
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,109
Blog Entries: 1

Rep: Reputation: 868Reputation: 868Reputation: 868Reputation: 868Reputation: 868Reputation: 868Reputation: 868
Different WMs/DEs have hotkey combos that don't forward to apps. Various xterms have such combos as well. You could run the app in a Xephyr window and Cntrl+Shift to lock input to that window (again to unlock). That should bypass the WM/DE, but not so much the xterm / terminology / rxvt / ... ... ... layer.
 
Old 05-31-2019, 01:03 PM   #3
justasalad
LQ Newbie
 
Registered: May 2019
Distribution: Debian testing (11) with MATE
Posts: 7

Original Poster
Rep: Reputation: Disabled
Thanks for your reply. Even though I haven't found the cause, I almost have a solution; simply to bind and unbind a dummy keyboard shortcut when I log in. It's via xfce4 settings and here's the commands:

Code:
xfconf-query -c xfce4-keyboard-shortcuts -p "/commands/custom/<Primary>s" -n -t string -s dummy
xfconf-query -c xfce4-keyboard-shortcuts -p "/commands/custom/<Primary>s" -r
The problem is that it's not invoked after I put it in ~/.profile and log in. It does however work when I source ~/.profile. I've never really added anything to .profile before, and I have no idea if it's read at all. Any ideas?
 
Old 05-31-2019, 01:55 PM   #4
ehartman
Senior Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 1,674

Rep: Reputation: 884Reputation: 884Reputation: 884Reputation: 884Reputation: 884Reputation: 884Reputation: 884
Quote:
Originally Posted by justasalad View Post
The problem is that it's not invoked after I put it in ~/.profile and log in. It does however work when I source ~/.profile. I've never really added anything to .profile before, and I have no idea if it's read at all.
The .profile script is only executed when the shell your window starts is a login shell. Other shells will invoke .bashrc
And of course for both a window with a command shell will have to be started, your window environment probably doesn't do it for you (mine does, but I've explicitly enabled it in the X session startup).
Code:
test -r /etc/profile && . /etc/profile
# test -r /opt/proto/profile && . /opt/proto/profile # now through /etc/profile.d
(there's a symbolic link in /etc/profile.d to /opt/proto/profile, and that one again will execute $HOME/.profile if found).

Note that the user dependant script can be called .profile, .bash_profile OR .bash_login, but only one of those is executed BY a login shell
Quote:
any of the personal initialization files ~/.bash_profile, ~/.bash_login, or ~/.profile.
By default, bash reads these files when it is invoked as a login shell (see INVOCATION below)

INVOCATION

When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable.
(from the bash man page)
 
Old 05-31-2019, 02:18 PM   #5
justasalad
LQ Newbie
 
Registered: May 2019
Distribution: Debian testing (11) with MATE
Posts: 7

Original Poster
Rep: Reputation: Disabled
Ok, I found this: https://wiki.archlinux.org/index.php/Xprofile. I've added a .xprofile but there's still one problem. In it, I added

Code:
mkdir /home/chrx/test

xfconf-query -c xfce4-keyboard-shortcuts -p "/commands/custom/<Primary>s" -n -t string -s dummy
xfconf-query -c xfce4-keyboard-shortcuts -p "/commands/custom/<Primary>s" -r
and when I login the folder is there but Ctrl+S still doesn't work, and only work after I source the file. Maybe there are components that need to be loaded before these commands work? I guess I can ask at xfce forum, if this is only specific to xfce?
 
Old 05-31-2019, 06:09 PM   #6
justasalad
LQ Newbie
 
Registered: May 2019
Distribution: Debian testing (11) with MATE
Posts: 7

Original Poster
Rep: Reputation: Disabled
Finally got it working by adding the commands to a shell script, and then adding that as a new entry in xfce Session and Startup (autostart). I'm sure there's a more elegant solution, but I'm lazy and it finally works now.
 
1 members found this post helpful.
Old 06-01-2019, 12:19 AM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 15,599
Blog Entries: 9

Rep: Reputation: 4510Reputation: 4510Reputation: 4510Reputation: 4510Reputation: 4510Reputation: 4510Reputation: 4510Reputation: 4510Reputation: 4510Reputation: 4510Reputation: 4510
Quote:
Originally Posted by justasalad View Post
The problem is that it's not invoked after I put it in ~/.profile and log in. It does however work when I source ~/.profile. I've never really added anything to .profile before, and I have no idea if it's read at all. Any ideas?
.profile is sourced before the GUI (Xorg) starts, and xfconf-query does not work without a GUI (Xorg) running.
that's why your most recent solution is the correct one.
If i were you I'd remove that .xprofile business again, as well as the .profile entries.

btw have you tried to only remove the shortcut? i.e. only the latter command?
 
Old 06-01-2019, 09:13 AM   #8
justasalad
LQ Newbie
 
Registered: May 2019
Distribution: Debian testing (11) with MATE
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
btw have you tried to only remove the shortcut? i.e. only the latter command?
Oops, never tried that. Unfortunately, it didn't work. Still, I'm happy it works now despite not knowing what caused it. It turned out to be a good lesson learning about .profile, .xprofile etc... and I wrote my first shell script ever haha... two lines. :P
 
Old 06-02-2019, 11:29 PM   #9
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,109
Blog Entries: 1

Rep: Reputation: 868Reputation: 868Reputation: 868Reputation: 868Reputation: 868Reputation: 868Reputation: 868
The .bashrc and .profile stuff only runs when your "shell" is started. Which if you boot directly to a DE/WM doesn't happen. Until you open a terminal and a shell is run. Something that most of us don't consider, since the first thing we do in X is open a terminal / shell. Or we login on the console and launch X from that shell.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ctrl+c and ctrl+v and ctrl+a dont work fine after install Nvidia drivers eros1989 Linux - Software 5 03-05-2019 07:00 AM
[SOLVED] How to enable "CTRL+C" and "CTRL+V" in Terminal? hack3rcon Linux - Newbie 5 12-10-2016 09:47 AM
Something depends on something else but something else is to be installed javascriptninja Linux - Newbie 3 02-05-2012 04:22 PM
How to disable Ctrl+C, Ctrl+V, Ctrl+X in rdesktop? Aswathy Linux - Newbie 1 01-19-2011 06:22 PM
Recognizing ctrl+c,ctrl+l,ctrl+d in C programs leonardo6023 Programming 1 08-19-2009 09:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration