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

Enable user installation #48

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

ldotlopez
Copy link

Enable user installation.

Since Makefile changes a lot I opted to create a separed Makefile.user
Test with make -f Makefile.user install DESTDIR=/tmp/test

@salty-horse
Copy link
Owner

Thanks!

Can you update the README's Install section with instructions on why you'd want this, and how to use it?

@ldotlopez
Copy link
Author

Can you update the README's Install section with instructions on why you'd want this, and how to use it?

Done, take a look

@salty-horse
Copy link
Owner

Sorry for the delay in getting back to you.

One problem on my Ubuntu machine is I don't have $XDG_CONFIG_HOME and $XDG_DATA_HOME defined, so I think the makefile should use defaults:

ifdef XDG_CONFIG_HOME
CONFDIR ?= $(XDG_CONFIG_HOME)
else
CONFDIR ?= $(HOME)/.config
endif

ifdef XDG_DATA_HOME
DATADIR ?= $(XDG_DATA_HOME)
else
DATADIR ?= $(HOME)/.local/share
endif

I'm also unfamiliar with environment.d - if it's a systemd thing then since ibus isn't a systemd service on my machine, it's not enough to run ibus restart after installation, and I don't think it will have any effect when I log out and log in. Is this correct? Perhaps we should instruct users to set their environment variables some other way?

@ldotlopez
Copy link
Author

Can I ask which OS/version do you have? or if you have some very specific setup? XDG_* variables has been supported for ages :-/
Anyway, I added your suggestion.

About the environment.d, it's the systemd for managing user-defined environment in a sane way (opposed to just add stuff into bashrc ).

It's not required to be a systemd service in order to inherit those variables. When a user logs-in, a systemd user session it's started, enviroment.d readed and all descendent processes (ibus included) inhreit it because the systemd session spawns all other processes.

The other option is to write into the user's bashrc which I find a bit intrusive but... 🤷 .

I also tweaked Makefile.user to restart ibus with the appropiated IBUS_COMPONENT_PATH variable set (on next user log-in it will be read as defined about).

@salty-horse
Copy link
Owner

I'm on Ubuntu 22.04. These are the XDG_ variables I have defined:

$XDG_CONFIG_DIRS
$XDG_CURRENT_DESKTOP
$XDG_DATA_DIRS
$XDG_MENU_PREFIX
$XDG_RUNTIME_DIR
$XDG_SESSION_CLASS
$XDG_SESSION_DESKTOP
$XDG_SESSION_TYPE

I'll test if the environment.d thing works on my machine. My only concern is that if it's not, we might want to mention an alternative for the user (even if it's just saying that they need to define an environment variable.)

@salty-horse
Copy link
Owner

Couldn't quite get it to work on Ubuntu.

IBus apparently saw the input method in ibus-setup, but it didn't add its own indicator, and gnome's indicator showed the IM but it didn't accept any keyboard input.

Do you mind if I leave this open if anyone else wants to tackle it? Is it important for you to have this committed, or are you fine with it staying in your branch?

@ldotlopez
Copy link
Author

I have been wanting to retake this PR for some weeks 🙏

You can leave this open and I will work on my branch until it's fully functional, no problem. I will ping you with any updates...

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

Successfully merging this pull request may close these issues.

2 participants