Web lists-archives.com

Re: Start Vim at logout / login




I try todo somethink like:

/etc/pam.d/sshd
# Run perl script at logout/ login
session     optional    pam_exec.so quiet /usr/local/bin/wrapper_script

/usr/local/bin/wrapper_script
#!/bin/sh
if [ "$PAM_TYPE" = "open_session" ]; then
	some_perl_script
fi

some_perl_script is start vim like

my $EDITOR   = $ENV{VISUAL} || $ENV{EDITOR} || "vim";
system($EDITOR, "+5", $file)


Am 25.04.2018 um 12:31 schrieb tomas@xxxxxxxxxx:
> On Wed, Apr 25, 2018 at 11:21:58AM +0200, basti wrote:
>> Hello,
>> i want to start vim on logout or login.
> 
> You'll have to describe a bit more what you mean by "on logout"
> or "on login". What/who is logging into what? What's the environment?
> (Terminal, X11, desktop environment...)
> 
>> I always get this error:
> 
>> Apr 25 11:19:04 vim[8706]: *** err
>> Apr 25 11:19:04 vim[8706]: checking tty name failed
>> Apr 25 11:19:04 vim[8706]: *** err
>> Apr 25 11:19:04 vim[8706]: Oh, oh, it's an error! possibly I die!
> 
> What process is vim's caller?
> 
> Try to describe in more detail what you are trying,
> Perhaps then it'll be clearer to us all.
> 
> Cheers
> -- tomás
>