Adding an XKILL button to Jammy tray.(Solved, thanks.)

New to Puppy and have questions? Start here

Moderator: Forum moderators

Post Reply
BJF
Posts: 4
Joined: Sun Oct 04, 2020 2:22 am

Adding an XKILL button to Jammy tray.(Solved, thanks.)

Post by BJF »

Some other Puppy distros have a pre-installed button in the top tray pointing to XKill, and I happen to find this button quite useful in older machinery when the processor becomes overwhelmed by my enthusiasm. I installed the .pet from the Archives and terminal will call it. I'd really prefer a button to the terminal or a hot key though. Can someone point me toward achieving this please?

JammyJellyfish 32Bit Frugal
Compaq Presario C500
(and working well!)

Cheers.

Last edited by BJF on Tue Mar 14, 2023 4:22 pm, edited 1 time in total.
User avatar
Trapster
Posts: 180
Joined: Sat Aug 01, 2020 7:44 pm
Has thanked: 1 time
Been thanked: 50 times

Re: Adding an XKILL button to Jammy tray.

Post by Trapster »

There should be an "Edit Tray" button on the right side of the top tray next to the "Leave Puppy" button.
You should be able to achieve your goals by editing the tray and adding a button with whatever command you desire.

BJF
Posts: 4
Joined: Sun Oct 04, 2020 2:22 am

Re: Adding an XKILL button to Jammy tray.

Post by BJF »

@Trapster : thank you. I'd looked at that method first up, but being a relatively inexperienced user I had not found a way to create a button from the available applications that gave the ability to replicate the pre-installed Jolly roger button icon in other distro's, and I don't have the skill certainly to modify script from an existing application button to point to the XKill .pet that turns the mouse pointer into the little skull to close displayed windows. Calling /usr/bin/xkill in a terminal does generate the desired functional little skull.

Can you please guide me through creating a button with a suitable label icon of some kind for the tray, and pointing it to /usr/bin/xkill?

Thanks again.

User avatar
Fossil
Posts: 71
Joined: Sun Feb 12, 2023 11:33 am
Location: Beyond 'Reasonable Doubt'
Has thanked: 13 times
Been thanked: 31 times

Re: Adding an XKILL button to Jammy tray.

Post by Fossil »

@BJF Xkill can be found in /usr/bin. The Tray Manager looks for tray setup under /usr/share/applications - Xkill wasn't visible. The simplest answer was to copy Xkill from /usr/bin to usr/share/applications - where the Tray Manager will find the bin.
The icon Xkill.svg was taken from a previous Puppy (Xenial), it was then converted in mtPaint (how necessary this is I cannot say) to .png and placed in /usr/local/lib/X11/pixmaps/. Tray Manager 'should' find the entry.

Okay, that's the meat and potatoes. Alternatively, having done the previous,
Open Root ~(All). Go to ~.jwm. Search for, jwmrc-tray1. Open with a text editor. Scroll down to (in my case) line 17, where this was typed between the other entries. Placement is up to you:

Code: Select all

<TrayButton popup="xkill" icon="/usr/local/lib/X11/pixmaps/xkill.png">exec:/usr/bin/xkill</TrayButton>

Refresh the desktop, restart JWM. With luck - and a following wind - Xkill should appear in the upper tray!

Should you wish for the lower tray. Open jwmrc-tray2 in a text editor, post this code wherever you want the icon to appear between the various pre-existing items.

Code: Select all


<TrayButton popup="Xkill - kill a window" icon="xkill.svg">exec:xkill</TrayButton>

(Edited for typo!)

Attachments
xkill.png
xkill.png (8.96 KiB) Viewed 252 times
Xkill, JammyPuppy32.jpg
Xkill, JammyPuppy32.jpg (51.3 KiB) Viewed 252 times
BJF
Posts: 4
Joined: Sun Oct 04, 2020 2:22 am

Re: Adding an XKILL button to Jammy tray.(Solved, thanks)

Post by BJF »

Dear Fossil: When I grow up I want to know this sort of stuff. "Teach yourself BASH" books don't go into the smarts that come with experience.

Mission accomplished, the luck and following wind did their bit, and I now have a window kill button in my top tray and promise to use it wisely.

John.

Post Reply

Return to “Beginners Help”