LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Temporarily Use Desktop for One Application (https://www.linuxquestions.org/questions/linux-software-2/temporarily-use-desktop-for-one-application-4175481946/)

Beanz239 10-23-2013 11:12 PM

Temporarily Use Desktop for One Application
 
I've been using Arch for the past couple days now and I really like using the terminal, something has been annoying me. Let's say I want to run a web browser or Steam. Here's what I have to use:

startx
Open my program (using Openbox here)
Use my program
Close my program
Exit Openbox

Now I'm back to my command line.
Is there any way to tell Linux that when I run an X application, I just want it to run Openbox and then once I close the program, it immediately drops me to a shell prompt?

Either that or switch back and forth between a terminal tty and GUI tty for even faster program switching?

273 10-24-2013 01:25 AM

I usually do that using Ctrl+Alt+F1...F7 or do you want soemthing different?

qlue 10-24-2013 03:10 AM

I have some ideas here, but I don't have time to elaborate on them now.
In short, however, I would set up a shell script and use alias to invoke that script instead of the application I want to launch. This shell script would then set up a secondary temporary script in the user's home directory that would be called from ~/.config/openbox/autostart before calling startx.

After openbox is exited, the original script should then delete the temporary script before exiting.

jefro 10-24-2013 05:42 PM

Wonder if xinit would do it?

To get full screen a prior post. https://www.linuxquestions.org/quest...-xinit-668622/

qlue 10-25-2013 01:11 AM

Quote:

Originally Posted by jefro (Post 5051765)
Wonder if xinit would do it?

To get full screen a prior post. https://www.linuxquestions.org/quest...-xinit-668622/

Well, startx calls xinit. Now I'm thinking that it may be possible to adapt startx to accept the filename of the gui app the OP wants to run. That way typing 'startx firefox' would run firefox and 'startx thunar' would run the Thunar file manager etc.

The problem here is that you'd be editing scripts that are usually fairly standardised for any given distro. Any problems or errors in these scripts could leave the system almost unusable and no one else would be able to help much. (the user would be on their own)

That's why I'd create my own scripts that call these system scripts instead. worst case scenario, delete my scripts and try again.

On the other hand, I use openbox and use Guake as my terminal emulator, which I toggle on and off with the 'f12' key.


All times are GMT -5. The time now is 02:15 AM.