LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 04-05-2015, 06:43 AM   #1
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
systemd incursion! ( fix X starting on same vt )


I have noticed that starting X using startx runs X on the same vt as where it started from, instead of the usual vt7, also specifying a particular virtual terminal with
Code:
startx :1 vt6
For instance is ignored which is a pain as you can't see any X errors in the vt until you quit X, did a little exploring and found that startx had been patched to accomadate what seems to be a firefox/systemd bug here:
https://bugzilla.redhat.com/show_bug.cgi?id=806491

As I don't ( and hopefully never wil have that systemd rubbish - I wanted to use a stronger word than that - on my system ). found that you can just comment out the relevent bits like so from around line 104 of /usr/bin/startx change
Code:
    # When starting the defaultserver start X on the current tty to avoid
    # the startx session being seen as inactive:
    # "https://bugzilla.redhat.com/show_bug.cgi?id=806491"
    tty=$(tty)
    if expr match "$tty" '^/dev/tty[0-9]\+$' > /dev/null; then
        tty_num=$(echo "$tty" | grep -oE '[0-9]+$')
        vtarg="vt$tty_num"
    fi
To this:
Code:
    # When starting the defaultserver start X on the current tty to avoid
    # the startx session being seen as inactive:
    # "https://bugzilla.redhat.com/show_bug.cgi?id=806491"
#    tty=$(tty)
#    if expr match "$tty" '^/dev/tty[0-9]\+$' > /dev/null; then
#        tty_num=$(echo "$tty" | grep -oE '[0-9]+$')
#        vtarg="vt$tty_num"
#    fi
You can then start X with startx the 'proper' way or specify a specific vt as above.

For a lot of users this is going to go unnoticed but if you do any low level X stuff getting at the error's form X will now be restored.

You will of course have to edit /usr/bin/startx as root, you may also want to make a backup first like so:
Code:
cp /usr/bin/startx /usr/bin/startx.BAK
In case anything goes really wrong.

Last edited by Keith Hedger; 04-06-2015 at 03:52 AM.
 
Old 04-05-2015, 09:21 PM   #2
moonfrog
Member
 
Registered: Oct 2008
Location: San Diego County, CA
Distribution: LFS, Gentoo
Posts: 64

Rep: Reputation: 23
Thank You!

That was an easy and instant fix.
IMO X should never take vt1

Interesting that it was a tentacle from redhat's future OS


Maybe you should change the title to include the vt issue,
in this comunity I'm sure alot of people noticed their vt1 was gone.
 
Old 04-05-2015, 10:03 PM   #3
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
I wonder if this was the cause of my tty crash with Xfce with running the reboot/shutdown sequences?

Rubbish, trash? Call it what it is Keith... A pile of shit.

Last edited by ReaperX7; 04-05-2015 at 10:09 PM.
 
Old 04-05-2015, 10:10 PM   #4
moonfrog
Member
 
Registered: Oct 2008
Location: San Diego County, CA
Distribution: LFS, Gentoo
Posts: 64

Rep: Reputation: 23
Quote:
Originally Posted by ReaperX7 View Post
I wonder if this was the cause of my tty crash with Xfce with running the reboot/shutdown sequences?
It wasn't mine...I don't use Xfce but one machine I built on has Thunar +deps installed and hangs on reboot (but not shutdown) No change there
 
Old 04-05-2015, 10:46 PM   #5
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
I did rollback xfce-session to another previous version and it now works, so I suspect xfce-session-logout has some unknown issue. I'm working with xfce-session-4.10.0 and the problems seems to have vanished.
 
Old 04-05-2015, 10:59 PM   #6
moonfrog
Member
 
Registered: Oct 2008
Location: San Diego County, CA
Distribution: LFS, Gentoo
Posts: 64

Rep: Reputation: 23
Quote:
Originally Posted by ReaperX7 View Post
I did rollback xfce-session to another previous version and it now works, so I suspect xfce-session-logout has some unknown issue. I'm working with xfce-session-4.10.0 and the problems seems to have vanished.
I can't help verify that cos I didn't install xfce-session
 
Old 04-06-2015, 04:00 AM   #7
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Original Poster
Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Glad this was useful to other people, changed the title to mention vt.
I wonder how much more systemd creep there is in aparently unrelated software?
 
Old 04-06-2015, 08:38 AM   #8
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
No way to tell honestly, but if xinit is showing incursions, chances are it's creeping in everywhere.

If I were you Keith, I'd forward this to the BLFS-Dev mailing list as a patch.
 
Old 04-07-2015, 07:39 AM   #9
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Original Poster
Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Sorry for the delay - visiting grandchildren.
I'm not signed up for the mailing lists but if anyone else is and wants to forward a patch be my guest.
 
Old 04-27-2015, 06:18 AM   #10
bitshark
LQ Newbie
 
Registered: Apr 2015
Posts: 7

Rep: Reputation: Disabled
I can confirm a similar problem on Alpine Linux (non Systemd OpenRC based distro w/ XFCE). XFCE works great, but when I compiled MATE and GTK I was running into some sort of startx / xinit problem.

I think it may be related.
 
Old 04-27-2015, 06:35 AM   #11
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Original Poster
Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
Did this fix fixit for you? if not rollback xfce to 4.10 I have and a number of problems seem to have gone.
 
Old 04-27-2015, 12:54 PM   #12
bitshark
LQ Newbie
 
Registered: Apr 2015
Posts: 7

Rep: Reputation: Disabled
Hey Keith... I will check ASAP in the virtual machine. No information for the moment as to whether my problems are linked, and whether you're workaround solves the issue on Alpine Linux.

For anyone using Alpine there is actually a Mate package in testing repo so you don't have to necessarily do it yourself like I did. Again, Alpine is a secure (grsec patched ) kernel distro that uses Gentoo's OpenRC and eudev. Alpine also ditches glibc in favor of musl. The guys who created Alpine have no plans to migrate to systemd, and are actively building around it for the future.

Alpine is a bit like LFS crossed with slackware. It has it's own toolchain etc , OpenRC, supports xfce out of the box.
 
Old 04-30-2015, 11:41 AM   #13
/dev/random
Member
 
Registered: Aug 2012
Location: Ontario, Canada
Distribution: Slackware 14.2, LFS-current, NetBSD 6.1.3, OpenIndiana
Posts: 319

Rep: Reputation: 112Reputation: 112
Look good? Now we detect if systemd is running if not resume with the default behavior.

Code:
--- startx.orig  2015-04-30 12:12:21.711606325 -0400
+++ startx      2015-04-30 12:59:45.497304617 -0400
@@ -101,6 +101,10 @@
     server=$defaultserver
 
 
+# Detect if we are using systemd or not
+usingsystemd="$(type systemd | sed -e 's/systemd is //g')"
+if [ -f $usingsystemd ]
+  then
     # When starting the defaultserver start X on the current tty to avoid
     # the startx session being seen as inactive:
     # "https://bugzilla.redhat.com/show_bug.cgi?id=806491"
@@ -109,7 +113,9 @@
         tty_num=$(echo "$tty" | grep -oE '[0-9]+$')
         vtarg="vt$tty_num"
     fi
-
+  else
+     echo "No systemd found"
+fi
 
     # For compatibility reasons, only use xserverrc if there were no server command line arguments
     if [ x"$serverargs" = x -a x"$display" = x ]; then

Last edited by /dev/random; 04-30-2015 at 12:40 PM.
 
1 members found this post helpful.
Old 04-30-2015, 02:09 PM   #14
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Void, Linux From Scratch, Slackware64
Posts: 3,150

Original Poster
Rep: Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856Reputation: 856
thanks for the patch didn't get around to making one, doing too much other stuff!
 
  


Reply

Tags
fix, startx, systemd, vtx, xorg



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: The Story Behind ‘init’ and ‘systemd’: Why ‘init’ Needed to be Replaced with ‘systemd’ in Linu LXer Syndicated Linux News 1 04-07-2017 11:33 PM
LXer: Is systemd as bad as boycott systemd is trying to make it? LXer Syndicated Linux News 0 09-03-2014 05:50 PM
Systemd custangro Fedora 2 08-01-2011 07:54 AM
Boot Delay 30min: systemd-analyze blame systemd-tmpfiles-setup.service BGHolmes Fedora 0 07-27-2011 09:02 AM
LXer: Companies welcome the open source incursion LXer Syndicated Linux News 0 01-13-2007 04:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 12:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration