Find the answer to your Linux question:
Results 1 to 9 of 9
Hi, i'm not completely new to the linux world, but there are many many things I can't wangle. My current problem: a global bash configuration. I've got a debian etch ...
  1. #1
    Just Joined!
    Join Date
    Sep 2008
    Posts
    6

    Searching for global bash config

    Hi,
    i'm not completely new to the linux world, but there are many many things I can't wangle.

    My current problem: a global bash configuration.
    I've got a debian etch system right now, very few packages installed, and now I want to have some commands executed after login for each user.
    I've already tried modifying /etc/bash.bashrc and /etc/profile, but nothing happens. So if I add "echo foobar" to bash.bashrc, it won't be executed after login, but interestingly if i manually start bash, "foobar" is shown up.

    so where i'm at fault?

    yours tornado

  2. #2
    Linux User
    Join Date
    Feb 2006
    Posts
    484
    i think you are using a graphical DE.
    So. find the startup menu set up the programs.

    on gnome ypu find this option in he session menu

    in lenny
    applications->system->preferences->session

  3. #3
    Just Joined!
    Join Date
    Sep 2008
    Posts
    6
    Thanks for your reply. I don't know what DE means (sry, I'm from germany), but if this is "GUI" (thats what I assume as you mentioned Gnome), no, I've got no gui installed at all, so only console is available

    hope you've got another hint for me

    greets Tornado

    edit: *urgs* of course, DE is desktop environment...as i wrote before, i don't use one

  4. #4
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    951
    .bashrc is executed for non-login shells. For logging in, use .bash_profile.
    "I'm just a little old lady; don't try to dazzle me with jargon!"

  5. #5
    Just Joined!
    Join Date
    Sep 2008
    Posts
    6
    Thanks, but tell me if I'm wrong, those are only per-user settings in the home directories, not?

    I searched for a global settings file

    greets

  6. #6
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    951
    I think they're in /etc/skel.
    "I'm just a little old lady; don't try to dazzle me with jargon!"

  7. #7
    Just Joined!
    Join Date
    Sep 2008
    Posts
    6
    Imho there are only the templates for new users.

    Sorry for annoying you so much, but that's really important for me

  8. #8
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    951
    I don't think Debian has what you want, but Ubuntu does and you could easily duplicate it. In Ubuntu there is a file called /etc/bashrc which contains global definitions and the users' ~/.bashrc files source it:
    Code:
    if [ -f /etc/bashrc ]; then
            . /etc/bashrc
    You could create a file like this and modify /etc/skel/.bash_profile to source it. Of course you would also need to do this with existing users' personal .bash_profile files - it wouldn't work retrospectively for the reason you've just given. But once done, any further change to /etc/bashrc would immediately be reflected in every user's login.
    "I'm just a little old lady; don't try to dazzle me with jargon!"

  9. #9
    Just Joined!
    Join Date
    Sep 2008
    Posts
    6
    Thanks, it seems this is my last possibility

    greets

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •