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 >
jhsu Offline





Group: Members
Posts: 175
Joined: Mar. 2007
Posted: July 04 2008,05:24 QUOTE

I'm having a series of printer problems.  I'll focus on just one here.  And no, the people on the printer forum weren't able to explain this.

As instructed, I put the command "export PRINTER=lp" in the opt/bootlocal.sh file so that I wouldn't have to type it up manually every time I booted up.

Why does DSL refuse to execute this command when I boot up?  I know that it's not being executed, because typing "env" in a shell shows NO "PRINTER=lp" in the output.

The commands I put in opt/powerdown.sh do execute when I power down.  So why aren't the commands I put in opt/bootlocal.sh executing as well when i start up?


--------------
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 
Juanito Offline





Group: Members
Posts: 1601
Joined: Sep. 2005
Posted: July 04 2008,05:33 QUOTE

Wouldn't you need to put "export PRINTER=lp" somewhere where it would be exported system-wide? .bashrc maybe?
Back to top
Profile PM 
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: July 04 2008,05:50 QUOTE

You should put that export in .bash_profile or .bashrc

.bashrc is run everytime you start a shell
.bash_profile is when you login in.

You can see examples of other exports by looking at those two files.
Back to top
Profile PM WEB 
^thehatsrule^ Offline





Group: Members
Posts: 3275
Joined: July 2006
Posted: July 04 2008,07:00 QUOTE

You know you could just bump your old threads... might be helpful to visit them too - will also explain your questions.  Even though bootlocal was initial suggestion, other files (such as the same advice given above) were also given as suggestions.  But I guess some things never seem to get done :P

Just to exactly make sure where variables can be propagated from, I just edited a couple files and used the mydsl system in a DSL 4.3 system.
Conclusion: it should work in
Code Sample
/etc/profile
~/.bash_profile
~/.bashrc
/etc/bash.bashrc
~/.xinitrc
where the top of the list is probably the better one to use - unless you just want it for the current user.

fwiw, /etc/bashrc did not work.  My guess is that bash.bashrc took precedence.

If you do not know how to edit (any of) these files, do not hesitate to ask.
Back to top
Profile PM 
jhsu Offline





Group: Members
Posts: 175
Joined: Mar. 2007
Posted: July 04 2008,16:33 QUOTE

Now I'm confused.  Is the export command supposed to be in .bash_profile, bash.bashrc, .xinitrc, or .bashrc?  Exactly what are these files for?  Some of these files are in more than one directory, so which is the appropriate one to edit?

What's the startup mechanism, and why is there so much confusing information?  All I want here is to get a certain command to execute AUTOMATICALLY EVERY TIME I boot up.

I'd make the changes right now, but I'm currently in a long download that I can't interrupt right now.


--------------
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 
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