Other Help Topics :: export PRINTER=lp in bootlocal.sh not working



Quote
Is the export command supposed to be in .bash_profile, bash.bashrc, .xinitrc, or .bashrc? <snip> Some of these files are in more than one directory, so which is the appropriate one to edit?
Quote
Conclusion: it should work in <snip> where the top of the list is probably the better one to use - unless you just want it for the current user.


Quote
Exactly what are these files for? <snip> What's the startup mechanism, and why is there so much confusing information?
If you really want to know, looking up the bash manpage could be a good place to start.

Quote
All I want here is to get a certain command to execute AUTOMATICALLY EVERY TIME I boot up.
You're trying to set a environmental variable that propagates (which is different).

OK, I see that /etc/bashrc is the file.  I know this is the file that executes automatically, because I see it contains:
alias which="type -path"
alias dir="ls"

And typing "alias" confirms that these aliases were set.

So how do I edit the file given that I'm not allowed to do so?  The file permissions for the file and directory shouldn't be stopping me (full permission provided), so what's the problem?

Quote
OK, I see that /etc/bashrc is the file.
Where do you see /etc/bashrc in the previously posted list?  Did you read through the whole post?

Why isn't anyone here able to give a straight answer?  All I'm trying to do is figure out what file to put the command "export PRINTER=lp" so that it automatically executes every time so I don't have to do it manually.  And that's only ONE step of several more steps I need to be able to print without having to go through the setup mumbo jumbo EVERY TIME.

I don't know what you expect me to do.  The pdf document on printing leaves out some important details.  The book provides even fewer details.  Everyone here gives cryptic and incomplete instructions.  Does anyone have any idea of what's going on?  I'm starting to get the impression that nobody really understands the printing mechanism in DSL but is unwilling to say so.

OK, I guess being new to a shell environment can be hard at times, but you must realize that the docs, etc. are mostly out-of-sync with the current DSL versions.  I won't comment on the rest of your post.

Here's a script to do some implementation that may work.  (OK, I'm assuming you know how to use one though).  Just off the top of my head though - not tested.  And its probably best to run it as root.
Code Sample
#!/bin/sh
tmp=`mktemp -d ${TMPDIR}/myprofile.XXXXXX `
cd $tmp
mkdir etc
cat /etc/profile > etc/profile
printf "PRINTER=lp\nexport PRINTER\n" >> etc/profile
tar zcf `cat /opt/.mydsl_dir `/myprofile.tar.gz etc/profile --no-recursion
rm -rf $tmp

Next Page...
original here.