LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   start x server without window manager? (https://www.linuxquestions.org/questions/slackware-14/start-x-server-without-window-manager-4175493330/)

WiseDraco 02-01-2014 01:23 AM

start x server without window manager?
 
hello!
i see around for subj.
want to get to work boinc computions on my server, using ATI videocard gpu, but there is a problem - boinc not see the GPU unless X is started. on server i not neet GUI, as so, a naked X server without window manager be ok for me in that situation, i think, but i never do that problem previous - in past i start x server only when i need a GUI.... ;)

business_kid 02-01-2014 03:00 AM

Hide /etc/X11/(xinit/)xinitrc which can possibly live in /usr/X11R6/lib64/X11/xinit/

The window manager is set there.

TobiSGD 02-01-2014 03:42 AM

Alternatively, start X with a self written WM that does nothing.
An example for a simple dummy WM, written in Ruby:
Code:

#!/usr/bin/ruby
sleep

This "WM" will after starting just put itself into sleep, using no CPU time, and sleep indefinitely.
To start X with that dummy WM, just run
Code:

xinit /path/to/dummy-WM-script

whizje 02-01-2014 05:39 AM

What might work is start kdm in rc.local and change in kdmrc
Quote:

StaticServers=:0
# List of on-demand displays. See StaticServers for syntax.
# Default is ""
ReserveServers=:1,:2,:3
to
Quote:

#StaticServers=:0
# List of on-demand displays. See StaticServers for syntax.
# Default is ""
ReserveServers=:0,:1,:2,:3
so that if you want a gui you can just use startx.

genss 02-01-2014 06:40 AM

try
/usr/bin/X

jpollard 02-01-2014 11:55 AM

You can always use "startx application".

I believe that bypasses the default startup script used when there are no applications specified.

qweasd 02-01-2014 12:52 PM

If you go to runlevel 4 and kdm starts, you can simply log into "failsafe" session.

TobiSGD 02-01-2014 01:31 PM

Quote:

Originally Posted by qweasd (Post 5109325)
If you go to runlevel 4 and kdm starts, you can simply log into "failsafe" session.

You don't even need to. If the whole goal is to start X you have reached that goal already when a display manager like KDM is running. Though in this case I would choose a more lightweight option, like XDM.

WiseDraco 02-02-2014 10:14 AM

Quote:

Originally Posted by TobiSGD (Post 5109148)
Alternatively, start X with a self written WM that does nothing.
An example for a simple dummy WM, written in Ruby:
Code:

#!/usr/bin/ruby
sleep

This "WM" will after starting just put itself into sleep, using no CPU time, and sleep indefinitely.
To start X with that dummy WM, just run
Code:

xinit /path/to/dummy-WM-script


sorry, that not works. i try, and it looks like to initialized videocard ( you know, that thing, when vcard switching to graphics mode) and then got out with error message - something like "use sleep --help" at the end. sadly, i cannot paste full error output, but i think, you can easy replicate that :)

WiseDraco 02-02-2014 10:16 AM

Quote:

Originally Posted by genss (Post 5109195)
try
/usr/bin/X


try. on that, my coputer lock up. cannot switch to another terminals ( ctrl+alt+Fx), not also numlock reaction on keyboard...

WiseDraco 02-02-2014 10:17 AM

Quote:

Originally Posted by qweasd (Post 5109325)
If you go to runlevel 4 and kdm starts, you can simply log into "failsafe" session.

i plan to do that on my small server. i do not need runlevel 4 on server, nor also any GUI. x server i need because boinc cannot see ATI GPU until X is running...

lems 02-02-2014 10:54 AM

Quote:

Originally Posted by WiseDraco (Post 5109701)
sorry, that not works. i try, and it looks like to initialized videocard ( you know, that thing, when vcard switching to graphics mode) and then got out with error message - something like "use sleep --help" at the end. sadly, i cannot paste full error output, but i think, you can easy replicate that :)

Make sure you use the right shebang:
Code:

#!/usr/bin/ruby
sleep in this case is a ruby function/method, not sleep(1).

WiseDraco 02-02-2014 11:14 AM

Quote:

Originally Posted by lems (Post 5109721)
Make sure you use the right shebang:
Code:

#!/usr/bin/ruby
sleep in this case is a ruby function/method, not sleep(1).



bash-4.2$ /usr/bin/ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]


you test that solution, and it work for you?

lems 02-02-2014 11:22 AM

Hi,

yes, the code TobiSGD posted worked for me.

Code:

cat << EOF > $HOME/dummy.rb
#! /usr/bin/env ruby
sleep
EOF

chmod +x $HOME/dummy.rb
xinit $HOME/dummy.rb

and then I get a black screen (make sure the script is executable).

lems

genss 02-02-2014 11:36 AM

Quote:

Originally Posted by WiseDraco (Post 5109703)
try. on that, my computer lock up. cannot switch to another terminals ( ctrl+alt+Fx), not also numlock reaction on keyboard...

probably doesn't have permission to get input
my bad

bdw you can use "sleep 100d" to sleep for a 100 days, if you don't want to load ruby


All times are GMT -5. The time now is 12:16 AM.