Comments (4)
There goes another easter egg...
whoami
is included in coreutils, it's a good replacement
from pince.
It's not intentional. Looks like the common "who am i" or "who mom likes" commands are returning empty for some terminals. On our tested terminals it works correctly.
Might be a problem as some terminals do not correctly return some info needed by who when the 2 random arguments are supplied (effectively converting it to who -m
).
@korcankaraokcu We can just remove the "mom likes" easter egg (sadly) and that should fix it for all terminals.
from pince.
I am using GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu). Also, I wouldn't recommend using who
to detect the current user. For example, I have a multi-head system where two people are using the same system but the output of who
is the same for both users. In this case, the first line doesn't represent the current user, because when user2
run who
command the output will look like this:
user1 :2 2023-06-03 02:34 (:2)
user2 :0 2023-06-03 02:34 (:0)
Alternatively using id -un
may be better... Maybe...
CURRENT_USER="$(whoami)"
# or...
CURRENT_USER="$(id -un)"
from pince.
'who' was most likely chosen because 'whoami' is affected by sudo and other effective user id changing tools, which would mess up the permissions set by the script.
I guess we can change now to 'whoami' since we recently introduced safeguards against sudo running.
from pince.
Related Issues (20)
- Crashes every time I try to edit a value HOT 9
- Crash when press settings icon and Edit labels HOT 18
- Freeze when using various features after using breakpoints HOT 9
- An indicator might be needed when no process has been selected
- Can it sometimes replace CE on MIngw working games HOT 2
- UI bug HOT 3
- Can't run after installation HOT 8
- Problem with installing HOT 3
- Missing libxcb-cursor0 HOT 1
- How do i find an address in the memory viewer? HOT 5
- How to find an address in the memory viewer? HOT 1
- Use `polkit` rather than `sudo` HOT 1
- This application failed to start because no Qt platform plugin could be initialized HOT 6
- TraceInstructionsWindow issues HOT 4
- Incorrect pygdbmi missing error HOT 5
- Is there a way to run it on MacOS? HOT 2
- Not running on fedora linux HOT 3
- Internal GDB error handling
- Not installing properly on arch HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pince.