Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
While apparently default button sets like ok/cancel pair or some other that has some additional over those have a default set automatically, so one can just press enter without mouse-clicking the button. But for more custom buttoms it seems that the default focus disappears, and hitting enter does nothing. At least depending on the entirety of the dialog, maybe it has some nonsensical focus on some other area where it doesn't really respond to "enter," like "--picture," maybe...
Have kdialog preceeded by (or succeeded after an "&" if the context allows it, and if it's preferable for some reason) a loop that has wmctrl "grepping"/activating" the unique name of the kdialog window, followed by xdotool resizing it, and breaking the loop.
Code:
( while true ; do
sleep 0.2 # reduces CPU load if the loop never breaks for some reason
wmctrl -a "relevant and ideally unique title for kdialog window" &&
I used to just have lots of "echos" around my scripts printing where it is on a loop or whatever, so I have a better idea of whats happening, often somewhat more clear than with "bash -x", even though that also may help, of course. But the odds are that I'd at some point just leave such debug echos there while the script runs on a daily basis on the background, just helping .xsession-errors to become enormous, for no good reason, since it's working and I'm not reading it. And...
Largely based on this answer on askubuntu. I hope nothing atrocious results from some situation where it ends up trying to mount something a given user should not, or something. May require tweaking either the script or one's sudo permissions for the commands doing the hard work, I don't know how "default" my settings are.
Code:
#!/bin/bash
#echo ${@} | while read input ; do
for label in /dev/disk/by-label/${@} ; do
label=$(basename
The following is a BASH script that with the help of 'catimg' and the 'play' command, you can create a classic text-adventure game but have an image shown just above the text. See notes inside of the script.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.