Announcement

Collapse
No announcement yet.

Software to bind keys to execute macros?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Software to bind keys to execute macros?

    Does anyone know what the best software is to bind F keys to execute a set of macros like executing SSH and running a batch script, for example?
    Thanks!

    #2
    I don't know about "best", but typical software for this kind of task is xbindkeys.
    https://savannah.nongnu.org/projects/xbindkeys/
    You can install it in Kubuntu directly from the "universe" repository.
    Last edited by Schwarzer Kater; Feb 20, 2023, 03:28 PM. Reason: typos
    Debian KDE & LXQt • Kubuntu & Lubuntu • openSUSE KDE • Windows • macOS X
    Desktop: Lenovo ThinkCentre M75s • Laptop: Apple MacBook Pro 13" • and others

    get rid of Snap scriptreinstall Snap for release-upgrade scriptinstall traditional Firefox script

    Comment


      #3
      Thanks for the reply. I installed it, and I'm trying it out. It seems interesting.

      Comment


        #4
        Originally posted by Seeker View Post
        ... execute a set of macros ...
        I'm confused by what you mean by that, in a Kubuntu context. Do you just mean a script of commands?

        Anyway, the KDE menu editor (right click the KDE menu, edit applications) serves to set up something that can be run and have a "shortcut key" to invoke it. I like doing things this way because it's been rather more persistent over the years than widgets or "custom shortcuts". If I want a widget (say, in a panel) I can drag it from the menu. And, I can put my "somethings" in one place, which helps to find them.
        Regards, John Little

        Comment


          #5
          Thanks for the reply.
          I am in charge of managing a few servers running ubuntu. I run kubuntu on my machines, and never had any reason to join a forum as everything works fine.
          I'd like to automate some of the batch scripts I use to update the servers, update the firewall, SSH into them...etc... Instead of typing or copy/paste, I thought it would be nice to just bind a function key to automate this process. Like F1 SSHs into server 1, F2, into server 2, F3 updates bacth command..etc...
          Thanks.

          Comment


            #6
            xbindkeys

            Comment


              #7
              If you do these task on a regular schedule and don't need to watch them, why not cronjob them?

              Please Read Me

              Comment


                #8
                Staying with X11, I've used xdotool, and ydotool looks interesting, but I've never used it.

                However, I suspect you'd be better with a bash script with some kind of menu, using a tool like kdialog, zenity, or my current favourite yad, though I should look into dialogbox.
                Regards, John Little

                Comment


                  #9
                  I do my manual updates and maintenance that way: I ssh into my server on other PCs I maintain and run a few bash scripts and update when I need to.
                  1. Setup SSH to use secure key access and disable password access.
                  2. Use non-standard ssh ports.
                  3. Set your ssh config to allow easy log in with the correct port and username, etc.
                  4. Use bash aliases to provide a one-word log in.
                  For example, I type "server" into my console and I'm instantly logged into my server via ssh.
                  Last edited by oshunluvr; Apr 20, 2023, 03:17 PM.

                  Please Read Me

                  Comment


                    #10
                    Originally posted by jlittle View Post
                    Staying with X11, I've used xdotool, and ydotool looks interesting, but I've never used it.

                    However, I suspect you'd be better with a bash script with some kind of menu, using a tool like kdialog, zenity, or my current favourite yad, though I should look into dialogbox.
                    I use notify-send so I get pop-up boxes.

                    Please Read Me

                    Comment


                      #11
                      Originally posted by oshunluvr View Post
                      I do my manual updates and maintenance that way: I ssh into my server on other PCs I maintain and run a few bash scripts and update when I need to.
                      1. Setup SSH to use secure key access and disable password access.
                      2. Use non-standard ssh ports.
                      3. Set your ssh config to allow easy log in with the correct port and username, etc.
                      4. Use bash aliases to provide a one-word log in.
                      For example, I type "server" into my console and I'm instantly logged into my server via ssh.
                      That has really helped me, thank you!

                      Comment

                      Working...
                      X