Trevor Boyd Smith

less info
261 reputation
415
bio website linkedin.com/in/…
location
age
visits member for 3 years, 4 months
seen May 23 '13 at 19:52

Oct
10
comment How do you configure the MTU for all network adapters via a script?
Because it's going to be part of an installer script that will be used on many machines.
Oct
8
comment How do you configure the MTU for all network adapters via a script?
@itsbruce, ah thanks for the clarification regarding your changes being non-persistent. I updated and further clarified the "persistent" aspect of the question.
Oct
8
comment How do you configure the MTU for all network adapters via a script?
does ip* set mtu 4096* require a service network restart for changes to take effect?
Oct
8
comment How do you configure the MTU for all network adapters via a script?
I was thinking to myself: 1. list all the /etc/sysconfig/network-scripts/ifcfg-eth* files 2. iterate over the list 3. add a new line for each config file MTU=4096 4. optionally do a service network restart
Aug
29
comment How do you colorize only some keywords for a bash script?
@angus, what is the line of code shift $(($OPTIND - 1)) doing?
Aug
29
comment How do you colorize only some keywords for a bash script?
@angus, yep your new revision achieves the same thing my edits do and is a little cleaner than mine! good job. i'm gonna chalk that up to my inexperience of shell scripting =).
Aug
29
comment How do you colorize only some keywords for a bash script?
@angus, dash, in this context, is ubuntu's default shell? that is why your script specifies /bin/sh instead of /bin/bash?
Aug
29
comment How do you colorize only some keywords for a bash script?
I changed the script a little to get the behavior I wanted.
Aug
29
comment How do you colorize only some keywords for a bash script?
@angus, when I specify -b white the background color is actually gray instead of white. I think that is a function of my shell/OS/terminal... bash/fedora15/gnome-terminal is what I am using.
Aug
29
comment How do you colorize only some keywords for a bash script?
@angus, there is a problem with the script that does need to be fixed. when you omit the -b option it defaults to "black" background --> this should be fixed to be "no background is specified" instead of specifying a background color always (having a default background color of black would be good for when the user has a black background but would be bad for when the user has a white background).
Aug
29
comment How do you colorize only some keywords for a bash script?
@angus, really really good and impressive script IMO.
Aug
29
comment How do you colorize only some keywords for a bash script?
I ran your program and it does what is needed. Huzzah! But unfortunately I am not an awk guru so I find it hard to understand what is going on. Correct me where I am wrong. For each new line awk is run? The for loop in the awk source code is doing: "for all tokens in the line"? then it processes each token?
Aug
28
comment How do you colorize only some keywords for a bash script?
An easy way to test is to make another script that echos text with the keywords "PASS" and "FAIL". That would then be called by this script.
Aug
28
comment How do you colorize only some keywords for a bash script?
I made this community wiki because my solution doesn't work.
Sep
19
comment Where should I put a script that needs to execute once when the user logs in graphically?
FYI, I edited the question to show "gnome 3".
Sep
17
comment Where should I put a script that needs to execute once when the user logs in graphically?
When I do ps -ef | grep gdm I get: root 1117 1 0 15:16 ? 00:00:00 /usr/sbin/gdm-binary -nodaemon root 1142 1117 0 15:16 ? 00:00:00 /usr/libexec/gdm-simple-slave --display-id /org/gnome/DisplayManager/Display1 root 1156 1142 0 15:16 tty1 00:00:53 /usr/bin/Xorg :0 -background none -verbose -auth /var/run/gdm/auth-for-gdm-8pX5qs/database -nolisten tcp vt1 root 1402 1142 0 15:16 ? 00:00:00 pam: gdm-password (Also echo $DESKTOP_SESSION returns gnome.) Given the output, I think that means default fedora 15 runs gnome display manager.
Sep
17
comment Where should I put a script that needs to execute once when the user logs in graphically?
@Gilles, IMO I already stated "default fedora 15" so that should tell you what display manager.
Sep
17
comment Is there a simple linux command that will tell me what my display manager is?
If it only works for gnome, this command will only help you deduce "yes you have Gnome or no you don't have gnome". When the question wants to find out more than that.
Sep
17
comment Is there a simple linux command that will tell me what my display manager is?
+1, echo $DESKTOP_SESSION also returns gnome to me... but maybe this only works for gnome?
Sep
17
comment Where should I put a script that needs to execute once when the user logs in graphically?
also ~/.bash_profile will only execute for shell-login not graphical login. (i didn't downvote tho...)