Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED]How to create a customized session?

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
User avatar
Danielsan
Posts: 659
Joined: 2010-10-10 22:36
Has thanked: 5 times

[SOLVED]How to create a customized session?

#1 Post by Danielsan »

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.

User avatar
Danielsan
Posts: 659
Joined: 2010-10-10 22:36
Has thanked: 5 times

Re: How to create a customized session?

#2 Post by Danielsan »

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?

User avatar
Danielsan
Posts: 659
Joined: 2010-10-10 22:36
Has thanked: 5 times

Re: How to create a customized session?

#3 Post by Danielsan »

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! :!:

User avatar
Danielsan
Posts: 659
Joined: 2010-10-10 22:36
Has thanked: 5 times

Re: How to create a customized session?

#4 Post by Danielsan »

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.

User avatar
Danielsan
Posts: 659
Joined: 2010-10-10 22:36
Has thanked: 5 times

Re: How to create a customized session?

#5 Post by Danielsan »

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.

Bulkley
Posts: 6383
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: How to create a customized session?

#6 Post by Bulkley »

You will probably be happier with Openbox for the reasons you gave. Since you will only have one WM do you need a DM?

User avatar
Danielsan
Posts: 659
Joined: 2010-10-10 22:36
Has thanked: 5 times

Re: How to create a customized session?

#7 Post by Danielsan »

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.

ruffwoof
Posts: 298
Joined: 2016-08-20 21:00

Re: How to create a customized session?

#8 Post by ruffwoof »

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.

User avatar
Danielsan
Posts: 659
Joined: 2010-10-10 22:36
Has thanked: 5 times

Re: How to create a customized session?

#9 Post by Danielsan »

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.

User avatar
Danielsan
Posts: 659
Joined: 2010-10-10 22:36
Has thanked: 5 times

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

#10 Post by Danielsan »

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.

Post Reply