LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-11-2005, 05:00 PM   #1
esteeven
Senior Member
 
Registered: Oct 2001
Location: Bristol UK
Distribution: Arch Slackware Ubuntu
Posts: 1,079

Rep: Reputation: 51
save position & desktop of multiple xterms in Fluxbox


I realise that the remember patch in Fluxbox is designed to do exactly what its name suggests --- remember where an application was last opened etc. My problem is that I want to open multiple instances of xterm from my .xinitrc and have all of them go to different places --- I am trying very hard to make myself use text apps ... so, on desktop one in Fluxbox I want to run "xterm -e irssi" and "xterm -e top" for example and on destktop two I want "xterm -e mutt" and so on. I am sure you get the picture. I found the groups feature of Fluxbox to be too restrictive because it forced subsequent xterms to open within the others. I suppose I want "xterm -e mutt" to be treated as an application in its own right but I want xterm to open on whichever desktop I am on aswell (my key binding Ctrl+x should open an xterm on whichever desktop I am.)
I hope this is possible.
Cheers.
 
Old 05-11-2005, 05:22 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 926Reputation: 926Reputation: 926Reputation: 926Reputation: 926Reputation: 926Reputation: 926Reputation: 926
Don't use .xinitrc to open them, use fluxbox' start-up...
e.g. (taken from ~/.fluxbox/menu
Code:
  [submenu] (Startup)
        [exec] (root-tail) {/home/tink/bin/roottail.sh&}
        [exec] (gkrellm) {gkrellm }
        [exec] (wmweather) {weather.sh}
        [exec] (wmxmms) {wmxmms -t}
        [exec] (wmBinClock) {wmBinClock}
  [end]
That way remember will be able to grab stuff, otherwise
the things will be opened before flux runs, and it has
no influence on their position.

In terms of key-bindings: have a good look at
~/.fluxbox/keys


Cheers,
Tink

Last edited by Tinkster; 09-08-2005 at 03:17 AM.
 
Old 05-11-2005, 08:52 PM   #3
username17
Member
 
Registered: Aug 2004
Location: Norfolk VA
Distribution: Slackware 11
Posts: 230

Rep: Reputation: 30
I don't see how the above resolves the issue about multiple xterms.

I use ~/.xinitrc, I just put them before "exec fluxbox" and I make them run the the background (by appending an #).
With ~/.xinitrc you can set "xterm -e mutt" to run and there is syntax to set the location (with x/y coordinates).

I have done this in the past, but unfortunatly I do not remember the syntax.
This might point you in the right direction, I'm sorry that I don't have the exact command that's needed.
GL
-Jason
 
Old 05-11-2005, 09:41 PM   #4
mrcheeks
Senior Member
 
Registered: Mar 2004
Location: far enough
Distribution: OS X 10.6.7
Posts: 1,690

Rep: Reputation: 52
try for example :

~/.xinitrc
Code:
xterm -e mutt&
xterm -e top&
xterm -e anotherApplication&
exec fluxbox
 
Old 05-12-2005, 05:35 AM   #5
esteeven
Senior Member
 
Registered: Oct 2001
Location: Bristol UK
Distribution: Arch Slackware Ubuntu
Posts: 1,079

Original Poster
Rep: Reputation: 51
Perhaps I was not clear but I have no problems with starting applications automatically with Fluxbox --- .xinitrc works fine. The "remember" function in Fluxbox is great and works for all applications.... even xterm. All of my applications open automatically on the correct desktop, in the right place and they are my preferred size. The problem is when running applications such as mutt and top automatically. Yes "xterm -e application" works fine AND xterm opens where I told it to using the remember patch. The problem comes when I add another xterm to my .xinitrc eg "xterm -e second application" --- this xterm opens in exactly th same location as xterm 1. And the third. And so on --- they are all bound to the position set for xterm using the remember patch.

Username17 - I was thinking the same thing myself. The remember patch stores its data in ~./fluxbox/apps I think. I imagine the co-ordinate syntax will be there. Something like ------ "xterm -e application {co-ordinates}"
------ "xterm -e 2nd application {different co-ordinates}"
should work from my .xinitrc

Thanks for the fast replies. I'll report back on this one later.
 
Old 05-12-2005, 07:03 AM   #6
esteeven
Senior Member
 
Registered: Oct 2001
Location: Bristol UK
Distribution: Arch Slackware Ubuntu
Posts: 1,079

Original Poster
Rep: Reputation: 51
My master plan didn't work. The syntax is still a mystery to me. Does anyone know it?

Problem
I want to issue the following command -

xterm -e mutt {go to desktop 4 - dimensions}


Thanks
 
Old 05-12-2005, 02:22 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 926Reputation: 926Reputation: 926Reputation: 926Reputation: 926Reputation: 926Reputation: 926Reputation: 926
You can't ... you can define the size and position. But xterm, rxvt
and the likes have no concept of the windowsmanagers (or DEs)
way of dealing with those things...

xterm -geometry 80x23+100+600 gives the size and position,
there's no way to get it on a different desktop. I thought that
maybe the use of -T or -name would fix the problem of Fluxbox
putting ALL xterms in the same place via remember, but it doesn't.


Cheers,
Tink
 
Old 05-12-2005, 03:50 PM   #8
username17
Member
 
Registered: Aug 2004
Location: Norfolk VA
Distribution: Slackware 11
Posts: 230

Rep: Reputation: 30
Yah, earlier I suggested the geometry thing, but that did not help with the multiple virtual desktops.

That would be a great feature, just not possible.

Well, what if you set the position to wider than your resolution.
Lets say your virtual desktops are setup like his:
_______________
|_1_|_2_|_3_|_4_|

800x600 is your resolution. So, set geometry for a window at 801x0.
That (in my mind) should put it in the top left corner of the second desktop.

My reason for thinking this is that in fluxbox you can move windows from one desktop to the other by clicking and dragging. So, if the virtual desktops are next to each other (horizontally), this might work.

I'm at work, so I can't test it, but if someone wants to test it, or just tell me if it won't work, I'd appreciate it.
GL,
-Jason

Last edited by username17; 05-12-2005 at 03:53 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mplayer window position save? cleansugar Linux - Software 1 10-31-2013 07:47 PM
Desktop Position on screen. LastChip SUSE / openSUSE 1 01-10-2005 07:05 PM
Fluxbox 0.9.x window titlebar position albatros_la Linux - Software 7 09-26-2004 10:21 AM
fluxbox window position BroX Linux - Software 0 12-15-2003 05:51 AM
Desktop Position nick505 Linux - Hardware 1 10-09-2003 12:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:51 AM.

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