Announcement

Collapse
No announcement yet.

Having a script execute when logging on

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Having a script execute when logging on

    The only way I have found to calibrate the touchscreen on my Panasonic Toughbook in Kubuntu is to use a bash script that uses "xinput set-prop" which I had to create literally by trial and error. It kinda gets me close, within 5% accuracy, but is not perfect. The problem is it only persists during the session. How do I get the script to run automatically at login. The autostart feature in KDE settings does not seem to work.

    On a side note, I wonder if it is related to things like Pulse also not using local settings in ~/.pulse/deamon.conf, for example. It only applies them if I restart pulseaudio with -K.
    Last edited by ShadYoung; Sep 18, 2022, 08:34 AM.

    #2
    This might provide you with a direction to pursue: https://askubuntu.com/questions/1120...ent-after-boot
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      If you have the script working fine, then all you need to do is add it via the Autostart section of System Settings

      Click image for larger version  Name:	Screenshot_20220918_125507.png Views:	0 Size:	93.0 KB ID:	665225

      It probably won't be necessary, but old hardware being finicky animals, if for some reason you need to make the script wait a little to activate, you can add a timer to a line just above your command
      sleep n
      Where n is the number of seconds.

      I was going to suggest testing out a Wayland session for touch support and screen rotation, as this is vastly superior to xorg in this regard. ie no scripting or futzing. This is dependent on the screen technology and hardware sensors used, though. I am sure things are completely different than what are used on more recent touch screen hardware

      if you want to test this out, you just need to install plasma-workspace-wayland, and simply choose a Wayland or x11 session at login. They don't mess with each other's settings or anything like that, or your custom script.

      Comment


        #4
        I think I am asking way too much from both dear old Linux and the community with this project. Every solution to even basic things with this laptop leads down a rabbit hole.

        Its a cool but highly proprietary laptop used by the police and military as its made out of a block of magnesium alloy and is shock proof, water proof, dust proof, drop proof, and virtually bullet proof and converts to a tablet with a 360degree swivel and fold flat 1200 nit daylight viewable touch screen with a side panel button array to control basic functions. It is passively cooled and with an SSD is 100% silent.

        As a basic "pc" it works really well with KDE. The "laptop" part of it.. not so much. Even if I get the screen calibration issue solved, then I need to tackle the backlight, rotation, side panel buttons, and touchpad. This will take too long and I cannot spend that much time trouble shooting. It is a shame as it performs considerably better in Linux.

        Comment


          #5
          Originally posted by ShadYoung View Post
          highly proprietary laptop used by the police and military
          Which means (almost with a 100% certainty) that all the hardware is 100% Microsoft compliant, and that means the hardware depends on Microsoft Software API compatibility, which means it's almost certain to be a PITA to get it fully functioning (if even possible) on anything other than Windows. Just say'n.
          Windows no longer obstructs my view.
          Using Kubuntu Linux since March 23, 2007.
          "It is a capital mistake to theorize before one has data." - Sherlock Holmes

          Comment


            #6
            Originally posted by ShadYoung View Post
            As a basic "pc" it works really well with KDE. The "laptop" part of it.. not so much. Even if I get the screen calibration issue solved, then I need to tackle the backlight, rotation, side panel buttons, and touchpad. This will take too long and I cannot spend that much time trouble shooting.
            That's too bad. For me, this would be the fun part
            Unless it was to be a primary or work machine, of course.

            There seem to be enough links with people who have gone down the same road, but they are all quite old, and may not be all that accurate any longer.

            Calibration probably is still valid today, via custom xorg options and/or seeing if your bios has calibration tools built in:
            https://www.linuxquestions.org/quest...rk-4175664498/
            https://www.bobjohnson.com/blog/how-...our-toughbook/


            Backlight:
            https://www.reddit.com/r/Ubuntu/comm...ss_adjustment/
            (the link in there may also have useful info on the touchpad)


            Making time to dive deeper:
            Sorry, I really can't bend the laws of the space/time continuum

            Comment


              #7
              Originally posted by claydoh View Post
              Sorry, I really can't bend the laws of the space/time continuum
              I can probably scare up a slightly used T.A.R.D.I.S. for you.
              Windows no longer obstructs my view.
              Using Kubuntu Linux since March 23, 2007.
              "It is a capital mistake to theorize before one has data." - Sherlock Holmes

              Comment


                #8
                Originally posted by Snowhog View Post
                Which means (almost with a 100% certainty) that all the hardware is 100% Microsoft compliant, and that means the hardware depends on Microsoft Software API compatibility, which means it's almost certain to be a PITA to get it fully functioning (if even possible) on anything other than Windows. Just say'n.
                I suspect you are right. Its odd, because in many ways, KDE/Linux THINK its working right. Things are detected and say they are working and even appear to make sense, like audio... that showed me a volume for the computer, a volume for the head phones, and a volume for the mic. Perfectly normal... Except no sound. Check the sinks... all report working. Music seems to be playing... bouncy bars are bouncing... but nothing. Go back, check the mutes.. nothing muted.. check the headphone volume.. nope. Install Pulse Volume Control. Nope... all checks out.

                Sooo... open a terminal and launch the cli alsa mixer... and what do I see? 7!!!! volume controls, 3 of them labeled headphones. Start turning each volume control up one by one... and sure enough, the muted and lowered volume labeled headphone is the culprit, but not the one that corresponds to the slider in PAVC or K, and up comes the volume through the speaker. Check the master and it now seems to work properly.

                Comment

                Working...
                X