336 reputation
18
bio website
location United States
age 43
visits member for 3 years, 5 months
seen Oct 15 at 8:13

Working amidst the ever merging & forever blurred realms of technocrat and troglodyte.


Oct
11
comment can we use something better than more for tab completion?
not sure what "bash isn't as sophisticated" means. maybe it's the name that seems garish. Nonetheless, 'bash' does not use 'more' for tab completion. And regarding paging through "ls" output, you may have "ls" aliased to "ls | more"? => try: $ type ls => see if you're doing more than just listing files. Tab completion in bash can be customized, using the complete command.
Jan
2
comment How to properly and easy configure `xdg-open` without any enviroment?
using xdg-mime (part of xdg-utils) is the best answer for working with (querying, configuring) xdg-open. See also unix.stackexchange.com/questions/8793/…
Jan
2
comment How to properly and easy configure `xdg-open` without any enviroment?
+1 and see also my related answer to the related question, unix.stackexchange.com/questions/77136/…
Nov
20
comment If computers start counting at 0, why does the init process have a pid of 1?
this is likely a case of opposing underlying paradigms of programming: the programmer's gravitation towards special flag values (zero, negative one) trumps the lesser pull of a proclivity for zero-based numbering systems.
Oct
19
comment Share (masquerade) Internet connection from Debian desktop to a bunch of computers
With Ubuntu, anyway (and therefore probably Debian), you can set up a computer as a wifi hotspot if it has wifi & is connected to the network not using wifi (ie, using eth0). You could try to google for "Ubuntu (or Debian) hotspot wifi", & see if any of these work for Debian...
Oct
19
comment Change directory without typing cd?
The amount of typing saved by not typing "cd" will likely be offset by not having intelligent default autocompletion for paths. Also this method of changing dirs, as often as one does change dirs, is a little scary in that accidentally running a (potentially malicious) program (that you think is a directory) becomes very likely.
Aug
7
comment Writing custom Gnome/Mate screensaver with SDL
sorry to spam your question with comments, but to answer my own question (from here) quoting/paraphasing: "mate-screensaver is a simplified front-end/daemon for xscreensaver" ... "[xscreensaver has] the daemon, the config front-end, and the 'hacks'. The first two are replaced by mate-screensaver...The 'hacks' ('themes' in the gnome docs, most people probably think of them as the 'screensavers themselves') used by mate-screensaver are the same as the ones used by xscreensaver." ... but mate lacks all the config options of xscreensaver
Aug
7
comment Writing custom Gnome/Mate screensaver with SDL
This link applies to gnome-screensaver & xscreensaver (but not mate-screensaver), and you can reuse things across these two ( wiki.gnome.org/GnomeScreensaver/FrequentlyAskedQuestions ).
Aug
7
comment Writing custom Gnome/Mate screensaver with SDL
can mate-screensaver (your question & first link) and gnome-screensaver (your second link) use the same customizations? mate-screensaver really needs more options; everyone uninstalls it as a result, usually replacing it with gnome-screensaver which has more options (themes). then there's the crowd that hates gnome-screensaver's limited options and installs xscreensaver. ...I'm not sure how or if a screensaver can be used/packaged for these different applications, so you may have to choose one first (mate/gnome/x), or explore if/how the saver could be used with multiple.
Jun
19
comment Validate Password for user account from shell script
Sounds like a bad idea...that means you have a clear-text list of every user's password, which you will want to keep in sync with whatever is being used for the OS authentication? It sounds like what you really want to do is to authenticate users against (some) existing service. You didn't say if the OS is authenticating against LDAP/NIS/etc-passwd or ssh public key authentication or...? Or, will your script passwd differ from the OS passwd? (Otherwise, obviously, if the user is logged-in, you can assume they are authenticated and there is no need to re-authenticate.)
Jun
11
comment Can I “export” functions in bash?
summarizing answers below (enzotib is correct, assuming you can use bash, as the question indicates): change #!/bin/sh to #!/bin/bash and after doit() {...} just export -f doit
Mar
14
comment How can I check if two gzipped files are equal?
true, md5sum isn't necessary to compare (unless you already have them generated); I just used it since derobert used it. zgrep is just a script that basically does gunzip and grep (or sed as the case may be), so there is little difference there. the script as posted is intentionally shown as a chain of pipes with pluggable parts; what's the fun in merging everything down into a single command?
Mar
3
comment How to detect particular system call called or not in a whole workflow?
How about dtrace? (what OS?)
Jan
30
comment What are ./ and ../ directories?
@Adam yes, that will probably do the trick ("ls -b | wc -l"); you can also use the "-1" (dash + number one) which forces a listing in a single column instead of all on a single line, but that happens anyway when piping to another command. So (imho) I'd leave it as "ls -1b | wc -l" ; and to "test", run "ls -1b" and count the number of lines, then run "ls -1b | wc -l" and verify the results. (That's how to debug/test pipes.)
Nov
29
comment Differences between VNC and ssh -X
@simona after the successful ssh login, then run screen: ssh user@host ; and after logged in: screen bash ; to disconnect, ctrl+a followed by ctrl+d. You can logout and login again, then: screen -ls and screen -r. Exiting bash exits the screen session. For more (much more), see various tutorials on GNU screen
Nov
16
comment Differences between VNC and ssh -X
Although a bit OT (since this Q is presumably only about GUI apps): if an actual GUI app is not required, and just basic shell access will do (e.g., xterm), then do "ssh" followed by "screen bash". If disconnected (laptop closed,vpn disconnected, etc), the remote shell stays active. Re-login & re-connect via "screen -r". I only bring this up since I've seen people run vnc just for basic shell access (or run a remote xterm displayed locally); most of the time (but of course not always), simple shell access will suffice.
Nov
12
comment Where is the core of Unix?
i remember year-long debates on terminology and "unix-ness" (back in comp.unix.*)... agreeing to disagree is a good idea. But, Rob is correct :-)) The distaste for the verbosity of "unix-like" led to the moniker "Un*x"; plus, "Unix" is a registered trademark, and most of us scruffy-beard types don't care for terms or software that restricts use. So please forgive us (old dogs) our persnickety tendencies. And to all noobs: know what is unix vs linux, just to save yourself the flames in all the forums out there less hospitable than this one.
Nov
10
comment Where is the core of Unix?
The question seems to be about building an OS from scratch; LFS is about building a (new) Linux distribution from scratch. For example if @Justin wanted a "JustIX" distro of Linux to complete with Mint, rather than actually developing a kernel separate from Unix/Linux, while at the same time building on the knowledgebase and legacy of Un*x.
Jan
20
comment Permissions for a submission script
@Bean no need to learn version control; they just have to follow instructions. And that's true in either case. Either they follow instructions for a home-grown "commit script" (/opt/bin/submit_hmwk.sh my_homewk.py); or, follow instructions a (very) popular "commit script" that happens to be called "git commit -a; git push". Which is more difficult? Well, the 2nd option (two commands) is perhaps 2x more difficult than the 1st (one command). Still, the "git" option is infinitely more useful, considering the custom script option has value=0 to the student. But admittedly it'd be fun to write ;-)
Jan
14
comment how can a makefile detect whether a command is available in the local machine?
more on using "type" : cmd=$(for cmd in foo md5 md5sum bar; do type $cmd >/dev/null 2>&1 && echo $cmd && break; done); $cmd file1 file2 file3 > md5.txt