ibus-uniemoji icon indicating copy to clipboard operation
ibus-uniemoji copied to clipboard

Enable user installation

Open ldotlopez opened this issue 1 year ago • 7 comments

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

ldotlopez avatar Jul 07 '23 12:07 ldotlopez

Thanks!

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

salty-horse avatar Jul 07 '23 16:07 salty-horse

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

ldotlopez avatar Jul 11 '23 07:07 ldotlopez

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?

salty-horse avatar Jul 29 '23 11:07 salty-horse

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... :shrug: .

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).

ldotlopez avatar Aug 01 '23 16:08 ldotlopez

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 avatar Aug 01 '23 19:08 salty-horse

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?

salty-horse avatar Sep 17 '23 11:09 salty-horse

I have been wanting to retake this PR for some weeks :pray:

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...

ldotlopez avatar Sep 17 '23 12:09 ldotlopez