[SOLVED]How to create a customized session?

If none of the more specific forums is the right place to ask

[SOLVED]How to create a customized session?

Postby Danielsan » 2017-07-20 16:15

Hi guys, I have something to ask but I must explain before a bunch of things to explain the reason why.

I would like to use Retroarch on one of my older laptop, unfortunately it seems the laptop is not performing very well so I thought I could shrink the home partition and installing a distro called Lakka (which is Retroarch on top of openElec), then I decided that I would prefer installing a Debian minimal version with RetroArch and without any DE, so I did. I created a virtual machine which loads only RetroArch, cool. But eventually I thought that I don't even need to shrink the partition and install another instance of Debian, I could just create a customized session with the minimum requirements I need to keep the session lean and light.

I haven't find good documentation about that just a bunch of links:

https://wiki.ubuntu.com/CustomXSession
https://journalxtra.com/linux/how-to-ma ... on-script/
https://wiki.archlinux.org/index.php/Li ... 2F.xinitrc
https://wiki.debian.org/LightDM#User_configuration
https://wiki.debian.org/Xsession (new)
http://www.jfc.org.uk/software/lwm-FAQ.html (new)

Do you have any better documentation to provide? I would have available just the minimum like the internet connection or whatever I need to have Retroarch fully working.

Thanks
Last edited by Danielsan on 2017-07-28 15:59, edited 2 times in total.
If you can't fork then hold you in silence.
User avatar
Danielsan
 
Posts: 464
Joined: 2010-10-10 22:36

Re: How to create a customized session?

Postby Danielsan » 2017-07-20 19:24

Ok guys I did a buch of proofs.

I created a file /usr/share/xsessions/retroarc.desktop with:
Code: Select all
[Desktop Entry]
Name=RetroArch
Exec=/etc/X11/Xsession


And a file with .xinitrc with the combinations below, each combination was a different version of the file:
Code: Select all
Proof #01
#!/usr/bin/env bash
retroarch &

Proof #02
#!/usr/bin/env bash
/usr/bin/retroarch &

Proof #03
#!/usr/bin/env bash
startx /usr/bin/retroarch &

Proof #04
#!/usr/bin/env bash
/usr/bin/startx /usr/bin/retroarch &

Proof #05
#!/usr/bin/env bash
DISPLAY=:0 /usr/bin/retroarch &

Proof #06
#!/usr/bin/env bash
"DISPLAY=:0 /usr/bin/retroarch &"

Proof #07
#!/usr/bin/env bash
exec DISPLAY=:0 /usr/bin/retroarch &

Proof #08
#!/usr/bin/env bash
exec 'DISPLAY=:0 /usr/bin/retroarch &'

Proof #09
#!/usr/bin/env bash
exec /usr/bin/retroarch &'

Proof #10
#!/usr/bin/env bash
exec retroarch &'

Proof #11 at least for having a working shell
#!/usr/bin/env bash


No one of these proofs worked, I found only this segmentation fault:

Code: Select all
debian kernel: [    74.740681] retroarch[1117]: segfault at 0 ip (null) sp 000077ffdd99a2f1a8 error 14 in retroarch[561499853000+1bc000]


To be complete I am doing these proofs on a virtual machine, however when I did the proof on minimal Debian I used slim as login manager that allows you to launch special command so I was able to launch RetroArch without DE.

By the way any suggestions?
If you can't fork then hold you in silence.
User avatar
Danielsan
 
Posts: 464
Joined: 2010-10-10 22:36

Re: How to create a customized session?

Postby Danielsan » 2017-07-21 19:12

I have temporarily changed the strategy, instead of trying to open just retroarch after the login, I am doing login with a Tinywm session which launches retroarch in fullscreen mode.

With this approach I have two new issues to resolve:


1 ) It would be preferable changing session automatically by user (even if Lightdm stores the latest session in a file called .drmc)

2) I have to create a bash script (as demon) that allows me to relaunch Retroarch, do logout or restart the computer. I figured out it would be cool through mouse click but it is much easier binding some keys. Anyway I don't have absolutely idea how to do that but I'll discover some info for sure.

[EDIT]

Second point almost solved through an utility called keylaunch! :!:
If you can't fork then hold you in silence.
User avatar
Danielsan
 
Posts: 464
Joined: 2010-10-10 22:36

Re: How to create a customized session?

Postby Danielsan » 2017-07-24 20:20

Small update:

- I switched from Tinywm to LWM. Tinywm has a weird incompatibility with Retroarch so when you exit from it you lose the control of the desktop, LWM is still tiny but has a better control over the desktop without notable issue with Retroarch.

- I don't need anymore the package Keylaunch since the moment I can use xmodmap to create a bunch of special key combinations.

- Left to do: understanding how create a custom session for Lightdm in order to avoid to select the session everytime I want use RetroArch.
If you can't fork then hold you in silence.
User avatar
Danielsan
 
Posts: 464
Joined: 2010-10-10 22:36

Re: How to create a customized session?

Postby Danielsan » 2017-07-26 03:14

It seems that LWM has some problems with Lightdm so eventually I decided to use openbox which is still light but more configurable and tested. At this point I don't need to create a custom xsessionrc as well as I don't need keylaunch to create some special key combos.
If you can't fork then hold you in silence.
User avatar
Danielsan
 
Posts: 464
Joined: 2010-10-10 22:36

Re: How to create a customized session?

Postby Bulkley » 2017-07-26 03:26

You will probably be happier with Openbox for the reasons you gave. Since you will only have one WM do you need a DM?
Bulkley
 
Posts: 5358
Joined: 2006-02-11 18:35

Re: How to create a customized session?

Postby Danielsan » 2017-07-26 15:54

Actually I have my XFCE4 session but with RetroArch the performance was so poor that I decided to create a second installation to use only RetroArch until I realized I could create another user which launches a very minimal session in order to run only the necessary.
If you can't fork then hold you in silence.
User avatar
Danielsan
 
Posts: 464
Joined: 2010-10-10 22:36

Re: How to create a customized session?

Postby ruffwoof » 2017-07-26 16:59

I was using slim, but experienced problems with that (reconfiguring), so moved over to lightDM, then I moved over to this how to : Auto login and `startx` without a display manager -- jessie and purged lightDM. Helps keep things a little lighter and opens up the opportunity to include different commands such as you're using.
Debian oldstable, twm, yad, stalonetray
Acer Aspire M3201 (2GB), AMD Phenom X4
ruffwoof
 
Posts: 216
Joined: 2016-08-20 21:00

Re: How to create a customized session?

Postby Danielsan » 2017-07-26 20:18

For my purpose I was able to launch just RetroArch through Slim, maybe I can achieve the same with Systemd but it is already beyond my objective and my skills. Anyway launching a WM instead of a full DE is already satisfactory for my needs. I have only to fix some small issues in order to have everything smooth.
If you can't fork then hold you in silence.
User avatar
Danielsan
 
Posts: 464
Joined: 2010-10-10 22:36

Re: [SOLVED]How to create a customized session?

Postby Danielsan » 2017-07-28 16:32

Eventually for some weird issues that I wouldn't investigate further I decided to create a very minimal Xfce session with openbox as wm, alsa instead of pulse, xfce panel, just on the top right corner, with very few elements (simple menu, retroarch launcher, tray with network manager and volti) everything without icons. Xfdesktop, Xfcesettingsd, Pulse, Hotkeys, Assistance and other daemons disabled. RetroArch was been installed through flatapk because the version provided by Stretch is unpatched and I wouldn't compiling it. Despite the application is very demanding the first tests were good and everything went smooth.
If you can't fork then hold you in silence.
User avatar
Danielsan
 
Posts: 464
Joined: 2010-10-10 22:36


Return to General Questions

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable