Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] A tale of two computers
- Date: Sun, 8 Oct 2017 12:09:12 +0900
- From: Curt Sampson <cjs@example.com>
- Subject: Re: [tlug] A tale of two computers
- References: <1507324433.4266.14.camel@uchicago.edu>
- User-agent: NeoMutt/20170113 (1.7.2)
On 2017-10-06 17:13 -0400 (Fri), Stuart Luppescu wrote: > In .xsession on both computers I have these lines: > > eval `/usr/bin/dbus-launch --sh-syntax --exit-with-session` > eval `ssh-agent -s` > ssh-add > > And in both computers /etc/ssh/ssh_config has IdentityFile ~/.ssh/id_rsa2 > > On the work computer the ssh-agent works as it should. But on my > personal computer when I try to ssh to a remote machine it prompts me > for the passphrase for ~/.ssh/id_rsa2, and then it connects. The other > computer connects without prompting for the passphrase. ... > 3) I use ibus and anthy to switch language input. It works fine on the > Dell, but on the NUC, I can't input Japanese in Chrome, but it works > fine in other programs. These sound to me like an issue with the environment variables being passed to the processes. SSH is the easier one to debug since you simply have to check that `SSH_AUTH_SOCK` is set (a typical value will be `/tmp/ssh-NtwrK2hAT2AM/agent.1215`) and that, as multiple agents might be running, `ssh-add -l` shows that that agent contains the key you added elsewhere. (If `SSH_AUTH_SOCK` is different between two different processes, they won't be talking to the same agent.) Unfortunately, though `ssh -v` does tell you the files whence it tries to load a key, it doesn't give details about the agent it's contacting when it uses an agent. For an application using ibus you want the following set in the environment: export XMODIFIERS=@im=ibus export GTK_IM_MODULE=ibus export QT_IM_MODULE=ibus There's more detail and links to some handy pages at: https://github.com/0cjs/sedoc/blob/master/linux/i18n.md Unfortunately, I have yet to write such handy documentation on X11 startup; there are various interactions between `.profile`, `.xinit` `.xession` and the startup procedures of various desktop systems that are a bit complex. However, here are a few hints: The particular startup process will be initiated by the Display Manager, which is what puts up the login screen. (Yes, it's confusingly named.) This is provided by the `x-display-manager` package in Debian and is usually LightDM with a greeter (login screen) specific to the distribution and desktop system. Your DM should usually give you a menu to choose what flavour of session you want to start; mine offers: * Default Xsession * Fvwm * Xfce Session The third one does whatever Xfce normally does. The second one runs a "pure" Fvwm 2 configuration that does not appear to run `.xsession` or `.xinitrc` (see below), presumably relying on `.fvwm/config` to do all the setup. I use the first, which runs my `.xsession` file. (I don't recall if "Xfce Session" uses this.) From looking at it and the `startx(1)` manpage, it's clear that the `.xsession` is supposed to set up the entire environment; here's mine: #!/bin/bash # # .xsession is run on login from a display manager (graphical login screen). # It combines the roles of .profile and .xinitrc. # # This file must be set executable! # # XXX This is supposed to be done by the system, but sometimes isn't? exec >>$HOME/.xsession-errors 2>&1 echo ===== sourcing profile; . ~/.profile echo ===== execing .xinitrc; exec ~/.xinitrc Note here that I'm careful to source my profile, not execute it in a subshell, to ensure that all the environment variables it sets are set in the current process so that they'll be inherited by sub-processes. (And yes, I should be sourcing `~/.bash_profile` instead of `~/.profile` if the former exists.) The `.xinitrc` is what's normally run when you run `startx`; that of course doesn't run the profile because you're alredy logged in (presumably on a console terminal) if you're running that command. The first thing I'd check is which of the sessions you're starting from the DM on each machine; if you're starting different ones you will probably see different behaviour. And while my comment above about not having any sedoc documentation on this was true when I started, it is now false; you can find the notes I made based on the research for this message at: https://github.com/0cjs/sedoc/blob/master/linux/x11.md > The work computer is a Dell Latitude E7440, and the personal > computer is an Intel NUC. They both have similar hardware: both have > i7 CPUs... Just as a side note, be very careful when comparing portable versus desktop versions of parts that have the same or similar names. Especially for CPUs and graphics processors, vendors often choose to use the same name for parts with substantially different capabilities. For example, that i7 you have in your laptop is not nearly as powerful as a desktop i5 CPU of similar generation. cjs -- Curt J. Sampson <cjs@example.com> +81 90 7737 2974 To iterate is human, to recurse divine. - L Peter Deutsch
- References:
- [tlug] A tale of two computers
- From: Stuart Luppescu
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Recommendation on watching European/American/Independent movies/TV programs in Japan?
- Next by Date: [tlug] Ubuntu 16.04.3 LTS in Tokyo and places of interest
- Previous by thread: [tlug] A tale of two computers
- Next by thread: [tlug] Ubuntu 16.04.3 LTS in Tokyo and places of interest
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links