Subject: printing and .profile problems

From: [email-masked] (chris beamis)
Date: Tue, 06 Aug 1996 23:19:35 -0700

Hi, I hope I'm doing this right. I tried to post to the linux.debian.user
newsgroup without success.

Anyway, I just installed Debian 1.1.2 in late July (my first Debian
installation), with a few problems. I've fixed some of them thanks to this
forum, but there are two among the many left that I'm trying to fix right now.

1. dselect didn't configure lpr correctly so I did it myself using the
printing HOWTO which I've done successfully many times before with Slackware
releases. Now root can print but users get the message, "usr can't create
/usr/spool/lpd/hp4p/.seq". This is with the permissions on that file set to
rw_rw_r as the HOWTO says. I tried changing the permissions to rw_rw_rw but
then a user gets the message "usr can't create
/usr/spool/lpd/hp4p/tfA006Aa01777". As far as I know I have the permissions
set correctly in all the directories leading to this file, but this seems
like a permission problem. I'm stuck!

2. another problem, which I didn't have under Slackware, is using a .profile
in the user's home area. I have just one line in it, "alias 'lo'=exit" which
has always worked before but the lo commanded doesn't get recognized. I also
tried renaming the file to .login but still no luck. Any ideas?

Thanks in advance for any help.

Chris Beamis

---

From: "N. Salwen" <[email-masked]>
Date: Thu, 8 Aug 96 01:10:48 EDT

>tried renaming the file to .login but still no luck. Any ideas?

If .bash_profile or .bash_login are present .profile will not be used

>From the bash info file -------->
------------------------------------------------------------------------------
File: features.info,  Node: Bash Startup Files,  Next: Is This Shell Interactive?,  Prev: Invoking Bash,  Up: Bash Specific Features

Bash Startup Files
==================

   When and how Bash executes startup files.

     For Login shells (subject to the`~/.profile' exists, then source it.
     
            If `~/.bash_profile' exists, then source it,
               else if `~/.bash_login' exists, then source it,
                  else if `~/.profile' exists, then source it.

---

From: Malc Arnold <[email-masked]>
Date: 8 Aug 1996 01:16:59 +0100

In article <[email-masked]>,
>tried renaming the file to .login but still no luck. Any ideas?

Check if there's a file called ".bash_profile" in the user's home
directory (there probably will be; it's the default).  If so, then
bash will execute that when you start a login shell, and ignore the
.profile.  Try sticking the alias in ".bash_profile" or ".bashrc".

>Thanks in advance for any help.

No problem, hope it helps.
-- 
M a l c . . .             |  "We've checked, and it's definitely not a bug.
([email-masked])  |  It's fixed in the new release."  -- Help line.

---

From: David C Winters <[email-masked]>
Date: Wed, 7 Aug 1996 19:20:24 -0400 (EDT)

> On Tue, 6 Aug 1996, chris beamis wrote:
>> /usr/spool/lpd/hp4p/.seq". This is with the permissions on that file 
>> set to >> rw_rw_r as the HOWTO says. I tried changing the permissions to 
>> rw_rw_rw but then a user gets the message "usr can't create
>> /usr/spool/lpd/hp4p/tfA006Aa01777". As far as I know I have the 
>> permissions set correctly in all the directories leading to this file, 
>> but this seems like a permission problem. I'm stuck!

	On the couple of Linux boxes I've set up recently, the 
directories under /usr/spool/lpd are chown'd either root or lp, and 
they're all chgrp'd lp.  I have the permissions set to 775 (ie, rwxrwxr-x)
and I haven't run into any problems so far.  (The benefit of my following 
up with this is I'm sure someone will let me know if these perms will 
cause problems I haven't forseen or encountered...)

On Wed, 7 Aug 1996 [email-masked] wrote:
> This line should look like:
> alias lo='exit'

	First, the original message doesn't state what shell is being 
used.  The construction of the sample alias command indicates it's of the 
Bourne family, but doesn't pin it down further than that.  My answer 
assumes that the GNU Bourne-Again shell (bash, typically /bin/bash) is 
the subject.
	The single quotes are only necessary in cases where the command 
to be aliased contains spaces.  I generally make more use of self-
defined functions than aliases, but the single quotes are only needed in 
an example such as

alias pico='pico -e -k -w -x -z'

(This is using the pico that accompanies pine v3.94; don't know if 
earlier pico versions support all of these arguments.)

David [email-masked] aka [email-masked]
Office: 3503 WeH, x86720

---

From: "Susan G. Kleinmann" <[email-masked]>
Date: Wed, 07 Aug 1996 17:49:27 -0400

Hi Chris --

You said:
> I tried to post to the linux.debian.user newsgroup without success.
There isn't any newsgroup -- just this mailing list.

> installation), with a few problems. ...
> 

I'm not sure what you mean that dselect didn't set up the printer 
"correctly", in this sense:  the various files and directories for 
lpr and lpd can be configured in any one of several ways,
using a variety of approaches.  The HOWTO's refer to Linux in general, and
not to the Debian distribution in particular.  Debian uses these 
permissions for directories in /usr/spool/lpd:

drwxrwsr-x   2 root     lp           1024 Jul 27 14:20 lp1/
drwxrwsr-x   2 root     lp           1024 Aug  7 16:15 lp2/

where lp1 and lp2 correspond to 2 different stanzas in /etc/printcap.

User 'lp' is defined this way in /etc/passwd:
lp:*:7:7:lp:/var/spool/lpd:/bin/sh

and group 'lp is defined this way in /etc/group:
lp:*:7:lp

If you've changed many of those things, you might want to try the
settings above and see if they work.

Good luck,
Susan Kleinmann

---

From: [email-masked]
Date: Wed, 7 Aug 1996 15:13:20 +0200 (MET DST)

alias lo='exit'

but NOT like:

alias 'lo'=exit

Did it work?!?!?!?!?

Leszek Gerwatowski
TG S.A
Warsaw, Poland