Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some Xorg files not loaded #4

Closed
fedeizzo opened this issue Jun 28, 2020 · 9 comments
Closed

Some Xorg files not loaded #4

fedeizzo opened this issue Jun 28, 2020 · 9 comments

Comments

@fedeizzo
Copy link

fedeizzo commented Jun 28, 2020

Hi,

I install the emptty from the aur package. I use:

  • ~/.Xresources to fix dpi problem in a second monitor
  • ~/.Xmodmap to swap some keys of my keyboard

I think that these files aren't loaded because dpi is not fixed and keys aren't swapped. The emptty log:

2020/06/28 11:11:22 Authenticate OK
2020/06/28 11:11:23 Defined Environment
2020/06/28 11:11:23 Created XDG folder
2020/06/28 11:11:23 Defined uid
2020/06/28 11:11:23 Defined gid
2020/06/28 11:11:23 Defined gids
2020/06/28 11:11:23 Defined Xorg environment
2020/06/28 11:11:23 Created xauthority file
2020/06/28 11:11:23 Generated mcookie
2020/06/28 11:11:23 Generated xauthority
2020/06/28 11:11:23 Starting Xorg
2020/06/28 11:11:23 Started Xorg

X.Org X Server 1.20.8
X Protocol Version 11, Revision 0
Build Operating System: Linux Arch Linux
Current Operating System: Linux archlinux 5.7.6-arch1-1 #1 SMP PREEMPT Thu, 25 Jun 2020 00:14:47 +0000 x86_64
Kernel command line: initrd=\intel-ucode.img initrd=\initramfs-linux.img root=PARTUUID=<myPartuuid> rw
Build Date: 05 May 2020  05:08:17AM

Current version of pixman: 0.40.0
	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sun Jun 28 11:11:23 2020
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
2020/06/28 11:11:23 Starting dbus-launch bspwm
lemonblocks: no process found
lemonbar: no process found
11:12:04 INFO: Request to collector.githubapp.com blocked by host blocker.
11:12:05 INFO: Request to collector.githubapp.com blocked by host blocker.
11:12:23 INFO: Request to collector.githubapp.com blocked by host blocker.
11:12:34 INFO: Request to collector.githubapp.com blocked by host blocker.
11:12:35 INFO: Request to collector.githubapp.com blocked by host blocker.
11:12:38 INFO: Request to collector.githubapp.com blocked by host blocker.
11:12:47 INFO: Request to collector.githubapp.com blocked by host blocker.
11:13:07 INFO: Request to collector.githubapp.com blocked by host blocker.
11:13:09 INFO: Request to collector.githubapp.com blocked by host blocker.
@tvrzna
Copy link
Owner

tvrzna commented Jun 28, 2020

Hello,

you are right, these scripts are not started. Until it's developed, you can use workaround:

  1. set DBUS_LAUNCH=false in /etc/emptty/conf
  2. create .emptty in your home dir
  3. run chmod +x .emptty
  4. put this inside .emptty file
#!/bin/sh

xrdb -merge ~/.Xresources
xmodmap ~/.Xmodmap

exec dbus-launch bspwm

I know, that this is not cleanest solution, but it is faster than to wait until it's fixed.

edit: fixed script for loading files

@tvrzna
Copy link
Owner

tvrzna commented Jun 30, 2020

I've done some research and I've found out, that there is large number of possibilities, how to handle this specific issue.
Proposed .emptty solution wouldn't be as bad as it is, if there was option to run selected WM/DE. Some Display Managers prefers starting .xinitrc/.xsession files, some uses .xprofile and others.

I like quite a variant using .xprofile (~/.xprofile, /etc/xprofile), since it's "just" script, that runs before WM/DE is started and does not start WM/DE itself.

And here's the question, what is your standard way to invoke .Xresources and .Xmodmap? Is that by .xinitrc, by .xsession, .xprofile or some other way?

@fedeizzo
Copy link
Author

Hi, thanks for the reply. I used only two ways to start wm. The first one (in the past) through login in tty and manually launch of Xorg. Then i switched to lightdm and it does all the things for me. If I'm not wrong lightdm call all script individually without .xinitrc, .xsession, ecc.

tvrzna added a commit that referenced this issue Jun 30, 2020
@tvrzna
Copy link
Owner

tvrzna commented Jun 30, 2020

Hello,
I've tried many way how to handle loading configs and run scripts. I've learned, that many of these scripts are DM-specific. Plus the worst thing I've seen, different distros with different display managers use some of these scripts quite differently. I don't think, that is good idea to take responsibility out of users, so I've added option XINITRC_LAUNCH, which could be set to true or false (default false).

If it is defined to true and user have .xinitrc file within own home folder, the magic could be done. But not by emptty, just by user's intention. I am aware, that it looks like I'm trying to cover myself with alibi, but even they're just scripts, they could be quite complicated.

Please take a look on Samples page.

@fedeizzo
Copy link
Author

I think that this is the cleanest solution that follow the rule "do one thing and do it well". In my opinion you resolved my issue.

@fish47
Copy link

fish47 commented Sep 30, 2020

Hi everyone, I am an ArchLinux user too. But here comes a problem: why my "/etc/profile" is not sourced?
It seems that LightDM always sources "/etc/profile" before launch the DE, but emptty does not, is it by design too?
https://github.com/canonical/lightdm/blob/lightdm-1-30/debian/lightdm-session#L38

@tvrzna
Copy link
Owner

tvrzna commented Sep 30, 2020

Hello, as it was said in #8, it is up to user to configure own login script.

@fish47
Copy link

fish47 commented Oct 1, 2020

Some DMs have adopted the "wrapper-script" to initialize envs before the DE launch, such as
ly https://github.com/nullgemm/ly/blob/master/res/wsetup.sh
sddm https://github.com/sddm/sddm/blob/v0.18.1/data/scripts/Xsession
LightDM https://github.com/canonical/lightdm/blob/lightdm-1-30/debian/lightdm-session#L38

Maybe we should do it for dumb end users?
For experts, provide an option to disable the "wrapper-script", and let them play around the ~/.config/emptty script.

@tvrzna
Copy link
Owner

tvrzna commented Oct 1, 2020

I am aware of this kind of scripts and I was thinking about them in some of initial commits. I understand the motivation, but there could be so many shells with custom profile/rc scripts. And of course there are scripts just for Xorg environment. I don't think I could be able to keep it correctly configured for Xorg and Wayland.

But don't get easily scared, I appreciate each input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants