You are not logged in.
Hello, I'm requesting help.
I'm kind of new to some of this stuff so sorry if I'm not explaining correctly
===========================
What was your environment?
===========================
archlinux-version-x86_64.iso.sig
===========================
What result am I wanting
===========================
I want to launch steam (or any gui program) in my terminal by typing its name instead of typing startx /usr/bin/steam
I want to know if there is any config files (like /usr/bin/steam) that I need to edit and what I need to change
Or if there's a config that controls all of the startx stuff launched out of /usr/bin/
If I startx /usr/bin/i3(or any window manager) and open xterm and I'm able to run gui apps just by using their name like typing "steam"
===========================
What exactly did you do ?
===========================
$ steam
$ startx /usr/bin/steam (startx works and I'm able to use steam without problem)
$ sudo nano /usr/bin/steam
===========================
What was the exact result ?
===========================
$ steam
steam: Cannot open display
---------
$ startx /usr/bin/steam
X.org X Server 1.21.3
X Portocol Version 11, Revision 0
Current Operating System: Linux arch linux 5.18.2.arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 06 Jun 2022 19:58:58 +0000 x86_64
Kernal command line: Initrd=intel-ucode.img initrd=\initramfs-linux.img root=/dev/sda3 rw
Current version of pixman: 0.40.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version
Markers: (--) probed, (xx) from config file (==) default setting,
(==) Log file: '/var/log/Xorg.1.log", Time: Thu Jun 9 20:02:34 2022
(==) Using system config directory "/usr/share.X11/xorg.conf.d
---------
sudo nano /usr/bin/steam
#!/bin/sh
exec /usr/lib/steam/steam "$@"
===========================
How did that result not meet your expectations?
===========================
Using the command "steam" didn't launch steam into x
Last edited by faeve (2022-06-10 20:42:48)
Offline
In short, your goal is not really possible.
Assuming that /usr/bin/steam is just a wrapper script that launches /usr/lib/steam/steam, then in principle you could edit the script to `exec startx /usr/lib/stea/steam` but this would be specific to steam and would not apply to any other X11 programs (most of which do not use wrapper scripts). Additionally, this edit to the script would be overwritten by the next update of steam.
The real question is *why* do you want to launch X11 applications from the tty? Several X11 applications may not do what you'd intend without a window manager of some sort running. For example, they may have an arbitrary initial window size; without a window manager, there is no way to resize or fullscreen the windows (some programs will have a --geometry or --fullscreen flag, but this would be on a case-by-case basis).
Also, if you are running various X11 applications, why would you not just start a single X11 session and run the programs from there?
In any case, you can't run X11 client applications without running an X11 server. Period.
If there are only a few programs you would want to run this way, you could customize an xinitrc to include a case statement to start one of a finite set of programs (but this would still require startx or xinit).
You could also get a good lightweight terminal emulator and have X11 just start with no actual WM but with just the teminal emulator fullscreened. At which point you could just type "steam" or "firefox" or whatever and it would run as you seem to want.
Finally, I'm wondering if there isn't an X-Y question behind this. Do you really just want to solve problems that you are having running steam under an existing WM? Do you just want to run steam on another tty in it's own seperate X11 session?
Last edited by Trilby (2022-06-10 19:28:22)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Thank you for the response,
I think I understand
I mainly use this computer only for gaming, which %95 of the time I do remotely through steam remote play anyways. startx /usr/bin/steam is able to launch full screen and the remote play client only picks up on the game playing anyway, not necessarily steam itself, so it works well without a WM.
Also, I guess it's silly, but I wanted to setup this build to have as few steps as possible from power button to steam, and as few things running (hence no WM). Mainly just as a learning experience goal. Shave every second off possible.
Using $ steam over $ startx /usr/bin/steam is mainly because in 2 months from now when I have to do something on this computer, I'm going to forget the startx /usr/bin part. For my sanity not having to google how to run it again.
The answer you gave is what I was looking for and I feel satisfied with it, Ill mark this post as solved.
Thank you for your time.
Sincerely... me
Last edited by faeve (2022-06-10 20:43:58)
Offline
Also, I guess it's silly, but I wanted to setup this build to have as few steps as possible from power button to steam, and as few things running (hence no WM). Mainly just as a learning experience goal. Shave every second off possible.
That's not silly - at least not among linux users, many of us obsess over such things even when they don't really add up to much in the long run.
You know you can configure autologin to the tty and set your bash_profile to autostart X (or X w/ steam). That way there's nothing between hitting the power button and steam running. Both of these topics have wiki pages devoted to them.
And if you don't want it run automatically, but still want to simplify it, you could add an alias to your shelll config:
alias steam='startx /usr/bin/steam'Of course if you really want to shave time and processes, you should use xinit rather than startx. Then if you are like me or at least one other archer (Earnestly) you'd even figure out how to replace xinit with a much much smaller alternative because xinit is just so darn bloated too.
Last edited by Trilby (2022-06-10 21:26:56)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline