How do I get the command to run after logging in and starting x?


user

xset led 3What if I need to run after every login ? I am using Manjaro from gnome.

hammock

If you're using a display manager (eg Gnome-native GDM) , look at ~/.xprofile , where you put the command to invoke the x server after it has started but before any gnome has been loaded. Using the bare metal startxor xinitmethod, look in ~/.xinitrc and put your commands after the entire confluence but before exec gnome-session.

If you want the command to run even in a non-graphical login (such as ssh or serial), you're out of luck, since xset requires an x ​​server to run.

Related


How do I get the command to run after logging in and starting x?

user xset led 3What if I need to run after every login ? I am using Manjaro from gnome. hammock If you're using a display manager (eg Gnome-native GDM) , look at ~/.xprofile , where you put the command to invoke the x server after it has started but before any

How do I run a command while logging the output to a file?

Ben Morel I have a console application that needs to run as part of the deployment of a new application version on the server. This console application is designed to output to the console and cannot be changed. I want to run it normally, but log stdout and st

How do I run a command while logging the output to a file?

Ben Morel I have a console application that needs to be run as part of the deployment of a new application version on the server. This console application is designed to output to the console and cannot be changed. I want to run it normally, but log stdout and

How do I run a command when starting a Pod in Kubernetes?

Karthik Rao V. I want to execute a command during pod creation. I see two options available: kubectl run busybox --image=busybox --restart=Never -- sleep 3600 kubectl run busybox --image=busybox --restart=Never -- /bin/sh -c "sleep 3600" What is the difference

How can I run this C program after starting the X server?

Anthony Bliss The source for a program that automatically adjusts a laptop's keyboard brightness to screen brightness is available on the Arch Wiki page for laptops. I can compile it and when I run the program as root it works fine. Unfortunately, I don't know

How can I run this C program after starting the X server?

Anthony Bliss The source for a program that automatically adjusts a laptop's keyboard brightness to screen brightness is available on the Arch Wiki page for laptops. I can compile it and when I run the program as root it works fine. Unfortunately, I don't know

How do I run a command after booting?

Demi I want to run a simple shell command echo 1 > /proc/sys/kernel/sysrqon every boot to enable the sysrq key. This should be done at startup, where should I put a script to do this? Marius Matutiae Depends on the distribution. If you are using a Debian distr

How do I run a command after booting?

Demi I want to run a simple shell command echo 1 > /proc/sys/kernel/sysrqon every boot to enable the sysrq key. This should be done at startup, where should I put a script to do this? Marius Matutiae Depends on the distribution. If you are using a Debian distr

How do I get back to the beginning of the app after logging out?

Ali Alqallaf: I try to quit and go back to where I started. I will try to demonstrate my application structure to make it easy for you to understand. First, I have a wrapper return user == null ? Authentication() : SectionWrapper(); In the partial wrapper

How do I get back to the beginning of the app after logging out?

Ali Alqallaf: I try to quit and go back to where I started. I will try to demonstrate my application structure to make it easy for you to understand. First, I have a wrapper return user == null ? Authentication() : SectionWrapper(); In the partial wrapper

How do I get back to the beginning of the app after logging out?

Ali Alqallaf: I try to quit and go back to where I started. I will try to demonstrate my application structure to make it easy for you to understand. First, I have a wrapper return user == null ? Authentication() : SectionWrapper(); In the partial wrapper

How do I run a command after a set of parallel commands succeeds?

Macspider I want to run two commands in bash at the same time, wait for both commands to execute successfully, and then run the third command. Also, I want to include this in the timecommand. Schematic: time { { cmd_1 & cmd_2 & } && cmd 3; } &> time.log For e

How do I run a command after a set of parallel commands succeeds?

Macspider I want to run two commands in bash at the same time, wait for both commands to execute successfully, and then run the third command. Also, I want to include this in the timecommand. Schematic: time { { cmd_1 & cmd_2 & } && cmd 3; } &> time.log For e

How do I run a command after a set of parallel commands succeeds?

Macspider I want to run two commands in bash at the same time, wait for both commands to execute successfully, and then run the third command. Also, I want to include this in the timecommand. Schematic: time { { cmd_1 & cmd_2 & } && cmd 3; } &> time.log For e

How do I run a command after the directory content is updated?

Erdams There is a directory Awhose contents are frequently changed by others. I have created a personal directory Bin which all files are stored A. Currently, I only occasionally run rsyncfiles that I need from backup Ato B. However, I'm concerned that it is p

After that, how do I run -exec on the find command? grep

philipsk I am trying to move all loader.giffiles into a folder on the remote computer/Pictures find . -iname *.gif | grep loaderThe four files I wanted to move were shown, and naturally, I tried:find . -iname *.gif | grep loader -exec cp *.gif /home/me/ How ca

How do I run a command after a set of parallel commands succeeds?

Macspider I want to run two commands in bash at the same time, wait for both commands to execute successfully, and then run the third command. Also, I want to include this in the timecommand. Schematic: time { { cmd_1 & cmd_2 & } && cmd 3; } &> time.log For e

How do I run a command after a set of parallel commands succeeds?

Macspider I want to run two commands in bash at the same time, wait for both commands to execute successfully, and then run the third command. Also, I want to include this in the timecommand. Schematic: time { { cmd_1 & cmd_2 & } && cmd 3; } &> time.log For e

How do I run a command after the directory content is updated?

Erdams There is a directory Awhose contents are frequently changed by others. I have created a personal directory Bin which all files are stored A. Currently, I only occasionally run rsyncfiles that I need from backup Ato B. However, I'm concerned that it is p

After that, how do I run -exec on the find command? grep

philipsk I am trying to move all loader.giffiles into a folder on the remote computer/Pictures find . -iname *.gif | grep loaderThe four files I wanted to move were shown, and naturally, I tried:find . -iname *.gif | grep loader -exec cp *.gif /home/me/ How ca

Run the xmodmap command after logging in

Ralph I created a file ~/.Xmodmapusing the map command . I thought it would start automatically after logging in (and rebooting), but it doesn't. so i have to always run after the login command $ xmodmap .Xmodmap Is it possible to automate this process? Thank