You are not logged in.
Pages: 1
Hi;
I'm trying to run a xgamma command at start. I've followed many different instructions without success.
I added the command at /home/xinitrc but id didn't work;
I did a script that executes fine and added a service to it at /etc/systemd/system, I "systemctl enable" it and everything works fine but after reboot "status" gives me "unable to open display"; (and yes, I tried with "sleep 60" at the script and even so it didn't work).
I tried to put something at /etc/xdg/autostart but it didn't work either.
Ok, maybe there is a syntax problem somewhere but I cannot recognize it since I'm following the instructions I find at Archwiki.
Can someone help me???
thx.
Offline
I added the command at /home/xinitrc but id didn't work
you probably mean /home/user/.xinitrc. It should work but most likely you must delay xgamma's startup with sleep by few seconds.
I did a script that executes fine and added a service to it at /etc/systemd/system, I "systemctl enable" it and everything works fine but after reboot "status" gives me "unable to open display"
did you try importing DISPLAY and XAUTHORITY: https://wiki.archlinux.org/index.php/Sy … XAUTHORITY
I tried to put something at /etc/xdg/autostart but it didn't work either.
It needs to be a valid .desktop entry. You could also put it in ~/.config/autostart/
Please post your .xinitrc/script/.service/.desktop file, which ever you're trying to get to work.
Offline
thank you ooo for your response.
I'm trying first the /home/user/xinitrc. Could you please take a look to see what is missing?
The file looks like this (myxgamma.sh is my script):
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done
unset f
fi
export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
exec i3
sleep 10
exec /home/user/myxgamma.sh
Last edited by opskoewel (2015-11-23 19:09:04)
Offline
Nothing after your 'exec i3' line gets run until after i3 has finished (that's what the exec does).
Try changing the last 3 lines to...
/home/user/myxgamma.sh
exec i3Offline
I've tried:
/home/user/myxgamma.sh
nope
exec /home/user/myxgamma.sh
nope
exec --no-startup-id /home/user/myxgamma.sh
nope.
Everything before exec i3 as you said and tried with and without sleep before.
Any other ideas?
(thanks for the trouble!).
Last edited by opskoewel (2015-11-23 19:51:32)
Offline
Offline
#!/bin/bash
xgamma -gamma 0.650 Offline
please use code tags when posting your configs.
with your ~/.xinitrc, xgamma isn't executed until you exit i3.
You need to run the xgamma script in background before i3, and run sleep in the background process before xgamma.
For example, change your .xinitrc to something like
/home/user/myxgamma.sh &
exec i3and put sleep in the myxgamma.sh script
sleep 10
xgamma -gamma 0.650Offline
Sorry but it didn't work.
I also tried to apply your changes to
/root/.xinitrc or
/etc/skel/.xinitrc and it didn't work.
Any other ideas?
Thank you for your patience!
Offline
post your updated ~/.xinitrc and xgamma script.
do you see any errors from xgamma on startx output (you can save the ouput to a file with 'startx > ~/startx.log')
you could also try something like this in your .xinitrc to run xgamma after i3 is started:
exec i3 & i3pid=$!
sleep 10
xgamma -gamma 0.650
wait $i3pidDon't edit /etc/skel/.xinitrc or /root/.xinitrc. That won't make any difference. Also don't use X as root user.
Offline
well, your changes to .xinitrc didn't work.
then I used
startx >startx.log and got a blank screen. After reboot I can't log as a user anymore, only as root, all my settings are gone.
I don't know what to do now, should I reinstall everything and keep trying with the xgamma?
Offline
apparently logging startx output by redirecting didn't work for me either for some reason.
It can't be the cause of your latest issues though.
You could try creating a new user if your system isn't completely broken.
Offline
Pages: 1