startx

Kernels & Hardware, configuring network, installing services

startx

Postby oswaldkelso » 2020-02-27 20:22

Apologies missed the topic previously.

I've used startx for years (7-8) straight and only really use a DM when trying other distros. xinit is a core package in Debian and if you don't use a display manager should it not use it?

Basically xinitrc point's to the wm or desktop to start. startx is just a front end to xinit and if one looks at man xinit you'll see if startx fails, running xinit should drop you in to X with an xterm on display 0. So surely no matter how borked your paths are in your xinitrc you should be able to start the X server. Unless like in the old days your graphics card wasn't recognised or wayland some how interferes.

I realise it's different systems and Dragora is more like Slackware. Slackware uses xwmconfig and Dragora uses wmconfig neither are available in Debian as Debian uses update alternatives. That said they are different ways of running the same xinitrc.

On my Debian install that died I was using startx fine with icewm. I then installed TWM and ran update-alternatives selected TWM and tried to use startx. It failed to start. It complained about a permissions error so I rechecked that TWM was selected in update-alternatives. It was. I then (iirc) logged in as root in a tty and set xinitrc to point to TWM. I expected this to just make TWM system wide as opposing to using my user .xinitrc.

I then tried to use startx as a user and it still failed. Interestingly it started TWM as root. I used startx several time as root while trying to find out why I couldn't use it as a user. Then I shutdown.... for good!

"The only issue I encountered was when trying it on Buster (this was meant to be in the other thread!) Unfortunately I got a permissions error and could only start it as root! Logged out shutdown and restarted or at least tried to because I'd got a non bootable system. I tried the usual rescue mode and grub-rescue but no go so I repeat via a live CD, still no go so after a little rtfm it seems the disk is likely dying. I try fsck but no luck with that either. Anyway I formatted the drive and installed exe-gnu and the damn thing worked. Shall wait and see if the drive is going to go or if buster is trying to live up to it's name"


Now of course I'm not up to date with the Debian way any-more So it could quite possibly be a PEBKAC but it could also be a rather shitty bug.
Ash init durbatulûk, ash init gimbatul,
Ash init thrakatulûk agh burzum-ishi krimpatul.
User avatar
oswaldkelso
 
Posts: 1249
Joined: 2005-07-26 23:20
Location: UK

Re: startx

Postby Bulkley » 2020-02-27 20:32

Can you update-alternatives back to icewm just to see if TWM is somehow the problem?
Bulkley
 
Posts: 5947
Joined: 2006-02-11 18:35

Re: startx

Postby oswaldkelso » 2020-02-27 21:38

^ As I said I was never able to reboot the system. I can't honestly recall 100% if I did retest icewm via update-alternatives but think I did. It certainly restarted icewm after I had selected TWM via update-alternatives. It was my trying to get TWM to run via xinitrc that showed the permissions error. Leading me to discover it would only run as root.
Ash init durbatulûk, ash init gimbatul,
Ash init thrakatulûk agh burzum-ishi krimpatul.
User avatar
oswaldkelso
 
Posts: 1249
Joined: 2005-07-26 23:20
Location: UK

Re: startx

Postby Head_on_a_Stick » 2020-02-28 17:22

oswaldkelso wrote:if one looks at man xinit you'll see if startx fails, running xinit should drop you in to X with an xterm on display 0. So surely no matter how borked your paths are in your xinitrc you should be able to start the X server.

No, the man page says that an xterm is launched if there is no ~/.xinitrc present. If ~/.xinitrc is present then it will be run even if it is faulty, this can result in a b0rked X session.

oswaldkelso wrote:Slackware uses xwmconfig and Dragora uses wmconfig neither are available in Debian as Debian uses update alternatives. That said they are different ways of running the same xinitrc.

No, if ~/.xinitrc is present then the alternatives system is not consulted. Whatever is listed in ~/.xinitrc will be run regardless of what is selected as the x-{session,window}-manager alternative.

oswaldkelso wrote:On my Debian install that died I was using startx fine with icewm. I then installed TWM and ran update-alternatives selected TWM and tried to use startx. It failed to start. It complained about a permissions error so I rechecked that TWM was selected in update-alternatives. It was.

As I mentioned above, setting a different target for either the x-session-manager or x-window-manager alternative will not affect what is run if there is a ~/.xinitrc file.

What did you actually attempt to change with the update-alternatives command? The icewm package installs /usr/bin/icewm-session as an x-session-manager alternative but the twm package only installs an x-window-manager alternative, the latter will not be run by startx if there is already an x-session-manager alternative installed (or if ~/.xinitrc is present, which will override both).

Can you remember what the "permission error" was?

I've just installed a fresh Debian buster VM with icewm (and the xorg metapackage) installed and it was possible to install the twm package and then run a TWM desktop by either removing icewm or by leaving icewm in place and running
Code: Select all
startx /usr/bin/twm

I could also choose between either /usr/bin/icewm-session or /usr/bin/twm by creating ~/.xinitrc and calling the respective programs from there.

oswaldkelso wrote:I then (iirc) logged in as root in a tty and set xinitrc to point to TWM. I expected this to just make TWM system wide as opposing to using my user .xinitrc.

What does "set xinitrc to point to TWM" mean, exactly? Which file did you edit and what did you change?

To make TWM a system-wide default for the startx command remove any programs that provide an x-session-manager alternative and set /usr/bin/twm as the x-window-manager alternative. Any ~/.xinitrc files will override this though.

oswaldkelso wrote:it could also be a rather shitty bug

Well startx works fine for me in Debian buster, either with or without ~/.xinitrc
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12159
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: startx

Postby oswaldkelso » 2020-02-28 18:28

Hi Hoas

I'm afraid I can't recall exactly what the error message said. But I am curious to work out what happened.

I didn't create a ~.xinitrc If one was created by default I've not a clue.
.
What I did was run update-alternatives select what ever number TWM was listed as and try and run it with startx. When didn't run I edited the main xinitrc to point to the TWM binary.

I hope you tried my .twmrc
Ash init durbatulûk, ash init gimbatul,
Ash init thrakatulûk agh burzum-ishi krimpatul.
User avatar
oswaldkelso
 
Posts: 1249
Joined: 2005-07-26 23:20
Location: UK

Re: startx

Postby Head_on_a_Stick » 2020-02-28 18:43

oswaldkelso wrote:What I did was run update-alternatives select what ever number TWM was listed as and try and run it with startx.

The twm package adds /usr/bin/twm to /etc/alternatives/x-window-manager and that will only be run if nothing is providing /etc/alternatives/x-session-manager so you would have to have removed icewm beforehand for that to work.

oswaldkelso wrote:When didn't run I edited the main xinitrc to point to the TWM binary.

/etc/X11/xinit/xinitrc just sources /etc/X11/Xsession

I tried commenting out that line and adding
Code: Select all
exec twm

Once I had done that startx would launch the TWM desktop just fine.

oswaldkelso wrote:I hope you tried my .twmrc

I just downloaded it and copied it to ~/.twmrc and then running startx dumped me straight back to the console screen with no obvious errors in Xorg.0.log, I'm not at all familiar with TWM so I don't really know why that happened.

Did you try launching TWM in Debian without your custom ~/.twmrc file? Perhaps that's what caused your problem.

EDIT: I think it's the fonts section that b0rks things, if I comment those out then TWM will launch.

FWIW, the DeJaVu fonts don't use XLFD in Debian.
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12159
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: startx

Postby oswaldkelso » 2020-02-28 19:18

The twm package adds /usr/bin/twm to /etc/alternatives/x-window-manager and that will only be run if nothing is providing /etc/alternatives/x-session-manager so you would have to have removed icewm beforehand for that to work.


Well that clears that up.

/etc/X11/xinit/xinitrc just sources /etc/X11/Xsession


In that case nail on the head. iirc I would have replaced any line to xsession with the path to twm /usr/bin/twm or what ever it is. I mean I have no DM why would I need Xsession...... ahh

I was testing the twmrc that was the whole point so never tried the default. Weird it dumped you. Only other distro apart from Dragora I tried it on was Slackware

edit: I seem to recall a bug now.

I just checked my xinitrc.twm file and have this "LC_CTYPE=en_US /bin/twm" because the first time I tried to start it I got an error (on Dragora)

edit2
https://www.linuxquestions.org/question ... 922-print/
Ash init durbatulûk, ash init gimbatul,
Ash init thrakatulûk agh burzum-ishi krimpatul.
User avatar
oswaldkelso
 
Posts: 1249
Joined: 2005-07-26 23:20
Location: UK


Return to System configuration

Who is online

Users browsing this forum: No registered users and 14 guests

fashionable