How to autorun startup script on login/reboot in dom0 with i3wm?

361 views
Skip to first unread message

John Smith

unread,
Jan 13, 2017, 1:41:20 AM1/13/17
to qubes-users
I just installed i3wm and it switches my 2 displays from extended to mirrored. In effort to fix this, I wrote a simple script called rc.local containing the following commands:

xrandr --output DP-1 --auto
xrandr --output VGA-1 --right-of DP-1
xrandr --output VGA-1 --mode 1920x1080

The script works fine when I execute it manually from the terminal (I've already done chmod+x). However, at the end of my /etc/i3/config file i added the line:

exec /etc/rc.local

I added this line to automatically run the script when i reboot my computer but for some reason it doesn't work. I've tried it with single and double quotes as well as exec_always and --no-startup-id but nothing seems to work. Any ideas how I can get this working? I've also tried putting the commands directly into the config without calling the script but that didn't work either. Even echo test >> /tmp/testfile didn't output anything. Any ideas would be much appreciated, thanks.

01v3g4n10

unread,
Jan 13, 2017, 8:52:39 AM1/13/17
to qubes-users

Have you tried placing it in /rw/config/rc.local?
https://www.qubes-os.org/doc/config-files/

John Smith

unread,
Jan 13, 2017, 3:56:47 PM1/13/17
to qubes-users

No, that directory doesn't exist in dom0, its only for VMs.

raah...@gmail.com

unread,
Jan 13, 2017, 4:11:21 PM1/13/17
to qubes-users

wouldn't it just work like a normal baremetal linux system? I been using windows so much lately right now I'm drawing a blank lol. I think you got a choice of whole whost of diff directories to try, google fedora.

last time I had to do this I made a .desktop file. Does that work in xfce? I'm not sure.

Reply all
Reply to author
Forward
0 new messages