How to make nitrogen load a wallpaper on startup silently

10 risposte [Ultimo contenuto]
quantumgravity
Offline
Iscritto: 04/22/2013

Hey guys,
I'm experimenting at the moment with some minimalistic tiling window manager such as i3 or awesome.
In order to have a nice look I have to start nitrogen after I booted the pc and set the wallpaper manually, and that's pretty annoying.

As far as I read in the manual nitrogen will set the wallpaper silently if I use nitrogen --restore, but I have to write this command in a file which loads commands on startup.

Which file is this
a) for normal user commands
b) for root user commands?

Thanks for your help.

Darksoul71
Offline
Iscritto: 01/04/2012

Try either .bash_profile or .bashrc

ZykoticK9
Offline
Iscritto: 04/07/2011

NO!

Darksoul71
Offline
Iscritto: 01/04/2012

Oh yeah, my bad....both files are only called when you "log in" at a shell.
I had it wrong in mind. Writing a simple NO as answer on the other hand is neither polite, nor very helpful though.....

ZykoticK9
Offline
Iscritto: 04/07/2011

sorry. you're right - it wasn't polite or helpful.

lembas
Offline
Iscritto: 05/13/2010

On the other hand adding fortune to ~/.bashrc is one of the best ideas I've ever had. :)

ZykoticK9
Offline
Iscritto: 04/07/2011

fortune is fine, 'cause it's a text application. you don't want Xorg stuff running from a .bashrc (in case you aren't actually in Xorg)

lembas
Offline
Iscritto: 05/13/2010

Yes and you don't need to run it every time you pop up a terminal window.

lembas
Offline
Iscritto: 05/13/2010

For any command that needs to be run as root, you'll need to fiddle with the scripts in /etc/rc2.d/

(as the default runlevel is 2)

It's quite complex but you can get a dirty hack going...

ZykoticK9
Offline
Iscritto: 04/07/2011

On Fri, Jan 24, 2014 at 03:16:15PM +0100, name at domain wrote:

> Which file is this
> a) for normal user commands
> b) for root user commands?

re a) create a ~/.xsession file with at least two lines, "nitrogen --replace &" (or whatever you need), then a second line "exec YOUR_WM_HERE"

re b) don't load Xorg as root!

good luck.

quantumgravity
Offline
Iscritto: 04/22/2013

Thank you guys, I created the .xinit and will post later if it's working.

Every attempt to help is appreciated and of course everybody can confuse things from time to time, so let's be nice to each other.
Thanks to all!