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

Add options to relocate session config files #34

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

Add options to relocate session config files #34

wants to merge 3 commits into from

Conversation

linuxrrze
Copy link

Next try:

Tried to get away from the hardcoded paths.
Use temporary path for all temp files
Add config option for ogon pulseaudio config path

This patch obsoletes/reverts/includes the former relocate .xAuthority only patch


if (!propertyManager->getPropertyString(mSessionID, queryStringDefaultModule, defaultmodule)) {
defaultmodule = "xsession";
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not to use module_string=xsession in the [global] part of the config file?
The name 'xsession' is just an arbitrary name chosen in the default config. That could be anything so having it hardcoded here requires that a backend with the name xsession is defined.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's been some time since I tested this, but as far as I recall, I didn't succeed in adding a new backend by copying existing settings and replacing xsession with something else.
Just didn't work (and I didn't investigate any further).
The above hack "worked for me" and surely needs some cleanups from someone who knows more about how ogon works ;-)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wohoo. That was a quick reply. Just to make sure this was a workaround to get the name of the config uses that you can query the settings?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad to see some activity on this project again!
Yes, I needed to get some settings and I did so by using a hard-coded session string (not knowing how to get to it any other way).

if (!SetEnvironmentVariableEBA(&mpEnvBlock, "PULSE_CONFIG_PATH", pulseconfigpath.c_str())) {
WLog_Print(logger_Session, WLOG_ERROR, "s %" PRIu32 ": failed to set PULSE_CONFIG_PATH in the environment block", mSessionID);
return false;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here: code "worked for me" - cleanups by someone more familiar with ogon are welcome.
However I think, there may have been a difference between the session environment and the environment used for virtual channels scripts ... but I'm not sure about this (last tests were half a year ago).

@bmiklautz
Copy link
Contributor

Hi @linuxrrze I'm very sorry that it took sooo long. Hard times.

Regarding PULSE_STATE_PATH and PULSE_RUNTIME_PATH: we usually set them in ogon-start-vc.sh. What's the reason that you trying to set them directly in the X11 module?

@linuxrrze
Copy link
Author

Hi @linuxrrze I'm very sorry that it took sooo long. Hard times.

Regarding PULSE_STATE_PATH and PULSE_RUNTIME_PATH: we usually set them in ogon-start-vc.sh. What's the reason that you trying to set them directly in the X11 module?

If I recall correctly I needed the environment set to the same values in both session environment and virtual channel env, and that didn't work as expected. But again: It's been a while ... so I'm no longer 100% sure

@MartinHaimberger
Copy link
Contributor

MartinHaimberger commented Oct 23, 2020

@linuxrrze

hi, it has been a while also here, but why set these environment variables in Session Object direct? There should not be backend specific information in here. A much better place would be to initialize them before a module starts a session. This would be done in the module (for example the xmodule) (https://github.com/ogon-project/ogon/blob/master/session-manager/module/X11/x11_module.cpp#L550) or if you need different env variables on each virtual channel start, you could inject them for example here https://github.com/ogon-project/ogon/blob/master/session-manager/module/X11/x11_module.cpp#L776.

@KnightBlood
Copy link

echo xfce > ~/.config/ogon/desktop will start xfce4
echo lxqt > ~/.config/ogon/desktop will start lxqt
echo plasma > ~/.config/ogon/desktop will start kde plasma5
how about gnome? how to start gnome?

@linuxrrze
Copy link
Author

echo xfce > ~/.config/ogon/desktop will start xfce4
echo lxqt > ~/.config/ogon/desktop will start lxqt
echo plasma > ~/.config/ogon/desktop will start kde plasma5
how about gnome? how to start gnome?

Basically you should be able to start certain desktop environments by using their config's basename:

So setting desktop to "xfce" will use a file /usr/share/xsessions/xfce.desktop to start your session.

However not all session types are supported. Others may require special setup.
I tested a few different desktop types and their requirements (but this is by far not complete):

https://github.com/ogon-project/ogon/blob/master/doc/desktop-hints.md

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.

4 participants