Unable to get .Xresources honoured in porteus-4.0/xfce

Post here if you are a new Porteus member and you're looking for some help.
Post Reply
User avatar
omero
White ninja
White ninja
Posts: 22
Joined: 31 Aug 2019, 10:49
Distribution: omerux-4v

Unable to get .Xresources honoured in porteus-4.0/xfce

Post#1 by omero » 12 Nov 2019, 15:15

Why .Xresources is not honoured?

Code: Select all

bash-4.4$ uname -a
Linux porteus 4.16.3-porteus #1 SMP PREEMPT Sat Apr 21 18:14:53 Local time zone must be set-- i686 Intel(R) Core(TM)2 Duo CPU     T7300  @ 2.00GHz GenuineIntel GNU/Linux

Code: Select all

bash-4.4$ whoami
omero
Logging to a session:
Terminals are appearing ´correct/as intended´ once directly "xrdb -mere ~/.Xresources"
Problem seems to be xinitrc (xfce) not initializing all the relevant things

How does one include attachements?
Relevant files:
/etc/inittab
/home/omero/.Xresources


since ´env´ might not show all exported variables, using ´declare -p´

declare -p:

Code: Select all

declare -x BASEDIR="/home/omero/.config/xfce4"
declare -- BASH="/usr/bin/bash"
declare -r BASHOPTS="cmdhist:complete_fullquote:expand_aliases:extquote:force_fignore:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath"
declare -ir BASHPID
declare -A BASH_ALIASES=()
declare -a BASH_ARGC=()
declare -a BASH_ARGV=()
declare -A BASH_CMDS=()
declare -- BASH_COMMAND
declare -a BASH_LINENO=()
declare -a BASH_SOURCE=()
declare -- BASH_SUBSHELL
declare -ar BASH_VERSINFO=([0]="4" [1]="4" [2]="19" [3]="1" [4]="release" [5]="i586-slackware-linux-gnu")
declare -- BASH_VERSION="4.4.19(1)-release"
declare -x BOOTDEV="/mnt/sda6"
declare -- COLUMNS="80"
declare -- COMP_WORDBREAKS
declare -x CVS_RSH="ssh"
declare -x DBUS_SESSION_BUS_ADDRESS="unix:abstract=/tmp/dbus-gJC6vQmAEX,guid=5e834bcf2d2be7057e6417ec5dc6cec1"
declare -x DESKTOP_SESSION="xfce"
declare -a DIRSTACK=()
declare -x DISPLAY=":0.0"
declare -x DISTRO="porteus"
declare -x EDITOR="vim"
declare -ir EUID="9000"
declare -x FREETYPE_PROPERTIES="truetype:interpreter-version=35"
declare -a FUNCNAME
declare -x GDK_USE_XFT="1"
declare -x GLADE_CATALOG_PATH=":/usr/share/glade3/catalogs"
declare -x GLADE_MODULE_PATH=":/usr/lib/glade3/modules"
declare -x GLADE_PIXMAP_PATH=":/usr/share/glade3/pixmaps"
declare -a GROUPS=()
declare -x G_BROKEN_FILENAMES="1"
declare -x G_FILENAME_ENCODING="@locale"
declare -i HISTCMD
declare -- HISTFILE="/home/omero/.bash_history"
declare -- HISTFILESIZE="500"
declare -- HISTSIZE="500"
declare -x HOME="/home/omero"
declare -x HOSTNAME="porteus.example.net"
declare -- HOSTTYPE="i586"
declare -- IFS="        
"
declare -x INPUTRC="/etc/inputrc"
declare -x LANG="en_US.UTF-8"
declare -x LC_COLLATE="C"
declare -x LESS="-M"
declare -x LESSOPEN="|lesspipe.sh %s"
declare -i LINENO
declare -- LINES="24"
declare -x LOGNAME="omero"
declare -x LS_COLORS="<omissis>"
declare -x LS_OPTIONS="-F -b -T 0 --color=auto"
declare -x LYNX_CFG="/home/omero/.lynx.cfg"
declare -- MACHTYPE="i586-slackware-linux-gnu"
declare -x MAIL="/var/mail/omero"
declare -i MAILCHECK="60"
declare -x MANPATH="/usr/local/man:/usr/man"
declare -x MINICOM="-c on"
declare -x MODDIR="/mnt/sda6/porteus/modules"
declare -x OLDPWD
declare -- OPTERR="1"
declare -i OPTIND="1"
declare -- OSTYPE="linux-gnu"
declare -x PATH="/usr/local/bin:/usr/bin:/bin:/usr/games:/opt/porteus-scripts"
declare -a PIPESTATUS=([0]="0")
declare -x PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig"
declare -x PORTCFG="/mnt/sda6/porteus/porteus-v4.0-i586.cfg"
declare -x PORTDIR="/mnt/sda6/porteus"
declare -ir PPID="7430"
declare -x PROMPT_COMMAND="history -a"
declare -- PS1="\\s-\\v\\\$ "
declare -- PS2="> "
declare -- PS4="+ "
declare -x PWD="/home/omero"
declare -i RANDOM
declare -- SECONDS
declare -x SESSION_MANAGER="local/porteus:@/tmp/.ICE-unix/1067,unix/porteus:/tmp/.ICE-unix/1067"
declare -x SHELL="/bin/bash"
declare -r SHELLOPTS="braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor"
declare -x SHLVL="2"
declare -x SSH_AGENT_PID="1072"
declare -x SSH_AUTH_SOCK="/tmp/ssh-pSCJX0Ujulxv/agent.1071"
declare -x TERM="xterm"
declare -ir UID="9000"
declare -x USER="omero"

declare -x VDPAU_DRIVER="va_gl"
declare -x VDPAU_LOG="0"
declare -x WINDOWID="83886093"
declare -x XAUTHORITY="/home/omero/.Xauthority"
declare -x XDG_CONFIG_DIRS="/etc/xdg"
declare -x XDG_CURRENT_DESKTOP="XFCE"
declare -x XDG_DATA_DIRS="/usr/local/share:/usr/share"
declare -x XDG_MENU_PREFIX="xfce-"
declare -x XDG_RUNTIME_DIR="/tmp/xdg-runtime-omero"
declare -x XDG_SESSION_COOKIE="porteus-1573310145.236519-569199253"
declare -x XTERM_LOCALE="en_US.UTF-8"
declare -x XTERM_SHELL="/bin/bash"
declare -x XTERM_VERSION="X.Org 7.7.0(331)"
declare -- _="whoami"

User avatar
Blaze
DEV Team
DEV Team
Posts: 2721
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus current ☯ all DEs ☯
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

Unable to get .Xresources honoured in porteus-4.0/xfce

Post#2 by Blaze » 12 Nov 2019, 17:46

Hi omero.
Can you show output of this command

Code: Select all

cat /etc/X11/xinit/xinitrc
?

You must to have something like this:

Code: Select all

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

[ -f $sysresources ] && xrdb -merge $sysresources
[ -f $sysmodmap ] && xmodmap $sysmodmap
[ -f $userresources ] && xrdb -merge $userresources
[ -f $usermodmap ] && xmodmap $usermodmap

*********
..........etc
and not bat if you check /etc/X11/xinit/.Xresources
omero wrote:
12 Nov 2019, 15:15
How does one include attachements?
Relevant files:
/etc/inittab
/home/omero/.Xresources
you can use http://www.mediafire.com or any fileshare service.

Thanks.
Linux 5.4.0-rc7-porteus #2 SMP Tue Nov 12 17:45:45 UTC 2019 x86_64 Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Tobago PRO [Radeon R7 360 / R9 360 OEM] (rev 81) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 2260
Joined: 20 Mar 2012, 03:42
Distribution: 5.0rc1-64bit all-DE+more
Location: australia
Contact:

Unable to get .Xresources honoured in porteus-4.0/xfce

Post#3 by ncmprhnsbl » 12 Nov 2019, 21:47

omero wrote:
12 Nov 2019, 16:18
would you please comment how to correctly test that
all i did was:
copy /etc/X11/xinit/.Xresources to /home/guest/.Xresources
change some values (background/foreground/cursor color, scrollbar ...)
logout and log back in, run xterm/uxterm to check

i notice you're using i586, my test was in x86_64 ... may be relevant(edit: nope just tested the same)
edit2
did a further test: created a new account and did the same test... works too..
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
omero
White ninja
White ninja
Posts: 22
Joined: 31 Aug 2019, 10:49
Distribution: omerux-4v

Unable to get .Xresources honoured in porteus-4.0/xfce

Post#4 by omero » 13 Nov 2019, 02:55

bash-4.4$ ls -al /etc/X11/xinit/xinitrc

Code: Select all

lrwxrwxrwx 1 root root 12 Apr 16  2018 /etc/X11/xinit/xinitrc -> xinitrc.xfce
bash-4.4$ ls -al /etc/X11/xinit/xinitrc*

Code: Select all

lrwxrwxrwx 1 root root   12 Apr 16  2018 /etc/X11/xinit/xinitrc -> xinitrc.xfce
-rwxr-xr-x 1 root root  887 Oct 22  2017 /etc/X11/xinit/xinitrc.openbox
-rwxr-xr-x 1 root root  903 Oct 22  2017 /etc/X11/xinit/xinitrc.openbox-session
-rwxr-xr-x 1 root root 1198 Mar 17  2017 /etc/X11/xinit/xinitrc.xfce
cat /etc/X11/xinit/xinitrc

Code: Select all

#!/bin/sh
#  xinitrc.xfce - modified to work around xfce4session bug
#                 https://bugzilla.xfce.org/show_bug.cgi?id=8841


########################################################################
##  Merge in defaults and keymaps                                     ##
########################################################################

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

if [ -f $sysresources ]; then
    /usr/bin/xrdb -merge $sysresources
fi

bash-4.4$ cat /etc/X11/xinit/xinitrc
#!/bin/sh
#  xinitrc.xfce - modified to work around xfce4session bug
#                 https://bugzilla.xfce.org/show_bug.cgi?id=8841


########################################################################
##  Merge in defaults and keymaps                                     ##
########################################################################

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

if [ -f $sysresources ]; then
    /usr/bin/xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    /usr/bin/xmodmap $sysmodmap
fi

if [ -f $userresources ]; then
    /usr/bin/xrdb -merge $userresources
fi


if [ -f $usermodmap ]; then
    /usr/bin/xmodmap $usermodmap
fi

########################################################################
##  Start xfce Desktop Environment                                    ##
########################################################################

if [ -z "$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then
  exec ck-launch-session dbus-launch --exit-with-session /usr/bin/startxfce4
else
  exec dbus-launch --exit-with-session /usr/bin/startxfce4
fi


User avatar
omero
White ninja
White ninja
Posts: 22
Joined: 31 Aug 2019, 10:49
Distribution: omerux-4v

Unable to get .Xresources honoured in porteus-4.0/xfce

Post#5 by omero » 13 Nov 2019, 03:00

All seems well.
For some reasons, launching any of the ´terminals´... Do not show up the way theyŕe described in .Xresources
I can only get the intended terminal when ´xrdb...merge´ directly in a terminal, then open a new one...

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 2260
Joined: 20 Mar 2012, 03:42
Distribution: 5.0rc1-64bit all-DE+more
Location: australia
Contact:

Unable to get .Xresources honoured in porteus-4.0/xfce

Post#6 by ncmprhnsbl » 13 Nov 2019, 06:09

and what if you edit /etc/X11/xinit/.Xresources (and log out/in) ?
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
omero
White ninja
White ninja
Posts: 22
Joined: 31 Aug 2019, 10:49
Distribution: omerux-4v

Unable to get .Xresources honoured in porteus-4.0/xfce

Post#7 by omero » 13 Nov 2019, 23:41

ncmprhnsbl wrote:
13 Nov 2019, 06:09
and what if you edit /etc/X11/xinit/.Xresources (and log out/in) ?
Q1: Wouldnt that defeat the purpose of having a ~/.Xresources file
Q2: What is the purpose of having a dotfile in /etc/X11/xinit

But yes, will try that...

updated status *edit*
Talking to himself is not a good sign of mental stability but... A long story shortened --->
...
There once was a rogue /etc/X11/xinit/.Xresources
which would belong to /etc/X11/app-default and not being a dotfile but instead properly named as Xterm or something like that

Removing/relocating /etc/X11/xinit/.Xresources works
After removing/relocating /etc/X11/xinit/.Xresources to where it really belongs (/etc/X11/app-default),
the user ~/.Xresources is honored as expected

Thanks @ncmprhnsbl
I would file a bug report now, If I was inclined to being a troublemaker or I wish I knew how to properly file a bug report ;)

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 2260
Joined: 20 Mar 2012, 03:42
Distribution: 5.0rc1-64bit all-DE+more
Location: australia
Contact:

Unable to get .Xresources honoured in porteus-4.0/xfce

Post#8 by ncmprhnsbl » 14 Nov 2019, 03:05

omero wrote:
13 Nov 2019, 23:41
Q1: Wouldnt that defeat the purpose of having a ~/.Xresources file
yes, if you have a multiuser setup with each user having different preferences in their .Xresources file
otherwise, it's just a system wide setting..
omero wrote:
13 Nov 2019, 23:41
Q2: What is the purpose of having a dotfile in /etc/X11/xinit
good question... since i'm not responsible for putting it there i can only guess...perhaps for convenience of not editing /etc/X11/app-defaults/XTerm directly...
does xrdb care about the name of a file that it merges?

good that you have got it working for you :)
if it is a bug, it's not one i could reproduce :unknown:
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

User avatar
omero
White ninja
White ninja
Posts: 22
Joined: 31 Aug 2019, 10:49
Distribution: omerux-4v

Unable to get .Xresources honoured in porteus-4.0/xfce

Post#9 by omero » 15 Nov 2019, 01:04

ncmprhnsbl wrote:
14 Nov 2019, 03:05
omero wrote:
13 Nov 2019, 23:41
Q1: Wouldnt that defeat the purpose of having a ~/.Xresources file
yes, if you have a multiuser setup with each user having different preferences in their .Xresources file
otherwise, it's just a system wide setting..
omero wrote:
13 Nov 2019, 23:41
Q2: What is the purpose of having a dotfile in /etc/X11/xinit
good question... since i'm not responsible for putting it there i can only guess...perhaps for convenience of not editing /etc/X11/app-defaults/XTerm directly...
does xrdb care about the name of a file that it merges?

good that you have got it working for you :)
if it is a bug, it's not one i could reproduce :unknown:
omero wrote:
13 Nov 2019, 23:41
Q: Wouldnt that defeat the purpose of having a ~/.Xresources file
A: yes, if you have a multiuser setup with each user having different preferences in their .Xresources file
otherwise, it's just a system wide setting..
---
That is the reason for having /etc/X11/app-default (system wide) and ~/.Xresources (user)
The .Xresources dotfile is meant to allow one or as many users are there to override the system settings... If/When they so desire.
There should not be any *system wide* .Xresources dotfile
Editing any /etc/X11/app-default/<whatever> is NOT a good idea... Those ARE the system defaults not to be tampered with!

---
Q:does xrdb care about the name of a file that it merges?
A:No, all xrdb cares about it is the file content with a correct syntax. It could benefit from cpp using traditional style for syntax...

Code: Select all

xrdb -cpp "/usr/bin/cpp -traditional"  ~/.Xresources
---
if it is a bug, it's not one i could reproduce
I did not do anything special, had this since day 1.
All I did was to create ~/.Xresources in home directory and noticed it was not having any effects unless xrdb was invoked directly

NOTE:
I did not copy /etc/X11/xinit/.Xresources, did not even suspect one such dotfile would be there!
I did create a brand new ~/.Xresources (which worked only when invoked directly via xrdb)

not sure it makes sense, but removing rogue /etc/X11/xinit/.Xresources really solved this problem (that thing shouldnt be there)

Post Reply