Gentoo Archives: gentoo-user

From: Walter Dnes <waltdnes@××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] links that behave differently per calling app?
Date: Mon, 11 Nov 2019 17:39:20
Message-Id: 20191111173858.GA21208@waltdnes.org
In Reply to: [gentoo-user] links that behave differently per calling app? by Caveman Al Toraboran
1 On Mon, Nov 11, 2019 at 04:37:17AM +0000, Caveman Al Toraboran wrote
2 > hi - is it possible to have some kind of fancy links that
3 > know the name of the process that is trying to access
4 > it, and based on its name, it links it to a file?
5
6 Short answer... YES! Now convince the developers to use it. Here's a
7 trivial example...
8
9 * Create a 2-line executable script "foo"
10 #!/bin/bash
11 echo "${0}"
12
13 * Create a symlink with the command "ln -s foo bar"
14
15 * Execute "./foo" and the output will be "./foo"
16
17 * Execute "./bar" and the output will be "./bar"
18
19 --
20 Walter Dnes <waltdnes@××××××××.org>
21 I don't run "desktop environments"; I run useful applications

Replies

Subject Author
Re: [gentoo-user] links that behave differently per calling app? Jack <ostroffjh@×××××××××××××××××.net>