You are not logged in.

#1 2011-06-19 22:32:35

raginaot
Member
Registered: 2010-11-22
Posts: 53

a few startup questions

Hi
Just installed Arch again after a long break and I have a couple of questions regarding running commands on startup, where to put them and such.

n1. I use a dhcp server and to get network connection I simply need to run "dhcpcd eth0". Obviously I'd like to this to happen automagically on startup. I don't know if I should put this command in some file or what.
I'd like to get connected as soon as possible during the boot process.

n2. I have two monitors, and to get the right resoulutions and placement I run a simple xrandr command. This seems to be the simplest way and it works and I have put the script in  'startup applications' in xfce.
Problem is that it seems to run after starting the window manager, so that if I log back into a saved session, all the windows are crammed up into one screen.
Could I run this somehow as soon as X starts, even before I log in so it would stick even when switching DEs?

Ther was a third one, but I forgot. I'm sure it will come up again tongue

Thanks in advance

Edit: There was also this thing "echo auto > /sys/class/drm/card0/device/power_profile" . I also have to do this manually after each boot and it has to be done as root (can't even sudo it)

Last edited by raginaot (2011-06-19 22:38:49)

Offline

#2 2011-06-19 22:36:30

Durden
Member
Registered: 2011-06-19
Posts: 261

Offline

#3 2011-06-19 22:37:20

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: a few startup questions

You can set your wired interface to use dhcp in /etc/rc.conf.

Offline

#4 2011-06-19 23:03:56

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: a few startup questions

Put your xrandr command in ~/.xinitrc, and your power_profile thing in /etc/rc.local.

Here's a thought - even though you've used Arch before, you're still required to read the documentation. smile

Offline

#5 2011-06-19 23:37:56

raginaot
Member
Registered: 2010-11-22
Posts: 53

Re: a few startup questions

lucke wrote:

You can set your wired interface to use dhcp in /etc/rc.conf.

tomk wrote:

Put your xrandr command in ~/.xinitrc, and your power_profile thing in /etc/rc.local.

Two down.
I put the command in ~/.xinitrc (it didn't exist so I created it) but it changed nothing.
Monitors are still in clone mode like before.

Is there something I need to do so xorg will call this file?
Also I'm using GDM as a display manager if that matters.

Here's a thought - even though you've used Arch before, you're still required to read the documentation. smile

I thought I did, appearantly not well enough..

Offline

#6 2011-06-19 23:43:38

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: a few startup questions

It seems gdm doesn't use ~/.xinitrc. Peruse stuff in /etc/gdm.

Offline

Board footer

Powered by FluxBB