Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (3) </ 1 [2] 3 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: export PRINTER=lp in bootlocal.sh not working, HELP!  What's wrong?< Next Oldest | Next Newest >
^thehatsrule^ Offline





Group: Members
Posts: 3275
Joined: July 2006
Posted: July 04 2008,17:38 QUOTE

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).
Back to top
Profile PM 
jhsu Offline





Group: Members
Posts: 175
Joined: Mar. 2007
Posted: July 04 2008,18:08 QUOTE

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?


--------------
Current cheatcodes:
kernel /boot/linux24 root=/dev/hda1 quiet vga=normal noacpi noapm nodma noscsi frugal home=hda3 opt=hda3 restore=hda3 root=hda3
Back to top
Profile PM 
^thehatsrule^ Offline





Group: Members
Posts: 3275
Joined: July 2006
Posted: July 04 2008,18:36 QUOTE

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?
Back to top
Profile PM 
jhsu Offline





Group: Members
Posts: 175
Joined: Mar. 2007
Posted: July 04 2008,19:41 QUOTE

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.


--------------
Current cheatcodes:
kernel /boot/linux24 root=/dev/hda1 quiet vga=normal noacpi noapm nodma noscsi frugal home=hda3 opt=hda3 restore=hda3 root=hda3
Back to top
Profile PM 
^thehatsrule^ Offline





Group: Members
Posts: 3275
Joined: July 2006
Posted: July 04 2008,20:49 QUOTE

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
Back to top
Profile PM 
10 replies since July 04 2008,05:24 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (3) </ 1 [2] 3 >/
reply to topic new topic new poll
Quick Reply: export PRINTER=lp in bootlocal.sh not working

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code