[i3] Killing a window's process
I have a window whose process is not responding. No problem, i3 lets me kill windows, so I type that key combination. Usually it works, but this time it doesn't. My work-around is to use wininfo to find the window id of the dead but mapped thing, bc to convert to decimal, use "ps aeww | grep" to find the process with that window id in its environment, then send it a kill -15 (does nothing visible) and then a kill -9 (still mapped, but process now shows as defunct). So the* problem* (obviously not critical, since I have a work-around) is how could I have avoided the wininfo -> ps -> bc -> kill thing. Looking at the code, it looks like i3's kill window is cmd_kill <https://github.com/i3/i3/blob/next/src/commands.c#L1298>() in commands.c. (How can that get called with kill_mode_str == "client"?) The chain is then to call tree_close_con <https://github.com/i3/i3/blob/next/src/tree.c#L369>() -> tree_close <https://github.com/i3/i3/blob/next/src/tree.c#L192>() -> x_window_kill <https://github.com/i3/i3/blob/next/src/x.c#L283>() -> one_of { xcb_destroy_window <http://www.x.org/archive/current/doc/man/man3/xcb_destroy_window.3.xhtml>(), xcb_kill_client <http://www.x.org/archive/current/doc/man/man3/xcb_kill_client.3.xhtml>() }. I think to answer that I'l have to run i3 with logging so I can see which path it's taking at the end. And wait for an appropriately hung process. My initial hypothesis is that the window supports WM_DELETE_WINDOW but, since the proc is hung, it never processes it. Anyway, thanks for any insights. Clearly this is as much about me learning as anything else. Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255<-- only when I'm in the UK *http://www.ml-week.com/fr/* <http://www.ml-week.com/fr/>* 2-5 novembre 2015* http://jeff.purple.com/ http://blog.purple.com/jeff/
Re: [i3] Killing a window's process
Ah, why, yes, that would have worked. Thanks. Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255<-- only when I'm in the UK *http://www.ml-week.com/fr/* <http://www.ml-week.com/fr/>* 2-5 novembre 2015* http://jeff.purple.com/ http://blog.purple.com/jeff/ On 2 October 2015 at 11:18, Ingo Bürk <ad...@airblader.de> wrote: > xkill? > > On 10/02/2015 11:12 AM, Jeff Abrahamson wrote: > > I have a window whose process is not responding. No problem, i3 lets me > > kill windows, so I type that key combination. Usually it works, but this > > time it doesn't. > > > > My work-around is to use wininfo to find the window id of the dead but > > mapped thing, bc to convert to decimal, use "ps aeww | grep" to find the > > process with that window id in its environment, then send it a kill -15 > > (does nothing visible) and then a kill -9 (still mapped, but process now > > shows as defunct). > > > > > > So the* problem* (obviously not critical, since I have a work-around) is > > how could I have avoided the wininfo -> ps -> bc -> kill thing. Looking > at > > the code, it looks like i3's kill window is cmd_kill > > <https://github.com/i3/i3/blob/next/src/commands.c#L1298>() in > commands.c. > > (How can that get called with kill_mode_str == "client"?) The chain is > > then to call tree_close_con > > <https://github.com/i3/i3/blob/next/src/tree.c#L369>() -> tree_close > > <https://github.com/i3/i3/blob/next/src/tree.c#L192>() -> x_window_kill > > <https://github.com/i3/i3/blob/next/src/x.c#L283>() -> one_of { > > xcb_destroy_window > > < > http://www.x.org/archive/current/doc/man/man3/xcb_destroy_window.3.xhtml > >(), > > xcb_kill_client > > <http://www.x.org/archive/current/doc/man/man3/xcb_kill_client.3.xhtml>() > }. > > > > I think to answer that I'l have to run i3 with logging so I can see which > > path it's taking at the end. And wait for an appropriately hung process. > > My initial hypothesis is that the window supports WM_DELETE_WINDOW but, > > since the proc is hung, it never processes it. > > > > > > Anyway, thanks for any insights. Clearly this is as much about me > learning > > as anything else. > > > > Jeff Abrahamson > > +33 6 24 40 01 57 > > +44 7920 594 255<-- only when I'm in the UK > > > > *http://www.ml-week.com/fr/* <http://www.ml-week.com/fr/>* 2-5 > novembre > > 2015* > > > > http://jeff.purple.com/ > > http://blog.purple.com/jeff/ > > > >
Re: [i3] managing wifi with i3
I have the following in my ~/.xsessionrc, and it works correctly: if [ "X$DESKTOP_SESSION" = Xi3 ]; then nm-applet & # and other stuff fi Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255<-- only when I'm in the UK *http://www.ml-week.com/fr/* <http://www.ml-week.com/fr/>* 2-5 novembre 2015* http://jeff.purple.com/ http://blog.purple.com/jeff/ On 1 October 2015 at 10:36, Ingo Bürk <ad...@airblader.de> wrote: > The window manager is neither responsible nor involved in network > management at all, so I'm afraid you're looking in the wrong direction > here. > > On 10/01/2015 10:34 AM, Robert Grah wrote: > > > > Hey there, > > > > > > > > I am having some problems getting wifi to work in i3. I tried to add > > > > > > > > exec--no-startup-id nm-applet > > to my config and this braught me the icon, but it can not find any wifi > networks. > > > > It seems that there are some problems with the session or similar. I > also tried wicd or gnome-network-manager all without results. > > > > > > > > I am using Ubuntu 15.04 and i3 4.10.4. > > > > > > > > Any ideas? > > > > > > > > > >
Re: [i3] resize with mouse
I was not aware of Mod + RightClick. That's cool. Thanks. And in that context the warp to boundary makes sense: it makes clear what I'm about to do. Mod + RightClick also works for both H and V resize. So this leaves two questions, since maybe they are bugs, maybe not: 1. Is it intentional, given that non-mod LeftClick can resize, that there is no feedback on hovering over a window edge? 2. And is it a bug that vertical resize doesn't work without Mod? I haven't seen fit to restart i3 today (work to do), although I grabbed sources to compile from git master. I'll check once I've compiled and restarted. Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255<-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/ On 11 September 2015 at 19:04, Micah Elliott <m...@micahelliott.com> wrote: > > The target seems to be three pixels wide > > It's not clear if you're aware of the incredibly convenient "Mod + > RightClick" to drag window resizing. Then you can quickly click just > about anywhere on the screen and be grabbing an edge. The feature may > render your concerns moot. > > -- > twitter:@MicahElliott | email:m...@micahelliott.com | > http://membean.com > Remember your words with Membean! >
Re: [i3] resize with mouse
1. Thanks. 2. OK, I'll check once I've been able to compile and restart. Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255<-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/ On 11 September 2015 at 19:24, Michael Stapelberg <mich...@i3wm.org> wrote: > On Fri, Sep 11, 2015 at 7:18 PM, Jeff Abrahamson <j...@purple.com> wrote: > > I was not aware of Mod + RightClick. That's cool. Thanks. And in that > > context the warp to boundary makes sense: it makes clear what I'm about > to > > do. > > > > Mod + RightClick also works for both H and V resize. > > > > So this leaves two questions, since maybe they are bugs, maybe not: > > > > 1. Is it intentional, given that non-mod LeftClick can resize, that > there > > is no feedback on hovering over a window edge? > > https://github.com/i3/i3/issues/706 > > > > > 2. And is it a bug that vertical resize doesn't work without Mod? > > Not sure what you mean by that. I can resize windows in any direction just > fine. > > > > > I haven't seen fit to restart i3 today (work to do), although I grabbed > > sources to compile from git master. I'll check once I've compiled and > > restarted. > > > > Jeff Abrahamson > > +33 6 24 40 01 57 > > +44 7920 594 255<-- only if I'm in the UK > > > > http://jeff.purple.com/ > > http://blog.purple.com/jeff/ > > > > On 11 September 2015 at 19:04, Micah Elliott <m...@micahelliott.com> > wrote: > >> > >> > The target seems to be three pixels wide > >> > >> It's not clear if you're aware of the incredibly convenient "Mod + > >> RightClick" to drag window resizing. Then you can quickly click just > >> about anywhere on the screen and be grabbing an edge. The feature may > >> render your concerns moot. > >> > >> -- > >> twitter:@MicahElliott | email:m...@micahelliott.com | > >> http://membean.com > >> Remember your words with Membean! > > > > > > -- > Best regards, > Michael >
[i3] Binding adventures between mappings
I said that wrong in the subject, let me try in more than one line: I have a somewhat modal idea of how to interact with a window manager, so my i3 config binds very little at global level, the rest is in modes. One mode I call focus, because the items in that mode I might want to do without leaving the mode, mostly moving between windows. In mode i3, most of the bindings end with a mode command, often back to default. I have this in my $HOME/i3/.config: set $mod Mod1 bindsym $mod+Tab mode i3 mode i3 { # Some things I might want to do. # Includes a transition to focus mode. # The mode is long, but here's an example: bindsym c exec urxvt; mode default } mode focus { # A handful of actions that I want in a separate mode. # And then there's a bunch of move/resize bindings, and then: # If I forget where I am, do the right thing. bindsym $mod+Tab mode i3 # Get me out of here. bindsym Return mode default bindsym Escape mode default bindsym Control+g mode default } This works great but for two bindings in focus mode: 1. The $mod+Tab binding I would expect to drop me into i3 mode, but it has no effect. 2. The ESC and C-G bindings exit focus mode correctly, but RET has no effect. Any suggestions what I've done wrong? Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/
Re: [i3] Detecting screen locked
A bit more info. It appears that the sequence of events may be the following: I lock the screen from the keyboard. That key is bound to i3lock --dpms --inactivity-timeout 10 --color=220022 . A bit later, xautolock decides to lock the screen as well. That command, by chance, is not quite the same, which is how I identified the two locks. i3lock --dpms --color=220022 --inactivity-timeout 10 --nofork There is no good reason they are different, but they do both run sometimes. For some reason, the xautolock-launched version sometimes neither asks for my password nor exits. This doesn't happen every time, most of the time, it all works correctly. Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/ On 17 April 2015 at 12:50, Michael Stapelberg mich...@i3wm.org wrote: On Fri, Apr 17, 2015 at 3:00 AM, Jeff Abrahamson j...@purple.com wrote: Thanks. I understand (and a bit better, now) why strace/ptrace may have problems with a program that calls setuid. On the other hand, i3lock doesn't have the setuid bit set, and the strace logs do not show an attempt to call strace. [S-18]jeff@siegfried:~ $ stat /usr/bin/i3lock File: ‘/usr/bin/i3lock’ Size: 31912 Blocks: 64 IO Block: 4096 regular file Device: fc01h/64513dInode: 1575208 Links: 1 Access: (0755/-rwxr-xr-x) Uid: (0/root) Gid: (0/root) Access: 2015-04-16 20:02:56.634223226 +0200 Modify: 2014-07-19 01:13:09.0 +0200 Change: 2015-03-04 15:18:43.959784604 +0100 Birth: - [S-18]jeff@siegfried:~ $ grep setuid /tmp/i3lock-log-1429256* 1,[S-18] jeff@siegfried:~ $ This said, if something PAM did when I logged in affects the behavior of stracing i3lock, I do not think I will try to figure out what PAM has done. ;-) But I still find it odd that i3lock would interpret keystrokes differently under strace or not based on what I know so far. It doesn’t. I’m saying the PAM stack (outside of i3’s code) likely requires setuid permission for some modules (most likely pam_unix). Well, I will debug what I can. Maybe I will compile an i3lock with scaffolding over the weekend to see what I can learn. Thanks again. Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/ On 17 April 2015 at 11:47, Michael Stapelberg mich...@i3wm.org wrote: See http://superuser.com/a/248127 for why setuid is ignored when running under strace. Given that you run i3lock on linux, it might be PAM which uses setuid in some of its modules. On Fri, Apr 17, 2015 at 1:20 AM, Jeff Abrahamson j...@purple.com wrote: Interesting. How does setuid have this effect on i3lock but only under strace? Any idea where the setuid is coming from or how to find out? The system is pretty vanilla ubuntu 14.10 (they have a good installer) aside from running i3 instead of gnome. The exec path that's visible once I'm logged in is lightdm - lightdm --sesion-child - i3. I see that i3 parents what is executed due to .xsessionrc. I'll try to gather traces with -p, but this will depend on me thinking to trace i3lock from a vt before unlocking the screen. My apologies in advance if I take a long time to catch the occasional errant process that way. And thanks for your ever prompt assistance and insights. Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/ On 17 April 2015 at 10:09, Michael Stapelberg mich...@i3wm.org wrote: Ugh, then you’re running it in a setuid setup. You’ll need to start i3lock and then attach strace afterwards using -p. On Fri, Apr 17, 2015 at 9:56 AM, Jeff Abrahamson j...@purple.com wrote: I invoke i3lock at the commandline thus: [S-18]jeff@siegfried:gtd $ strace -o/tmp/i3lock-log-$(date +%s) -f -s 2048 -tt i3lock --dpms --inactivity-timeout 10 --color=220022 [S-18]jeff@siegfried:gtd $ and the result is that i3lock does not recognize my password. It does echo my typing, it just always says fail. I switch to a vt, login, and kill it. Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/ On 17 April 2015 at 09:39, Michael Stapelberg mich...@i3wm.org wrote: Yes, but also use -f (to follow child processes) and -s 2048 (to increase the size of strings) and -tt (to get timing). On Fri, Apr 17, 2015 at 9:23 AM, Jeff Abrahamson j...@purple.com wrote: Sure thing. Just to be clear, do you mean that instead of launching i3lock .. I substitute strace -o/tmp/i3lock-log-$(date +%s) i3lock ...? Jeff Abrahamson +33 6 24 40 01 57 +44
Re: [i3] Detecting screen locked
Good idea, thanks, I'll bind my lock key to that. I think I learned of xautolock after learning that I could lock the screen by binding i3lock to a key. Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/ On 1 May 2015 at 17:44, Serge van Ginderachter se...@vanginderachter.be wrote: On 1 May 2015 at 17:40, Jeff Abrahamson j...@purple.com wrote: I lock the screen from the keyboard. That key is bound to i3lock --dpms --inactivity-timeout 10 --color=220022 . If you use xautolock, better trigger a lock through it then, I use the Pause button to lock it like this: bindsym Pause exec xautolock -locknow
[i3] Detecting screen locked
I have a maintenance function that ought not bother spinning the CPU if the screen is locked. It checks this thus: if pidof i3lock /dev/null; then ... This is i3-specific, which is sad, but not a huge problem. What is a problem is that i3lock sometimes hangs around even though I think it should exit on unlock. And, indeed, most of the time it does exit on unlock. Once in a while, I find I have one or even several i3lock processes hanging around. I either lock my screen explicitly bindsym $mod+Control+L exec i3lock --dpms --inactivity-timeout 10 --color=220022 or else it's done by inactivity xautolock -detectsleep \ -time 3 -locker i3lock --dpms --color=220022 --inactivity-timeout 10 --nofork This question thus has two parts: 1. Am I doing something wrong that I sometimes have multiple i3lock instances? 2. Is there a better way to detect screen lock than pidof i3lock? Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/
Re: [i3] Detecting screen locked
Sure thing. Just to be clear, do you mean that instead of launching i3lock .. I substitute strace -o/tmp/i3lock-log-$(date +%s) i3lock ...? Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/ On 17 April 2015 at 09:19, Michael Stapelberg mich...@i3wm.org wrote: i3lock shouldn’t hang around. Can you start stracing all your i3lock instances automatically and provide the corresponding strace output of a hung instance in a bugreport? On Fri, Apr 17, 2015 at 9:04 AM, Jeff Abrahamson j...@purple.com wrote: I have a maintenance function that ought not bother spinning the CPU if the screen is locked. It checks this thus: if pidof i3lock /dev/null; then ... This is i3-specific, which is sad, but not a huge problem. What is a problem is that i3lock sometimes hangs around even though I think it should exit on unlock. And, indeed, most of the time it does exit on unlock. Once in a while, I find I have one or even several i3lock processes hanging around. I either lock my screen explicitly bindsym $mod+Control+L exec i3lock --dpms --inactivity-timeout 10 --color=220022 or else it's done by inactivity xautolock -detectsleep \ -time 3 -locker i3lock --dpms --color=220022 --inactivity-timeout 10 --nofork This question thus has two parts: 1. Am I doing something wrong that I sometimes have multiple i3lock instances? 2. Is there a better way to detect screen lock than pidof i3lock? Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/ -- Best regards, Michael
Re: [i3] Detecting screen locked
Interesting. How does setuid have this effect on i3lock but only under strace? Any idea where the setuid is coming from or how to find out? The system is pretty vanilla ubuntu 14.10 (they have a good installer) aside from running i3 instead of gnome. The exec path that's visible once I'm logged in is lightdm - lightdm --sesion-child - i3. I see that i3 parents what is executed due to .xsessionrc. I'll try to gather traces with -p, but this will depend on me thinking to trace i3lock from a vt before unlocking the screen. My apologies in advance if I take a long time to catch the occasional errant process that way. And thanks for your ever prompt assistance and insights. Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/ On 17 April 2015 at 10:09, Michael Stapelberg mich...@i3wm.org wrote: Ugh, then you’re running it in a setuid setup. You’ll need to start i3lock and then attach strace afterwards using -p. On Fri, Apr 17, 2015 at 9:56 AM, Jeff Abrahamson j...@purple.com wrote: I invoke i3lock at the commandline thus: [S-18]jeff@siegfried:gtd $ strace -o/tmp/i3lock-log-$(date +%s) -f -s 2048 -tt i3lock --dpms --inactivity-timeout 10 --color=220022 [S-18]jeff@siegfried:gtd $ and the result is that i3lock does not recognize my password. It does echo my typing, it just always says fail. I switch to a vt, login, and kill it. Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/ On 17 April 2015 at 09:39, Michael Stapelberg mich...@i3wm.org wrote: Yes, but also use -f (to follow child processes) and -s 2048 (to increase the size of strings) and -tt (to get timing). On Fri, Apr 17, 2015 at 9:23 AM, Jeff Abrahamson j...@purple.com wrote: Sure thing. Just to be clear, do you mean that instead of launching i3lock .. I substitute strace -o/tmp/i3lock-log-$(date +%s) i3lock ...? Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/ On 17 April 2015 at 09:19, Michael Stapelberg mich...@i3wm.org wrote: i3lock shouldn’t hang around. Can you start stracing all your i3lock instances automatically and provide the corresponding strace output of a hung instance in a bugreport? On Fri, Apr 17, 2015 at 9:04 AM, Jeff Abrahamson j...@purple.com wrote: I have a maintenance function that ought not bother spinning the CPU if the screen is locked. It checks this thus: if pidof i3lock /dev/null; then ... This is i3-specific, which is sad, but not a huge problem. What is a problem is that i3lock sometimes hangs around even though I think it should exit on unlock. And, indeed, most of the time it does exit on unlock. Once in a while, I find I have one or even several i3lock processes hanging around. I either lock my screen explicitly bindsym $mod+Control+L exec i3lock --dpms --inactivity-timeout 10 --color=220022 or else it's done by inactivity xautolock -detectsleep \ -time 3 -locker i3lock --dpms --color=220022 --inactivity-timeout 10 --nofork This question thus has two parts: 1. Am I doing something wrong that I sometimes have multiple i3lock instances? 2. Is there a better way to detect screen lock than pidof i3lock? Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/ -- Best regards, Michael -- Best regards, Michael -- Best regards, Michael
Re: [i3] Detecting screen locked
Thanks. I understand (and a bit better, now) why strace/ptrace may have problems with a program that calls setuid. On the other hand, i3lock doesn't have the setuid bit set, and the strace logs do not show an attempt to call strace. [S-18]jeff@siegfried:~ $ stat /usr/bin/i3lock File: ‘/usr/bin/i3lock’ Size: 31912 Blocks: 64 IO Block: 4096 regular file Device: fc01h/64513dInode: 1575208 Links: 1 Access: (0755/-rwxr-xr-x) Uid: (0/root) Gid: (0/root) Access: 2015-04-16 20:02:56.634223226 +0200 Modify: 2014-07-19 01:13:09.0 +0200 Change: 2015-03-04 15:18:43.959784604 +0100 Birth: - [S-18]jeff@siegfried:~ $ grep setuid /tmp/i3lock-log-1429256* 1,[S-18] jeff@siegfried:~ $ This said, if something PAM did when I logged in affects the behavior of stracing i3lock, I do not think I will try to figure out what PAM has done. ;-) But I still find it odd that i3lock would interpret keystrokes differently under strace or not based on what I know so far. Well, I will debug what I can. Maybe I will compile an i3lock with scaffolding over the weekend to see what I can learn. Thanks again. Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/ On 17 April 2015 at 11:47, Michael Stapelberg mich...@i3wm.org wrote: See http://superuser.com/a/248127 for why setuid is ignored when running under strace. Given that you run i3lock on linux, it might be PAM which uses setuid in some of its modules. On Fri, Apr 17, 2015 at 1:20 AM, Jeff Abrahamson j...@purple.com wrote: Interesting. How does setuid have this effect on i3lock but only under strace? Any idea where the setuid is coming from or how to find out? The system is pretty vanilla ubuntu 14.10 (they have a good installer) aside from running i3 instead of gnome. The exec path that's visible once I'm logged in is lightdm - lightdm --sesion-child - i3. I see that i3 parents what is executed due to .xsessionrc. I'll try to gather traces with -p, but this will depend on me thinking to trace i3lock from a vt before unlocking the screen. My apologies in advance if I take a long time to catch the occasional errant process that way. And thanks for your ever prompt assistance and insights. Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/ On 17 April 2015 at 10:09, Michael Stapelberg mich...@i3wm.org wrote: Ugh, then you’re running it in a setuid setup. You’ll need to start i3lock and then attach strace afterwards using -p. On Fri, Apr 17, 2015 at 9:56 AM, Jeff Abrahamson j...@purple.com wrote: I invoke i3lock at the commandline thus: [S-18]jeff@siegfried:gtd $ strace -o/tmp/i3lock-log-$(date +%s) -f -s 2048 -tt i3lock --dpms --inactivity-timeout 10 --color=220022 [S-18]jeff@siegfried:gtd $ and the result is that i3lock does not recognize my password. It does echo my typing, it just always says fail. I switch to a vt, login, and kill it. Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/ On 17 April 2015 at 09:39, Michael Stapelberg mich...@i3wm.org wrote: Yes, but also use -f (to follow child processes) and -s 2048 (to increase the size of strings) and -tt (to get timing). On Fri, Apr 17, 2015 at 9:23 AM, Jeff Abrahamson j...@purple.com wrote: Sure thing. Just to be clear, do you mean that instead of launching i3lock .. I substitute strace -o/tmp/i3lock-log-$(date +%s) i3lock ...? Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/ On 17 April 2015 at 09:19, Michael Stapelberg mich...@i3wm.org wrote: i3lock shouldn’t hang around. Can you start stracing all your i3lock instances automatically and provide the corresponding strace output of a hung instance in a bugreport? On Fri, Apr 17, 2015 at 9:04 AM, Jeff Abrahamson j...@purple.com wrote: I have a maintenance function that ought not bother spinning the CPU if the screen is locked. It checks this thus: if pidof i3lock /dev/null; then ... This is i3-specific, which is sad, but not a huge problem. What is a problem is that i3lock sometimes hangs around even though I think it should exit on unlock. And, indeed, most of the time it does exit on unlock. Once in a while, I find I have one or even several i3lock processes hanging around. I either lock my screen explicitly bindsym $mod+Control+L exec i3lock --dpms --inactivity-timeout 10 --color=220022 or else it's done by inactivity xautolock -detectsleep \ -time 3 -locker i3lock --dpms --color=220022 --inactivity-timeout 10 --nofork This question thus has two parts: 1
Re: [i3] Detecting screen locked
I invoke i3lock at the commandline thus: [S-18]jeff@siegfried:gtd $ strace -o/tmp/i3lock-log-$(date +%s) -f -s 2048 -tt i3lock --dpms --inactivity-timeout 10 --color=220022 [S-18]jeff@siegfried:gtd $ and the result is that i3lock does not recognize my password. It does echo my typing, it just always says fail. I switch to a vt, login, and kill it. Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/ On 17 April 2015 at 09:39, Michael Stapelberg mich...@i3wm.org wrote: Yes, but also use -f (to follow child processes) and -s 2048 (to increase the size of strings) and -tt (to get timing). On Fri, Apr 17, 2015 at 9:23 AM, Jeff Abrahamson j...@purple.com wrote: Sure thing. Just to be clear, do you mean that instead of launching i3lock .. I substitute strace -o/tmp/i3lock-log-$(date +%s) i3lock ...? Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/ On 17 April 2015 at 09:19, Michael Stapelberg mich...@i3wm.org wrote: i3lock shouldn’t hang around. Can you start stracing all your i3lock instances automatically and provide the corresponding strace output of a hung instance in a bugreport? On Fri, Apr 17, 2015 at 9:04 AM, Jeff Abrahamson j...@purple.com wrote: I have a maintenance function that ought not bother spinning the CPU if the screen is locked. It checks this thus: if pidof i3lock /dev/null; then ... This is i3-specific, which is sad, but not a huge problem. What is a problem is that i3lock sometimes hangs around even though I think it should exit on unlock. And, indeed, most of the time it does exit on unlock. Once in a while, I find I have one or even several i3lock processes hanging around. I either lock my screen explicitly bindsym $mod+Control+L exec i3lock --dpms --inactivity-timeout 10 --color=220022 or else it's done by inactivity xautolock -detectsleep \ -time 3 -locker i3lock --dpms --color=220022 --inactivity-timeout 10 --nofork This question thus has two parts: 1. Am I doing something wrong that I sometimes have multiple i3lock instances? 2. Is there a better way to detect screen lock than pidof i3lock? Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/ -- Best regards, Michael -- Best regards, Michael
[i3] Bug: Window fails to focus after closing matplotlib plot
I run ipython3, plot something using matplotlib and the Tk backend (default backend, I think), the plot displays. This is normal python. I type C-w to close the plot window, it closes, but the window now displayed (correctly) does not have the focus. Worse, i3 doesn't notice me either. Clicking in the window I think should be active or moving the mouse to trigger a crossing event focuses a window and all is back to normal. This doesn't happen with other windows/programs. I am using i3 4.8. [S-20]jeff@nantes:~ $ i3 --version i3 version 4.8 (2014-06-15, branch 4.8) © 2009-2014 Michael Stapelberg and contributors [S-20]jeff@nantes:~ $ Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/
Re: [i3] i3wm exit session
Wait, that's not a very empathetic response. I agree with you, Michael, that this isn't a huge problem functionally, but it *looks* ugly and it *looks* like unintended behavior. And that's reason enough for the OP to raise the issue, in case no one had noticed. From there, it's certainly reasonable if you want to say that it's not your priority to fix. And to invite a patch, whether or not you want to offer tips on how it might be patched. Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/ On 5 April 2015 at 09:18, Michael Stapelberg mich...@i3wm.org wrote: What’s the problem with this behavior? It surely is technically possible to avoid it, but why bother? On Sun, Apr 5, 2015 at 12:14 AM, Hector c1b3rh...@gmail.com wrote: Dear I3wm list , Recently I was using my laptop with i3wm, my version is 4.8 (2014-06-15, branch 4.8) I run debian testing, I couldn't say that I haven't fallen in love with it,but checking the option to exit from my current session if I press once, I get the normal message set by the default configuration, but if I press many times $mod+Shift+e I get something like in the attached picture. Is there any way to add some snipe of code to solve it if I press many times?. Can anybody confirm this behavior maybe I'm wrong and it just happend to me. Best Regards, Hector. -- Best regards, Michael
Re: [i3] I'm new to i3 and have some questions about configuration and use
1. Mod-d (for down) 2. Strange. Do you have an ~/.xsessionrc? See man xsession for too much inf. Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/ On 24 March 2015 at 18:26, Yuri y...@sent.com wrote: I'm kinda new to Linux in general, and now I'm learning how to use Arch Linux. I installed i3 today and it's a very fun window manager. But I'm having some problems using it. 1) When I use Mod4+a, the Parent Container is selected, and then I press it again and again and everything gets selected. How do I deselect everything and return to my previous window selection (right now I can only do that by creating a new window or changing workspace)? 2) When I run startx, two terminal windows are automatically loaded into my screen. I looked into /etc/i3/config and ~/.i3/config and there's no exec there. I can't find a way to disable this and get a clean start. Sorry if these things are easy to fix, but I couldn't find it anywhere. Thanks.
[i3] Efficiently setting up screen layout
I often want a layout in which I have two windows side by side, and under one of those windows I have one or two small windows. I have workspace_layout tabbed set in my config. Each time I want to set this up, I do the following: create window create window move right focus parent split v create*(lower is focused)* split h*(just to create new node)* layout tabbed And so now I have three windows frames showing and each is in tabbed mode so that new windows won't change the layout on me. Great! But this feels cumbersome, so I'd like to automate it, but I think any automation is timing-dependent, since windows have to map in each step before the next. I'm I missing something? Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/
Re: [i3] Efficiently setting up screen layout
Oh, I missed that in the docs. That's very nice and should fit the bill. Thanks! Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/ On 23 March 2015 at 17:05, Bigby James bigby.ja...@dimthoughts.com wrote: On 03/23, Jeff Abrahamson wrote: snip But this feels cumbersome, so I'd like to automate it, but I think any automation is timing-dependent, since windows have to map in each step before the next. snip http://i3wm.org/docs/layout-saving.html -- A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. - Douglas Adams
Re: [i3] Thoughts on window sizing from a new(-ish) user
workspace_layout tabbed is a cool feature. Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/ On 14 March 2015 at 22:56, Bigby James bigby.ja...@dimthoughts.com wrote: On 03/14, Jeff Abrahamson wrote: Hi, Stefano. I am using containers, I'm just asking the question if this is optimal (or if I'm missing something). You say I can create a container before I create a window. Really? Technically, maybe, but by all appearances, no. The container doesn't really seem to exist until the window occupies it. However, any time you create a split of some sort i3 will be primed to draw a container to the right of or below the newly split window and open a window within it. Imagine my screen is empty. I'd like two side-by-side windows in their own containers, each container tabbed. I think what I need to do is this: mod-H # probably no-op most or all of the time snip I typically work with two or three separate containers per workspace, usually starting out stacked and changing the layout in each as necessary. Give this a try: 1. Open up your configuration file and add (or change) the setting 'workspace_layout tabbed' 2. Reload, then start with an empty workspace. 3. *Do not* hit mod-H, and instead just open two terminal windows. They'll be tabbed in a single container by default. 4. Now move one of them left or right, thereby moving it into its own container, and start playing around. You should get a feel for how things are working pretty quickly. Once you do, you can move into other realms. -- A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. - Douglas Adams
[i3] Thoughts on window sizing from a new(-ish) user
I've been using i3 for several weeks now on most of my machines [1]. It's very nice, many thanks to all who have made it work so well. I find one concept confusingly conflated, and I am curious how others see it, and if I am simply missing some bit of mental model. It often happens that I open several windows, adjust their sizes (for example, some monitoring plots wide and short, an editor tall, etc. But if I open a new window, it changes the sizes I've set. To get around this, I typically set up windows as I'd like them, then change each window in turn between vertical and horizontal mode to force creation of a new container, then put the window into tabbed mode so that new windows don't change its size. (If all windows are in tabbed mode, then new windows don't cause resizes.) This achieves what I want, but seems a bit long-winded. To my mind, this arises because i3 conflates frames with windows. A frame is the thing that partitions screen space. In a frame I can put one or more windows. Of course, each frame might have precisely one window, the current behaviour. But what I am doing is essentially creating frames and then expecting new windows to conform to those frames. Anyway, I'm curious how others see this. Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/ [1] One machine is still running ratpoison.
Re: [i3] I3 and emacs
That's really great, thanks. I think this solved what I want. This leaves me with only a small question that I've half-answered below. So I say this in my config: bindsym $mod+Tab mode I3 mode I3 { # start a terminal bindsym c exec urxvt ... bindsym Escape mode default } And now I can type $mod+Tab c to open a new terminal, $mod-Tab f to go full screen, etc. And, meanwhile, $mod-f does what I expect it to in emacs and bash, which is to go forward one word. One curiosity is that my I3 mode is, well, modal. Sometimes I suppose this makes sense, if I'm going to issue quite a lot of commands to the window manager. (This is the case with resize mode.) But It would be nice to have a transient mode where any command within the mode is executed and then causes the mode to exit. Is that possible? Let me half answer that question. I've discovered it's possible if I ask for it with each command: bindsym f fullscreen; mode default But it would be cool to be able to specify this about the mode rather than have to repeat myself throughout the mode's bindings. bindsym $mod+Tab transientmode I3 Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/ On 21 February 2015 at 11:22, Michael Stapelberg mich...@i3wm.org wrote: See https://faq.i3wm.org/question/360/emacs-like-keybinding/ On Sat, Feb 21, 2015 at 8:45 AM, Jeff Abrahamson j...@purple.com wrote: I'd like to use I3 and emacs. I don't have a spare modifier key on my keyboard, so I'd like to use a prefix key. Maybe I missed it in the docs, in which case, please accept my apologies. (I've only just begun to look at the source.) 1. Is there support for this currently in I3? 2. If not, is there interest in a patch? Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/ -- Best regards, Michael
[i3] I3 and emacs
I'd like to use I3 and emacs. I don't have a spare modifier key on my keyboard, so I'd like to use a prefix key. Maybe I missed it in the docs, in which case, please accept my apologies. (I've only just begun to look at the source.) 1. Is there support for this currently in I3? 2. If not, is there interest in a patch? Jeff Abrahamson +33 6 24 40 01 57 +44 7920 594 255-- only if I'm in the UK http://jeff.purple.com/ http://blog.purple.com/jeff/