(OLD) (ARCHIVED) Puppy Linux Discussion Forum Forum Index (OLD) (ARCHIVED) Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info

This forum can also be accessed as http://oldforum.puppylinux.com
It is now read-only and serves only as archives.

Please register over the NEW forum
https://forum.puppylinux.com
and continue your work there. Thank you.

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 24 Sep 2020, 11:57
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Browser open in virtual desktop 4, how to move focus too?
Moderators: Flash, Ian, JohnMurga
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
Page 1 of 1 [12 Posts]  
Author Message
tallboy


Joined: 21 Sep 2010
Posts: 1767
Location: Drøbak, Norway

PostPosted: Fri 23 Jun 2017, 20:03    Post subject:  Browser open in virtual desktop 4, how to move focus too?  

I have for many years arranged for my browser to always open in virtual desktop 4. I use JWM, and here is how I do it:

In a terminal, enter:
xprop|grep WM_CLASS and then click in the application window (in this case - the browser)

Result: WM_CLASS(STRING) = "Navigator", "Pale moon"

Open /root/.jwm/.jwmrc-personal as text, and add these lines:
Code:
<Group>
<Class>Pale moon</Class>
<Name>Navigator</Name>
<Option>desktop:4</Option>
</Group>

Run Restart JWM from the Menu, or jwm -restart in a terminal.

When I open the browser, it is because I need to use it, and if someone could suggest a piece of code to be added, to move the focus along with the window, I would be happy. Less clicking! Very Happy
I know there is an option in JWM Group Settings named nofocus, what I need is the opposite!

BTW: I have also added another modification in the same text: These lines prevent switching to another virtual desktop when you accidentally scroll the mouse outside an application window:
Code:
<RootMenu onroot="4"/>
<RootMenu onroot="5"/>

(thank you, MochiMoppel)
Then restart JWM.

tallboy

Last edited by tallboy on Fri 23 Jun 2017, 21:47; edited 1 time in total
Back to top
View user's profile Send private message 
6502coder


Joined: 23 Mar 2009
Posts: 682
Location: Western United States

PostPosted: Fri 23 Jun 2017, 21:46    Post subject:  

That "stop mouse wheel from switching desktops" fix no longer works in recent JWMs, at least version 2.3.6 and later. For example it does not work in TahrPup 6.0.6.

This has been pointed before elsewhere in the forum, probably in the same thread where MM first mentioned the fix.
Back to top
View user's profile Send private message 
tallboy


Joined: 21 Sep 2010
Posts: 1767
Location: Drøbak, Norway

PostPosted: Fri 23 Jun 2017, 22:04    Post subject:  

After years of struggling with my dual-function USB memory/modem, I have finally switched operator, and I now have a brand new wifi router. Well, it is connected to my old PC by cable, but it has wifi functions if needed. At the same time, my old Puppy CD was starting to misbehave at bootup because of wear(!).
So after much, and serious, contemplation, I have decided to switch from my beloved LupuPlus 5.2.8.005-1 to a newer Puppy! Shocked (yes, I know, I know...)
So I am writing this answer from my new live CD puppy - not yet remastered, the promising Lucid 5.2.8.7! Very Happy

The JWM version is vgit-895, not that the number means anything to me. In any case, the script work as intended here, but thank you for the warning, 6502coder.

tallboy
Back to top
View user's profile Send private message 
tallboy


Joined: 21 Sep 2010
Posts: 1767
Location: Drøbak, Norway

PostPosted: Tue 27 Jun 2017, 01:07    Post subject:  

6502coder, I asked Joe, and he gave me a new version of that old trick, which also let the focus belong to the window! Very Happy

In a JWM 2.3.5 or later, there is an option fixed under Group Settings

Quote:
Fix the windows in this group to the current desktop. This will cause the desktop to change when the window is raised rather than the default behavior of moving the window to the current desktop. New in v2.3.5.


So the new version would be something like this:
In a terminal, enter:
xprop|grep WM_CLASS and then click in the application's window (in this case - the browser, opened in the desktop it will belong to after this code is activated)

Result: WM_CLASS(STRING) = "Navigator", "Pale moon"

Open /root/.jwm/.jwmrc-personal as text, and add these lines:

Code:
<Group>
<Class>Pale moon</Class>
<Name>Navigator</Name>
<Option>fixed</Option>
</Group>   


Run Restart JWM from the Menu, or jwm -restart in a terminal.

Pity I cannot test it, my JWM is vgit-895, but I need 2.3.5 or later.

So the next question is why the regular version number of the JWM's have been replaced by the git snapshot code at download time, which don't tell squat about the version? Mad

tallboy

_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 2084
Location: Japan

PostPosted: Tue 27 Jun 2017, 03:17    Post subject:  

tallboy wrote:
6502coder, I asked Joe, and he gave me a new version of that old trick, which also let the focus belong to the window!
And you will share the new version with us, will you? I wonder why Joe doesn't scrap this idiotic "feature". Nobody needs it and it doesn't even work. As soon as the mouse pointer hits a window when scrolling with the middle button, it's the end of desktop switching and the scroll continues in (accidentaly) hit window.
Quote:
Pity I cannot test it, my JWM is vgit-895, but I need 2.3.5 or later.
I tested and like with almost all new 2.3 features I'm not impressed. After booting I force my telephone application to open in desktop 9. JWM will not switch to the desktop and that's OK with me since I need the application to stay in the background and wait for calls.
When I add the fixed setting, the behavior does not change (I understand that in such case you would like JWM to switch to dt 9, right? Doesn't happen.). I tentatively set all windows to fixed and the only change I noticed is with Geany. Suppose you have Geany open on dt 1, then switch to dt 3 where you open ROX-Filer and Shift-click on a text file to open it in Geany. Normally Geany would move from dt 1 to 3, your current dt. With JWM 2.3.5 and Geany in a "fixed" group, Geany would stay in dt 1 and your dt will switch from 3 to 1. Hmmm... I like the current default better

You should consider to forget JWM and use wmctrl for opening applications on a specific desktop.
To open palemoon on dt 4 (that's 3 for wmctrl as wmctrl counts from zero):
Code:
#!/bin/bash
wmctrl -s 3 ; exec /your/path/to/palemoon


Quote:
So the next question is why the regular version number of the JWM's have been replaced by the git snapshot code at download time, which don't tell squat about the version?
I've asked this before and never received an answer. IMHO it's a bad habit of Puppy devs. I understand the temptation to use the newest version, but a snapshot is not a stable version and what's worse: there is no information that tells you on which (official) version a given snapshot number is built on.
Back to top
View user's profile Send private message 
tallboy


Joined: 21 Sep 2010
Posts: 1767
Location: Drøbak, Norway

PostPosted: Wed 28 Jun 2017, 00:36    Post subject:  

Thank you for testing and commenting, Mochi.
When I started to use Linux 17 yers ago, I used fvwm. I still have it in a big Debian on a spare HDD, along with a conf-file that is about 2 pages long! I have started my browser on desktop 4 for 17 years now! I have always used JWM with Puppy, but I am not a very advanced user nowadays. The option I use, desktop: 4, works fine, and is still available in the latest JWMs. My bash is too old for wmctrl, I need to upgrade it. But when I Ducked bash wmctrl (I cannot say I Googled it, because I use DuckDuckGo!), it seems that the bash version make a lot of problems for many users.
Oh well, I continue to click on my browser icon, and then click on dekstop 4 as I always have done. Very Happy

tallboy

_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 2084
Location: Japan

PostPosted: Wed 28 Jun 2017, 02:12    Post subject:  

Ahemm...
I wrote:
And you will share the new version with us, will you?
Enlighten us, please!
tallboy wrote:
My bash is too old for wmctrl
Says who? wmctrl is 14 years old! How old is your bash? And what does bash has to do with wmctrl?
Quote:
it seems that the bash version make a lot of problems for many users.
Links please! Searching for "wmctrl bash problem" produced a few reports by users who had basic problems with using bash. Neither was the bash version a factor nor were it "lot of problems for many users".

BTW: Did you actually try the code I posted? Just trying would be a lot faster than searching the web for problems and contemplating if running this tiny oneliner would work or not ...
Quote:
Oh well, I continue to click on my browser icon, and then click on dekstop 4 as I always have done. Very Happy
Your choice.
Back to top
View user's profile Send private message 
tallboy


Joined: 21 Sep 2010
Posts: 1767
Location: Drøbak, Norway

PostPosted: Wed 28 Jun 2017, 18:12    Post subject:  

1)
MochiMoppel wrote:
Ahemm...
I wrote:
And you will share the new version with us, will you?
Enlighten us, please!

Answer to 1):
I was seeking a way to move the focus along with the application that opened in desktop 4, following my addition to .jwmrc-personal:
Code:
<Group>
<Class>Pale moon</Class>
<Name>Navigator</Name>
<Option>desktop:4</Option>
</Group>

I got no immediate response from members, so I sent Joe an email, and he gave me this solution, using the option fixed instead of desktop:.
Code:
<Group>
<Class>Pale moon</Class>
<Name>Navigator</Name>
<Option>fixed</Option>
</Group>   

It was new to me, so I referred to this as "The new version", and because I haven't seen it mentioned in the forum, I shared it with you.
2)
MochMoppel wrote:
tallboy wrote:
My bash is too old for wmctrl
Says who? wmctrl is 14 years old! How old is your bash? And what does bash has to do with wmctrl?

Answer to 2):
I was unfamiliar with wmctrl, so I consulted my terminal:
Code:
# wmctrl --version
bash: wmctrl: command not found
#

I therefore assumed - incorrectly - that it was a command from a newer Bash than mine, which is 4.3.30.
3)
MochiMoppel wrote:
Quote:
it seems that the bash version make a lot of problems for many users.
Links please! Searching for "wmctrl bash problem" produced a few reports by users who had basic problems with using bash. Neither was the bash version a factor nor were it "lot of problems for many users".

Answer to 3):
As I wrote, my query in DuckDuckGo was "bash wmctrl" which I suggest you try, without adding the word problem, and you will get a list of problems. I still did not know it was a Linux command.
4)
MochiMoppel wrote:
BTW: Did you actually try the code I posted? Just trying would be a lot faster than searching the web for problems and contemplating if running this tiny oneliner would work or not ...

Answer to 4):
But I did make a script as you suggested, and tried to open Dia in desktop 3:
Code:
#!/bin/bash
wmctrl -s 2 ; exec /usr/bin/dia-normal

Well, it didn't. Dia just opened in the same desktop as I executed the script.
5)
MociMoppel wrote:
Quote:
Oh well, I continue to click on my browser icon, and then click on dekstop 4 as I always have done. Very Happy
Your choice.

Answer to 5):
The main reason for my choice is that it actually works, so my choice seems sound. And your comment about my new version was a good reason for not trying a newer JWM, as you obviously had tested the new option fixed yourself:
MochiMoppel wrote:
I wonder why Joe doesn't scrap this idiotic "feature". Nobody needs it and it doesn't even work. As soon as the mouse pointer hits a window when scrolling with the middle button, it's the end of desktop switching and the scroll continues in (accidentaly) hit window.
So you see, I actually listened to you!

I hope this will answer your questions, please tell me if I missed something.

BTW, I also mentioned to Joe your solution for preventing the mouse scroll from switching desktops - without mentioning your name, of course, and told him, as 6502coder pointed out, that it was no longer possible to execute in the latest version of JWM.
Code:
<RootMenu onroot="4"/>
<RootMenu onroot="5"/>

His answer was that the solution was interesting but unfamiliar to him, but he has had several requests to control the switching of desktops, so he will make some option to turn it on/off, in a later version of JWM.

tallboy

_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 2084
Location: Japan

PostPosted: Wed 28 Jun 2017, 20:46    Post subject:  

Thanks for the clarification. I see that something got lost in translation. Your "6502coder, I asked Joe, and he gave me a new version of that old trick" was an answer to 6502coder's post, where he mentioned the trick to prevent desktop switching, so I assumed that "new version" refers to "trick" and not to "JWM".

Your answer to 4): Your script can't work when you don't have wmctrl installed. Unfortunately it's not included in standard Puppies but a pet is available here. It's only 1 small file that can do things you can hardly do otherwise.
Back to top
View user's profile Send private message 
tallboy


Joined: 21 Sep 2010
Posts: 1767
Location: Drøbak, Norway

PostPosted: Sat 01 Jul 2017, 18:52    Post subject:  

Quote:
...was an answer to 6502coder's post, where he mentioned the trick to prevent desktop switching,...

OK, I see what you mean, I expressed myself clumsy. Sorry!

Quote:
Your answer to 4): Your script can't work when you don't have wmctrl installed. Unfortunately it's not included in standard Puppies but a pet is available here. It's only 1 small file that can do things you can hardly do otherwise.


Is that a shortcoming of Busybox?

tallboy

_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 2084
Location: Japan

PostPosted: Mon 03 Jul 2017, 10:23    Post subject:  

First things first: Did you install wmctrl? Does the script work now? Is your problem solved?
Back to top
View user's profile Send private message 
tallboy


Joined: 21 Sep 2010
Posts: 1767
Location: Drøbak, Norway

PostPosted: Mon 03 Jul 2017, 16:51    Post subject:  

I have installed wctrl 1.07 from your link, and it solved my problem immediately. Very nice!
I will go through all other options, and those in stickyjwm-4.1 also, both applications are new to me.

Thank you, MochiMoppel. Very Happy

tallboy

_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [12 Posts]  
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0974s ][ Queries: 11 (0.0400s) ][ GZIP on ]