2

I have used unclutter but it only remove the cursor while the command is running in the terminal. It does not provide the permanent solution. I do not want to run the command every time.

Presently what I am doing is that I am calling a script form desktop file

from /etc/xdg/autostart/single_start.desktop

the desktop file **single_start.desktop **

enter #!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false'
Exec=bash /etc/xdg/autostart/single.sh
Name=Chromiumrelaunch
Comment=comment here
Icon=icon path here

the file **single.sh **is

#!/bin/bash

lxterminal -e unclutter -idle 1 &
sleep 10
xdotool windowminimize $(xdotool getactivewindow)

So the unclutter terminal window still comes so I am using xdotool to minimize the window. What I want is that unclutter works permanently in the background.

life tree
  • 21
  • 3
  • 1
    Possible duplicate of [Execute a command on user logon](https://unix.stackexchange.com/questions/122424/execute-a-command-on-user-logon) – Sparhawk Oct 22 '18 at 06:29
  • After adding the command in startup script, the unclutter terminal remains open . It does not run in the background. – life tree Oct 22 '18 at 06:41
  • What is the command you are running? What have you done exactly? – Sparhawk Oct 22 '18 at 07:10
  • There is desktop file which runs on start up and under that i am running a shell script. The shell script is located at /etc/xdg/autostart/shell.sh – life tree Oct 22 '18 at 08:04
  • What are the contents of that file? Please add all this information to your question. – Sparhawk Oct 22 '18 at 09:17
  • i have edited the question – life tree Oct 23 '18 at 07:53
  • `single.sh` is launching a terminal window to run the command, which is unnecessary. You just need to run the command directly. i.e. just `unclutter -idle 1`. For simplicity, just put it in the desktop file's `Exec` section. – Sparhawk Oct 23 '18 at 09:18
  • but how to make unclutter -idle 1 executable in desktop file exec? – life tree Oct 24 '18 at 10:02
  • I'm not sure what you are asking. `unclutter` should already be executable. What happens when you try what I suggested? – Sparhawk Oct 24 '18 at 10:03

1 Answers1

1

Just add unclutter to your desktop environment’s startup applications. It won’t open a terminal and stay running in background.

If you invoke unclutter from within a script don’t forget adding &

unclutter &

I recommend giving xbanish a try which implements the -keystroke option broken in unclutter

Refer to this thread for more infos about compiling xbanish

Edit: You do not need to run unclutter in terminal to make it work.

karlsebal
  • 795
  • 8
  • 20