.profile: line 1: export: command not found in .xsession-errors

I have some error stuff in .xsession-errors:

/home/swy/.profile: line 1: export: command not found

I don't know what cause that export error, because all exports work fine. If I comment some or all export(s) or delete them error still appear.

And my .profile file:

export EDITOR=/usr/bin/nano
export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
xset -b

Previously there is no such error. It is apeared after my reinstall fresh Manjaro.

Welcome :slight_smile:

Start with

$ inxi -Fxxxz

1 Like
  Host: hp Kernel: 5.2.0-0-MANJARO x86_64 bits: 64 compiler: gcc v: 9.1.0 
  Desktop: Xfce 4.13.5git-58bf69 tk: Gtk 3.24.10 info: xfce4-panel wm: xfwm4 
  dm: LightDM 1.30.0 Distro: Manjaro Linux 
  Type: Laptop System: HP product: HP ProBook 430 G3 v: N/A serial: <filter> 
  Chassis: type: 10 serial: <filter> 
  Mobo: HP model: 80FF v: KBC Version 40.72 serial: <filter> UEFI: HP 
  v: N78 Ver. 01.39 date: 04/16/2019 
  ID-1: BAT0 charge: 4.3 Wh condition: 34.8/34.8 Wh (100%) volts: 14.6/14.8 
  model: Hewlett-Packard Primary type: Li-ion serial: <filter> 
  status: Discharging 
  Topology: Dual Core model: Intel Core i5-6200U bits: 64 type: MT MCP 
  arch: Skylake rev: 3 L2 cache: 3072 KiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 19204 
  Speed: 500 MHz min/max: 400/2800 MHz Core speeds (MHz): 1: 500 2: 500 3: 500 
  4: 500 
  Device-1: Intel Skylake GT2 [HD Graphics 520] vendor: Hewlett-Packard 
  driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:1916 
  Display: x11 server: X.Org 1.20.5 driver: intel unloaded: modesetting 
  alternate: fbdev,vesa resolution: 1366x768~60Hz 
  OpenGL: renderer: Mesa DRI Intel HD Graphics 520 (Skylake GT2) 
  v: 4.5 Mesa 19.1.2 compat-v: 3.0 direct render: Yes 
  Device-1: Intel Sunrise Point-LP HD Audio vendor: Hewlett-Packard 
  driver: snd_hda_intel v: kernel bus ID: 00:1f.3 chip ID: 8086:9d70 
  Sound Server: ALSA v: k5.2.0-0-MANJARO 
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  vendor: Hewlett-Packard driver: r8168 v: 8.047.02-NAPI port: 3000 
  bus ID: 01:00.0 chip ID: 10ec:8168 
  IF: enp1s0 state: down mac: <filter> 
  Device-2: Intel Wireless 3165 driver: iwlwifi v: kernel port: 3000 
  bus ID: 02:00.0 chip ID: 8086:3165 
  IF: wlp2s0 state: up mac: <filter> 
  Local Storage: total: 585.00 GiB used: 9.52 GiB (1.6%) 
  ID-1: /dev/sda vendor: Seagate model: ST500LT012-1DG142 size: 465.76 GiB 
  speed: 6.0 Gb/s rotation: 5400 rpm serial: <filter> rev: LVM1 scheme: MBR 
  ID-2: /dev/sdb vendor: SanDisk model: SD7SN6S-128G-1006 size: 119.24 GiB 
  speed: 6.0 Gb/s serial: <filter> rev: 1006 scheme: MBR 
  ID-1: / size: 24.48 GiB used: 5.36 GiB (21.9%) fs: ext4 dev: /dev/sdb3 
  ID-2: /home size: 84.29 GiB used: 4.16 GiB (4.9%) fs: ext4 dev: /dev/sdb4 
  ID-3: swap-1 size: 8.00 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sdb2 
  System Temperatures: cpu: 39.0 C mobo: 0.0 C 
  Fan Speeds (RPM): N/A 
  Processes: 183 Uptime: 4h 16m Memory: 7.23 GiB used: 3.61 GiB (49.9%) 
  Init: systemd v: 242 Compilers: gcc: 9.1.0 Shell: bash v: 5.0.7 
  running in: xfce4-terminal inxi: 3.0.34 

My .profile

export EDITOR=/usr/bin/micro
export GTK2_RC_FILES="$HOME/.gtkrc-2.0"

nano is installed?
I use micro :wink:

Yep, all work and installed.

First line is empty?
But if it work :wink: :slight_smile:

Maybe change to first line


That's not help, as I tried different combinations). All exports are passed, but .xsession-error still show that message until I delete .profile file.

First line not empty.

export EDITOR=/usr/bin/nano
export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
xset -b
1 Like

:man_shrugging: I check my .profile and do not have this error.

Maybe someone else will look in here and find a solution?

I'd hope so. At all this is not a problem, but rather an attempt to find out a cause (because I didn't see any negative effects of that export error).

export should be part of BASH...

Are you updated?

sudo pacman-mirrors -f && sudo pacman -Syyu

1 Like



env | grep SHELL

echo $PATH



echo $PATH:


One thing I notice .. and I'm not sure it matters ... is that my PATH starts with


Whereas yours is further down the line...

What does your /etc/profile look like ?

Edit- oh and I almost forgot - check for pacnews with
pacdiff -o

For info only

~ >>> echo ${PATH//:/\\n}                                                                                 

no errors.

# /etc/profile

# Set our umask
umask 022

# Append our default paths
appendpath () {
    case ":$PATH:" in

appendpath '/usr/local/sbin'
appendpath '/usr/local/bin'
appendpath '/usr/bin'
unset appendpath

export PATH

# Load profiles from /etc/profile.d
if test -d /etc/profile.d/; then
	for profile in /etc/profile.d/*.sh; do
		test -r "$profile" && . "$profile"
	unset profile

# Source global bash config
if test "$PS1" && test "$BASH" && test -z ${POSIXLY_CORRECT+x} && test -r /etc/bash.bashrc; then
	. /etc/bash.bashrc

# Termcap is outdated, old, and crusty, kill it.

# Man is much better than us at figuring this out

pacdiff -o:

hm. well - .profile is initiated by login shell .. so maybe fixing up that lightdm pacnew could be important? ..

[I just checked and added some export to my .profile and it didnt generate a .xession-errors]

1 Like

Is it possible that some files have connections to my .profile like bash_logout or something else that use/import .profile file? 'cause I haven't 'standard' set of them in my home folder:

[swy@hp ~]$ ls -a
.              Books    .dmrc          .local       .Xclients
..             .cache   .esd_auth      .pki         .xinitrc
.bash_history  .config  .gnupg         .profile     .xsession-errors
.bashrc        Desktop  .ICEauthority  .Xauthority  .xsession-errors.old

I do see .bash_profile missing, which has this for me:

# ~/.bash_profile

[[ -f ~/.bashrc ]] && . ~/.bashrc

Yeah, I know, but it does not matter.

Forum kindly sponsored by