SCIENTIFIC-LINUX-USERS Archives

January 2017

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Shane Voss <[log in to unmask]>
Reply To:
Shane Voss <[log in to unmask]>
Date:
Thu, 26 Jan 2017 12:16:27 +0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (21 lines)
Dear Lionel,

> I have aliases defined in .sh files in my /etc/profile.d/ folder. When I log in on my computer directly in either KDE or Gnome, in any terminal (I tried Konsole, x-term and a few others), these aliases are not working (not set, I assume). Other commands in the same .sh files (like additions to $PATH) work fine.
>
> When I log in with the same user through ssh, or directly on the computer on a text console (I don’t know how these are called: you access them through alt+ctrl+2 for example), or with another user in Gnome or KDE, the aliases work again.

The  man  page for bash says:

        Aliases  are not expanded when the shell is not interactive, unless the
        expand_aliases shell option is set using shopt (see the description  of
        shopt under SHELL BUILTIN COMMANDS below).

It looks to me as if some of your shells do not think they are interactive.

    Shane
-- 
Shane Voss, Computing Officer, School of GeoSciences, University of Edinburgh

The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

ATOM RSS1 RSS2