LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Anyway to start program in different desktop? (https://www.linuxquestions.org/questions/linux-software-2/anyway-to-start-program-in-different-desktop-39221/)

ubien 12-23-2002 05:04 PM

Anyway to start program in different desktop?
 
Is there any command to start a program in a specific desktop? Say I'm in desktop 1 and I want to start something in desktop 3, anyway to do this without switching to desktop 3? Im using fluxbox if that matters.

reader 12-23-2002 05:57 PM

Hello ubien:
Try:
Code:

kstart --desktop 4 kwrite
Bye

ubien 12-23-2002 07:18 PM

hmmm, doesn't seem to work for me. It starts the program in the same desktop that I'm in. Maybe that only works in KDE? Using fluxbox here.

MasterC 12-23-2002 08:20 PM

Hi, I decided to try to track this down for you, if anything is going to help, I think it'll be this thread:
http://www.linuxquestions.org/questi...threadid=29287

Good luck :)

Null 12-23-2002 08:34 PM

You enjoy this way too much MasterC :)

MasterC 12-23-2002 08:37 PM

:D Yes, yes I do. I am supposed to be at the mall buying presents since I waited til the last minute, but I just can't close my browser down long enough to leave LQ ;) I even come here on my lunch breaks, I sure wish I had a local chapter for LQ Addicts :D

Cool

ubien 12-24-2002 12:16 AM

ummm, I must be missing something. Don't see how other thread helps.

MasterC 12-24-2002 02:12 AM

Well, I believe xhost is what might help. Let's say you are working on desktop 1 (F7), and you want to be able to open <whatever X app> in desktop 3 (F9). So then you have user A (We'll call em Tom) and user B (Called Sam). Tom's on 1, and Sam's on 3.

So now you want to open up a program from typing into an xterm in Tom's desktop and have it open up in Sam's.

So, I think by using xhost (man xhost) Sam can allow Tom to send things to him:
xhost +Tom

Now Tom has to set the environment to Sam's X (F9):
setenv DISPLAY -- :2

Although I am not too sure if any of this will work, I am really unsure about the last part.

Anyway, with any luck at this point you could then type:
kwrite
and it would open up kwrite on Sam's desktop.

For a single user system, assuming both of the X's were started with the same user (example:
Tom runs: startx
Then to open another X session:
startx -- :1
And another:
startx -- :2

And so on. Then you could probably simply skiip the xhost part and setenv would set where you want this program sent to (set environment I believe is what setenv stands for).

Cool

MasterC 12-24-2002 02:18 AM

export DISPLAY=localhost:0.0

Ok, so to test it out I tried the setenv, but no luck. HOWEVER! The export one did (thanks Moses, yet again ;) )

I had MasterC open up regular startx:
startx
And then another on F9:
startx -- :2

Then switched to F3 and typed:
export DISPLAY=:2

And typed kwrite, and kwrite opened up in F9 ;)

If any of this doesn't make sense to you, or my sorry example sucks, I will be happy to further clarify it for you. Thanks for inspiring me to find this out, it's a neat little trick :)

Cool

reader 12-24-2002 02:42 AM

Yes, but I think that ubien want to switch between desktops, not between different xservers running. With startx we start others xservers, not change between desktops: Ctrl+F1 + .. + Ctrl-Fn in KDE (I don't know how with fluxbox).

reader

MasterC 12-24-2002 02:45 AM

Oooooh, I think I am seeing what you mean, and I have NO idea how to do something like that in Flux. I run Flux too, but I don't usually have the desire to do that. I simply switch desktops using my scroll on my mouse, then run the program I want to run.

Ahh, Ok, well thanks for clarifying that, it gives me something to search on tomorrow evening :)

Cool

ubien 12-24-2002 10:15 AM

Yea reader has it right, only 1 instance of X running. I've asked around other places about this and no one had an idea of how to do this. Maybe there isn't a way right now, I think I'll post a feature request for it @ fluxbox's project page.

fuxxy 02-24-2003 06:31 PM

I was just curious if there was any update on this subject. I would like to do this myself, and have yet to find anything conclusive..


All times are GMT -5. The time now is 05:30 AM.