Lost /etc/profile

Since one of the latest updates, it seems my system is a bit broken. Commands like startx fail, and I recieve masages that xauth, xinit and elf are commands that can't be found. I wanted to have a look at /etc/profile, to check patch declaration, and noticed the whole file is crappy. It now looks like
^?ELF^A^A^A^@^
fffuffffuffff^@^@
uffffd^G^F^H^ufff
fE^L^uffffD$^D^uf
Hm, mysterious. I would be glad if someone could post a standard profile set here to give me a template.

The original /etc/profile from bash package:
# /etc/profile
export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin"
export MANPATH="/usr/man:/usr/X11R6/man"
export LESSCHARSET="latin1"
export INPUTRC="/etc/inputrc"
export LESS="-R"
# Locale settings (find your locale with 'locale -a')
export LANG="en_US"
export LC_COLLATE="C"
export COLUMNS LINES
export PS1='[u@h W]$ '
export PS2='> '
umask 022
if [ "$TERM" = "xterm" -o "$TERM" = "xterm-color" -o "$TERM" = "rxvt" ]; then
PROMPT_COMMAND='echo -ne "33]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}07"'
fi
# load profiles from /etc/profile.d
# (to disable a profile, just remove execute permission on it)
for profile in /etc/profile.d/*.sh; do
if [ -x $profile ]; then
. $profile
fi
done
unset profile
# End of file
If you still have the packages cache, you could also see this file in /var/cache/pacman/pkg/bash-3.0-3.pkg.tar.gz

Similar Messages

  • Build fails no /etc/profile.d/gnome.sh

    I am trying to build gnome-system-tools and I keep failing here:
    [root@localhost system-tools]# makepkg -i
    ==> Making package: system-tools-backends 1.2.0-1 (Fri Sep 21 12:26:10 EDT 2007)
    ==> Checking Runtime Dependencies...
    ==> Checking Buildtime Dependencies...
    ==> Retrieving Sources...
       -> Found system-tools-backends-1.2.0.tar.bz2 in build dir
       -> Found archsupport.patch in build dir
    ==> Validating source files with md5sums
        system-tools-backends-1.2.0.tar.bz2 ... Passed
        archsupport.patch ... Passed
    ==> Extracting Sources...
       -> tar -xf system-tools-backends-1.2.0.tar.bz2
    ==> Removing existing pkg/ directory...
    ==> Starting build()...
    PKGBUILD: line 20: /etc/profile.d/gnome.sh: No such file or directory
    What am I missing?  Why no /etc/profile.d/gnome.sh?
    I am running Gnome 2.18.3 and starting it with gdm.  Totally lost at this point.
    Thanks

    The output in your post says you're trying to build system-tools-backends, not gnome-system-tools. According to the relevant AUR page, that package was submitted over two years ago, and hasn't been updated since. The upstream release date for system-tools-backends 1.2.0 was 08 March 2005.
    Find a more recent release, and see if that builds correctly for you.

  • Firefox lost my profile. My husband's profile seems to have overridden my own even on my Windows login.

    Firefox 3.6.3 lost my profile. My husband's profile has overridden mine even on my Windows login. I cannot even log in to sites on my Windows profile because the cookies are gone and the sites refuse to recognize me. I am running Windows Vista.Please help.

    Do the two of you share a vista account? If not, then it should still work if you log in to your account. Firefox keeps profiles separate per windows account.
    If the two of you ''do'' share a Vista account, then go to '''Help > Troubleshooting Information''', and click on '''Open Containing Folder'''. That should open the current profile folder in windows explorer. Move one folder up to see if there are other profile folders in existence. See [[Managing Profiles]]

  • HT1386 I lost my profile on my PC and I copied everything over to a new profile.  I installed Itunes and copied over all my music files and now it says that sync's but it is not getting a new download.  what do I do?

    I lost my profile on my PC and I copied everything over to a new profile.
    I uninstalled Itunes and then reinstalled the latest version.
    I added all of my music files to the itunes library
    I tried to sync,  but my latest download is not transfering from Itunes to the Ipod.
    what do I do now?
    Help Please !!!!

    Do this. If all the synced media like apps and music are alread in the the iTnunes library just backup the iPod and restore from that backup
    iOS: How to back up and restore your content
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive: Apple Support Communities

  • /etc/profile isn't sourced on startx

    the command
    source /etc/profile
    isn't used on startx
    and now all paths and locales aren't set, has anyone an idea whats wrong here?
    if i login on console it behaves normal. But if i login on X with qingy or slim it doesn't work.
    It also doesn't work if i startx on a console with /etc/profile sourced.
    i hope someone can help me.
    so long
    ukognos

    but if i run X, there's no locale set, or environment variable, so how can i set that at startup of X?

  • [SOLVED] How do I set the default umask? Not in /etc/profile

    Hi guys
    This is probably not what you expect to hear about umasks... I have set it in /etc/profile:
    [2] ognyan@xxxlinux : ~ >grep umask /etc/profile
    #Set our umask
    umask 002
    If I log on via ssh, my umask is 0002. I can start a vnc server and a konsole inside, which has umask 0002. So far so good...
    I also have a vnc server running as a service. If I open a konsole from inside this vnc, bash says umask 0022. So there must be a more-default setting for umask, than /etc/profile. I found a setting in /etc/login.defs and changed it to "UMASK 007", then even rebooted, but bash inside the vnc service stays with umask 0022.
    It seems not to be a setting of KDE, since both vnc sessions have different umasks, inherited by their parents. What provides the environment for the service and how can I control it?
    Last edited by bigblondewolf (2013-12-11 08:37:26)

    on my server i have something like this in ~/.profile:
    # the default umask is set in /etc/profile; for setting the umask
    # for ssh logins, install and configure the libpam-umask package.
    umask 002
    and at home i have ~/.bash_profile, but no umask in it.
    or is this answer too obvious? not quite sure i get your problem.

  • /etc/profile: line 28: ulimit: max locked memory: cannot modify limit: Oper

    Hi;
    I writed one sh which is checking tablespace size and its working well ( i used this before for someother client) Now i try to run it on one server and i have this error:
    /etc/profile: line 28: ulimit: max locked memory: cannot modify limit: Operation not permitted in /var/spool/mail/root
    Anyone has idea what is problem?
    Thanks

    Well, check line 28 of /etc/profile, and see what command it is trying to execute. If it's a ulimit -l command, check if the value it is trying to set the limit to is higher than the current ulimit value of the current user. If it is, then that operation is not allowed. You can increase the limit for the current user (at login time) by modifying /etc/security/limits.conf . This is documented in the various guides, notes, whitepapers that talk about installing Oracle database on Linux.

  • /etc/profile doesn't get sourced at start of session

    Hello to everyone :D. I've been using Windows my entire life until January when someone recommended me Ubuntu. I tried (and loved it) for some months but got sick of the lack of control, the pre-installed packages and the incorporation of Unity in 11.04, so went all out for Arch.
    It took me 2-whole-days to install everything correctly (because of issues related with the PC rather than Arch itself) and I've been configuring it bit by bit in the last two weeks (wasted my whole winter vacations on it, but it was worth it :P), ran through a lot of trouble which I've been (somehow) able to overcome almost completely by just using the Wikia (and Googling through old forum posts). I also learned a whole lot about Linux in that time and I'm very happy with my new system :D. So a thanks a lot to all the community for the great documentation you've developed, it really made a complete Linux-newbie (with a whole lot of patience :P) get a working system all by himself which is saying a lot.
    ------------------------------------------------------------------START READING HERE TO SKIP PERSONAL INTRO :P ---------------------------------------------------------------------
    However right now I'm having a couple of minor issues which don't prevent me from enjoying the system but I would rather fix in order to have a clean system (and avoid further trouble in the future). I have LXDE installed with Slim as a login manager which I start through inittab in run level 5 to start X (relevant files attached at the end of the post). The system was working perfectly but I noticed that my session wasn't being registered by ConsoleKit (it didn't appear in the "who" command which was a problem for some scripts I was building) so I read the wikia and added the following lines at "slim.conf":
    sessionstart_cmd    /usr/bin/sessreg -a -l $DISPLAY %user
    sessionstop_cmd     /usr/bin/sessreg -d -l $DISPLAY %user
    Which happily made the session appear at the "who" command as I needed. However some days after that, for no apparent reason (actually me touching config files probably), my PATH environment variable was wrong after booting (just had the /bin and /usr/bin on it, not /sbin or /usr/sbin). This just happens when I boot directly to X, when booting from a terminal the variable value was correct.
    After some research (and adding debugging commands in the initialization scripts) I concluded that my "/etc/profile" script wasn't getting ran when I boot directly to X. In order to bypass this problem temporally I made a (absolutely horrible and temporal) patch by adding the line "source /etc/profile" at ".xinitrc" which sourced the file and gave me the right value for the PATH variable. However by doing it seems I ruined the former problem and my session doesn't appear at the "who" command again :S (by removing it again, the session appears again but the PATH variable is wrong). So I've been searching exactly when /etc/profile is sourced and, apparently, it's when the "login" command is executed (which I guess is done by either the LXDE session or Slim itself).
    Since none of these packages got updates when the problem appeared I'm pretty sure it must have been one of my editions of the config files. So I leave the ones I think are relevant to the issue (and the ones that I tinkered it with the most).
    If anyone has the time to point me in the right direction I would greatly appreciate it:
    /etc/rc.conf: http://pastebin.com/qd5xYYsT
    /etc/inittab: http://pastebin.com/M1h60Hym
    /etc/slim.conf: http://pastebin.com/iaRqya07
    /etc/profile: http://pastebin.com/JLtNCMtn
    ~/.xinitrc: http://pastebin.com/XGrNuhpv
    My rc.local file is completely blank and rc.sysinit and rc.multi haven't been modified from their default values. If you need any more files, logs or any kind of experiment to gather more info just let me know and I'll post it as soon as I read it.
    Thanks a lot in advance :-).
    Last edited by facucosta (2011-07-27 08:29:50)

    There is quite some confusion about the different startup files For real terminal work you can check the bash manual. Graphical login managers however do not always follow these rules even though Slim should read /etc/profile as /etc/slim.conf seems to invoke bash with --login... You could try to put the settings in /etc/environment (see the arch wiki). There might also be a slim specific bug
    --edit--
    On second look line 35 seems odd in your slim.conf. You could try to change it to:
    login_cmd           exec /bin/sh --login ~/.xinitrc %session
    Last edited by FarmerF (2011-07-27 11:10:15)

  • /etc/profile.d scripts

    A while ago, I was helping a friend installing archlinux on his laptop.
    He wanted to use tcsh as his main shell, as he is used to this from FreeBSD.
    We then discovered that his path was never updated after installing new packages (for instance firefox) and then running source /etc/profile
    The reason, we later found out, was that most (if not all) of the scripts in /etc/profile.d does not have a valid shebang (usually the top row of a script, looking something like #!/bin/sh , telling the computer which shell to run the script in).
    This, in combination with tcsh (and probably csh as well, we never tested that though), results in our problem, since tcsh does not have the command export, which is built in in bash (and sh, zsh, and most of other shells out there).
    Tcsh uses the command set instead.
    My little question is this: Why doesn't those scripts have proper shebangs, so that it would be possible to use archlinux with tcsh?
    Does anybode have a good answer to that, and is this something that should be corrected in some way?

    As those files are getting sourced through /etc/profile they don't need a proper shebang.
    The only distro I know with support for csh is Slackware, don't expect it in Arch.

  • Help with pico /etc/profile

    I have redhat 7.3 and i install the sdk. Its in usr/java/j2sdk1.4.1/bin
    Where exactly do I put the line path so every user can use the java/javac etc commands anywhere. I tried. but it dont work. Im I clicked on save settings, but im not sure that saves it. I was trying to follow the other thread instructions but everyone seems kinda different. Im very new to linux by the way. Think i installed it by accident :P
    # /etc/profile
    # System wide environment and startup programs, for login setup
    # Functions and aliases go in /etc/bashrc
    pathmunge () {
    if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
    if [ "$2" = "after" ] ; then
    PATH="$PATH:/usr/java/j2sdk1.4.0/bin"
    else
    PATH=$1:$PATH
    fi
    fi
    # Path manipulation
    if [ `id -u` = 0 ]; then
    pathmunge /sbin
    pathmunge /usr/sbin

    It seems to me that when ".plist" files contain references to other files or folders, most require full paths and they won't accept anything to represent a generic "home". Either that, or items are represented by "alias" data, referring to a specific file, which would be completely independent of paths. That of course means that any sort of "template" account must avoid containing references to items within the "home" folder because the template will contain references to the original items, not their counterparts in the new user's home. Note that things like the "sidebar" in a regular account or the "Dock" in a "Simple Finder" do contain shortcuts to items within the "home" folder, but these aren't generated from ".plist" files in the template but rather are generated on the fly by "Finder" during login.
    In the case of the default download location for "Safari", I think it defaults to the user's "Desktop" in the absence of a ".plist" file. However, if the user changes the location, then a ".plist" file is created at that point. It would also appear that the default download location is set to the user's "Desktop" if the default Safari "home page" is changed, which also causes the same file to be created. The file appears to be: "~/Library/Preferences/com.apple.internetconfigpriv.plist"
    I haven't tested this to see if it would work, but it might be possible to modify your existing template to remove the reference to the "download folder" while retaining the desired Safari "home page" using something along these lines:<pre style="overflow:auto; padding: 5px; width: 500px ; font-size: 10px; border:1">sudo defaults delete /System/Library/User\ Template/English.lproj/Library/Preferences/com.apple.internetconfigpriv DownloadFolder</pre>

  • Something similar to /etc/profile in LDAP?

    My /etc/profile contains a logging feature which tracks the history of a local user. It doesn't work for ldap users though since I don't think LDAP looks at this file when ldap users login to a client.
    Is there some way to make ldap users use this file as the initial login profile or is there some way to setup something similar in LDAP? ldapaddent won't add this file. The only thing I can think of is to make some sort of change on cn=default,ou=profile,dc=example,dc=com but I'm unsure as to whether that will work or how exactly to set it up.
    Any help on this would be appreciated. Thanks.

    Hi Liam. Thanks for your reply. When I used the Update Credit Card option and tested the form, I got the error message "Credit Card Payment Failed….Invoice Number Not Found". But after search for that error message in this forum, I found out that I should be using the "Credit Cards (existing orders)" option. This has worked, ie payment was successfully processed and was applied to the existing order; a new invoice was not created. I have received a receipt from the payment gateway (eWay) but not one from BC. Also, upon successfully submitting the form, I was then taken to a totally blank page. I'll have to do some more testing to see whether the blank page was just a one off. If not, I'll try adding code in the Action part of the form to redirect to specific page.
    So thanks for your help. Though it didn't give me the correct answer, it l led me to it.

  • Can anyone post a mostly-default /etc/profile? I deleted mine -.-

    I was trying out some vim commands and accidentally wiped my /etc/profile -.-
    I've replaced some of the basic stuff like $PATH, but it still looks far shorter than the previous version. I also found some other examples on the web but I'd like to have the Arch defaults back and customize from there (: Could someone post theirs? Thanks a bunch.

    $ cat /etc/profile
    # /etc/profile
    # This file is intended to be used for ALL common
    # Bourne-compatible shells. Shell specifics should be
    # handled in /etc/profile.$SHELL where $SHELL is the name
    # of the binary being run (discounting symlinks)
    # Sections taken from SuSe's /etc/profile
    # Note the explicit use of 'test' to cover all bases
    # and potentially incompatible shells
    #Determine our shell without using $SHELL, which may lie
    shell="sh"
    if test -f /proc/mounts; then
    case $(/bin/ls -l /proc/$$/exe) in
    *bash) shell=bash ;;
    *dash) shell=dash ;;
    *ash) shell=ash ;;
    *ksh) shell=ksh ;;
    *zsh) shell=zsh ;;
    esac
    fi
    # Load shell specific profile settings
    test -f "/etc/profile.$shell" && . "/etc/profile.$shell"
    #Set our umask
    umask 022
    # Set our default path
    PATH="/bin:/usr/bin:/sbin:/usr/sbin"
    export PATH
    # Export default pkg-config path
    PKG_CONFIG_PATH="/usr/lib/pkgconfig"
    export PKG_CONFIG_PATH
    # Some readline stuff that is fairly common
    HISTSIZE=1000
    HISTCONTROL="erasedups"
    INPUTRC="/etc/inputrc"
    LESS="-R"
    export HISTSIZE HISTCONTROL INPUTRC LESS
    # Load profiles from /etc/profile.d
    if test -d /etc/profile.d/; then
    for profile in /etc/profile.d/*.sh; do
    test -x $profile && . $profile
    done
    unset profile
    fi
    # Termcap is outdated, old, and crusty, kill it.
    unset TERMCAP
    # Man is much better than us at figuring this out
    unset MANPATH
    And, you could retrieve that file from core/filesystem too.
    Last edited by hullap (2010-04-04 11:52:47)

  • Help! -sh: /etc/profile: is a directory!

    My PowerBook was locked, so I hold down the power button to reboot and this come up:
    -sh: /etc/profile: is a directory
    -sh-2.05b#
    I have read some posts on this forum, I got to the part where I type fsck -y, showed:
    /dev/rdisk0s5
    Root file system
    Checking HFS Plus volume.
    fsck_hfs: Volume is journaled. No checking performed.
    fsck_hfs: Use the -f option to force checking.
    so I typed fsk -f, this showed:
    /dev/rdisk0s5
    Root file system
    Checking HFS Plus volume.
    Checking Extents Overflow file.
    Checking Catalog file.
    Invalid record count
    (4, 12)
    Volume check failed.
    Can anyone help? any help will be appreciated...
    Message was edited by: lxxl

    Hello and thanks for replying so quickly,
    Well I got an install disk and I rebooted with C holding down, but here comes another problem, I got the panic:
    panic(cpu 0 caller 0x002E0BF4): Unable to find driver for this platform: "PowerBook3,5".
    Latest stack backtrace for cpu 0:
    Backtrace:
    0x00099EA4 0x0009A860 0x00027A28 0x002E0BF4 0x002BCC60 0x002BDDB0 0x002BFC28 0x002BED3C
    0x000ADE14
    Procedding back via exception chain:
    Exception state (sv=0x0125EA00)
    PC=0x00000000; MSR=0x0000D030; DAR=0x00000000; DSISR=0x00000000; LR=0x00000000; R1=0x00000000; XCP=0x00000000 (Unknown)
    Kernel version:
    Darwin Kernel Version 8.6.2: Thu Apr 13 18:51:54 PDT 2006; root:xnu-792.9.59.obj~1/RELEASE_PPC
    No debugger configured - dumping debug information
    MSR=00001030
    Lastest stack backtrace for cpu 0:
    Backtrace:
    0x00099EA4 0x0009AA58 0x00027A28 0x002E0BF4 0x002BCC60 0x002BDDB0 0x002BFC28 0x002BED3C
    0x000ADE14
    Procedding back via exception chain:
    Exception state (sv=0x0125EA00)
    PC=0x00000000; MSR=0x0000D030; DAR=0x00000000; DSISR=0x00000000; LR=0x00000000; R1=0x00000000; XCP=0x00000000 (Unknown)
    Kernel version:
    Darwin Kernel Version 8.6.2: Thu Apr 13 18:51:54 PDT 2006; root:xnu-792.9.59.obj~1/RELEASE_PPC
    panic: We are hanging here...
    Message was edited by: lxxl

  • Aterm now opens with source /etc/profile

    I was in aterm when I did source /etc/profile, but now whenever I open aterm I get the results of source /etc/profile. Xterm doesn't do this, only aterm. Why is it doing this and how can I fix it?

    just add "source /etc/profile" (without the quotes) to .bashrc (thats located in ur home directory)

  • Not executing /etc/profile

    Hi,
    I installed 10.4.2 from the CD that came with my PowerBook. Later, realising that X11 was not installed automatically, I reinstalled the entire OS using the custom mode. The old OS was shifted to PreviousSystem, which I deleted subsequently.
    I notice that on booting, the command /etc/profile is not executed. As a result, the system wide PATH that should be available for all users does not get set up. Is there a bug or am I looking at the wrong profile file?
    For individual users, .bash_profile is not automatically executed. Every time I have to issue the command "source .bash_profile" to execute them. I have the same question as above: is there a bug, or am I looking at the wrong file?
    Thanks.
    Kannan

    /etc/profile is not supposed to be executed on booting. It and .bash_profile are only executed when a login bash shell is started. A new Terminal window starts a login shell; xterm does not. A non-login shell runs .bashrc. If you are using xterm, and want to run the profiles, you can source them in your .bashrc.

Maybe you are looking for

  • About quicktime plug in "tab" freezes in IE7?

    http://www.apple.com/trailers/independent/risebloodhunter/trailer/ Can someone tell me if when clicking on the about quicktime plug in tab it freezes in IE7? On my computer it always freezes in IE7. This happends on Windowes Vista with Quicktime 7.1.

  • How to use FMS on OPCH field to query value on a field in PHC1 form?

    Hi All, I have a problem. I created a user defined field in the AP Invoice form (parent form-OPCH). Now I would like to use the formatted search to add a query to that field that will select a value from another field also on the same form but at the

  • Contact numbers not displaying properly

    In addition to Siri and voice control not working at all, my contacts are displaying incorrectly. I live in the 815 area code region and my phone displays my most used numbers as (81)5-123-4567 as opposed to 815-123-4567. This means NONE of my contac

  • For info regarding refused connections on iChat

    This is for info as my problem was solved last night. After a whole week of frustration I finally managed to see and talk to my parents who live in France. We bought the New iMac at the same time and I set theirs up on my last trip to France a couple

  • Idoc for PO changes

    Hi, For any new PO created, an idoc is getting triggered automatically and the same is communicated to vendor through portal. Please let me know how to trigger idoc for any changes / amendments to the purchase order. regards, C. ASHOK RAJ