Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Executing bash command on login

  1. #11
    Join Date
    Nov 2019
    Beans
    7

    Re: Executing bash command on login

    Yeah I had to install it with apt so I'm guessing it doesn't come stock with your flavor either. From the MAN:
    xdotool lets you programatically (or manually) simulate keyboard input and mouse activity, move and resize windows, etc. It does this using X11's XTEST extension and other Xlib functions.
    OS: Linux/ubuntu
    DE: Xfce
    WM: acording to wikipedia xfce uses Xfwm

  2. #12
    Join Date
    Nov 2019
    Beans
    7

    Re: Executing bash command on login

    Ok, so I figured it out. For anyone finding this post, timing does matter but you also need to launch a shell before the command will work. Here is the final code:


    sh -c "sleep 3; /usr/bin/xdotool key ctrl+alt+shift+d"


    For anyone trying to make their monitor grayscale here is the full process using xfce:



    • 0) Install xdotool: sudo apt-get install xdotool
      1) Click Main Menu > Settings > Desktop Settings. Change window manager to Compiz.
      2) Click Main Menu > Settings > Compiz settings
      3) Click the check box next to Color Filters and then click Color Filters
      4) In Filter Files delete all the filters except grayscale.
      5) Optional (I think): change the key combanation for Toggling Screen Filter to ctrl+alt+shift+d instead of super+d as super opens the Main Menu.
      6) Click Main Menu > Settings > Session and Startup > Application Autostart > Add
      7) Enter the fallowing:
      Name
      Code:
      xdotool
      Description
      Code:
       make everything gray
      Command
      Code:
      sh -c "sleep 3; /usr/bin/xdotool key ctrl+alt+shift+d"




    You may need to make sleep longer if your computer is slower than mine (unlikely). Using sleep 1 and 2 did not work for me. Sleep 3 was the minimum for my slow computer.
    Thanks everyone for your help!


    Luna

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •