502 reputation
412
bio website launchpad.net/…
location Syracuse, NY
age 29
visits member for 3 years, 1 month
seen Nov 9 at 15:34

Oct
7
comment Who sets $USER and $USERNAME environment variables?
@JosephR. For sudo echo $USER, the shell expands $USER, then calls sudo. So of course it doesn't produce the same output as whoami. Like sudo whoami, sudo sh -c 'echo $USER' does (typically) output root. Regarding your comment about whoami using the EUID, note that sudo whoami would output root even if whoami used the UID. sudo sets both EUID and UID for the command it runs (except in the very unusual situation that you explicitly configure it to behave otherwise). Compare sudo id -u to sudo id -ru.
Oct
4
comment Why doesn't my ~/.bash_profile work?
"Ubuntu specifically discourages using .profile (link)" The wiki did once (absurdly) discourage that; that's been fixed. (Note /etc/profile does remain discouraged for systemwide assignments, in preference for adding scripts to /etc/profile.d.) Per-user .profile files are now presented as one of the recommended ways to set per-user environment variables: "Suitable files for environment variable settings that should affect just a particular user (rather than the system as a whole) are ~/.pam_environment and ~/.profile."
Sep
30
awarded  Explainer
Sep
13
awarded  Civic Duty
Aug
21
comment Desktop background appears black when using XFCE
Does anything different happen if you kill the running xfdesktop process before attempting to run it again? You can do this with killall xfdesktop (then run that again a few seconds later, and if you don't get xfdesktop: no process found, forcibly kill it with killall -KILL xfdesktop). After killing xfdesktop, try running it again, this time without &. The & isn't causing the problem, but by running it in the foreground you're more likely to see output in the terminal that might reveal the nature of the problem. (You can edit your question with detailed results.)
Aug
18
comment Why doesn't the sudo command need the root password?
Related (not a duplicate): How do the internals of sudo work? and (on Ask Ubuntu) How to NOT become a root user? Are administrators root?
Jun
17
awarded  Constituent
Jun
14
awarded  Caucus
Oct
29
awarded  Yearling
Jul
29
revised Writing a driver to fool *nix systems about having a GPU
fixed annoying spelling error
Mar
25
comment Is it recommended to use zsh instead of bash scripts?
The other thing to keep in mind about bash scripts on BSD systems (other than OS X ...if you consider it a BSD system) is that even if bash exists, it is usually not /bin/bash, so a shebang line #!/bin/bash won't usually work. In cases where bash is actually installed, I believe #!/usr/bin/env bash usually will.
Mar
23
comment Recommended Linux distribution or distributions for children
How is Fedora more like Windows in a way that would make it less likely than Ubuntu that someone would use the command line? (I'm not saying you're wrong--I have only minimal recent experience with Fedora.)
Feb
2
reviewed Needs Improvement How to switch from TTY to KDE in Oracle Linux
Feb
2
reviewed Satisfactory How do I send a shutdown event to a QEMU guest (OpenBSD)?
Feb
2
reviewed Needs Improvement Listing script's file dependencies
Feb
2
reviewed Satisfactory Speed up playback rate of online videos in web browser on Debian Linux
Feb
2
reviewed Satisfactory how to use grep for specific files?
Feb
2
reviewed Satisfactory tar: how can I exclude intermediate directories but include leaf directories?
Feb
2
awarded  Custodian
Feb
2
reviewed Satisfactory Difference between authpriv and auth?