You are not logged in.
What do the following lines in .xinitrc do? I noticed they were included in one of the last updates this month:
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done
unset f
fiLast edited by trusktr (2011-03-22 23:17:34)
joe@trusktr.io - joe at true skater dot io.
Offline
You're asking for help in reading a bash script? I don't even use bash very often and I know what that does.....
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
I've seen it in the wiki too and I don't get it: why does the file have to be executable to source it?
[karol@black test]$ ls -l 1 2
-rwxr-xr-x 1 karol users 29 03-22 07:52 1
-rw-r--r-- 1 karol users 4 03-22 07:52 2
[karol@black test]$ cat 1
#!/bin/bash
a=1
. 2
echo $a
[karol@black test]$ cat 2
a=2
[karol@black test]$ ./1
2'2' gets sourced by '1' even though '2' is not executable.
I'm not a bash guru, so feel free to correct me.
Offline
Basically it source files from /etc/X11/xinit/xinitrc.d/
nothing special, I notice it there's a file named "30-dbus" in there.
It's contain some dbus session-related mention in wiki which usually need to be done manually by the user.
Guess you don't have to do it manually any more ![]()
and as for why it's have to be executable: If I say your system will run ANY FILE in a certain folder without care what it is, do you still think it's OK?
tsujeruplive, tnarongisi... ... ... ... ɥsılƃuǝ sı sıɥʇ
Offline
If I say your system will run ANY FILE in a certain folder without care what it is, do you still think it's OK?
That's basically what I figured out, but is it OK to say that files have to be executable, is it a convention of sorts?
https://wiki.archlinux.org/index.php?ti … oldid=prev
Offline
Oh, I think it's just a secured method. It's not necessary to be executable. But it SHOULD BE executable.
For a fun example:
A file/a driver must be executable/have a licence to be execute/drive. Without this, unexpected problem/traffice accident may occur. ![]()
Last edited by lives2evil (2011-03-22 08:35:26)
tsujeruplive, tnarongisi... ... ... ... ɥsılƃuǝ sı sıɥʇ
Offline
Oh, I think it's just a secured method. It's not necessary to be executable. But it SHOULD BE executable.
For a fun example:
A file/a driver must be executable/have a licence to be execute/drive. Without this, unexpected problem/traffice accident may occur.
Yeah but when you haul (source) a car onto a tow truck, it can still move without driving. ![]()
ᶘ ᵒᴥᵒᶅ
Offline
Yeah but when you haul (source) a car onto a tow truck, it can still move without driving.
Oh yeah, never thought of that ![]()
tsujeruplive, tnarongisi... ... ... ... ɥsılƃuǝ sı sıɥʇ
Offline
... But this file (/etc/X11/xinit/xinitrc) is never executed, right? Once there is a ~/.xinitrc that launches our WM/DE of choice...
Offline
True enough. It won't be executed if you do not wish it to do.
Perhaps we should update the /etc/skel/.xinitrc file to included this template?
tsujeruplive, tnarongisi... ... ... ... ɥsılƃuǝ sı sıɥʇ
Offline
Perhaps we should update the /etc/skel/.xinitrc file to included this template?
The skel xinitrc file already includes them, see xorg-xinit/trunk/xinitrc.
Offline
It's true. Guess I haven't updated recently.
tsujeruplive, tnarongisi... ... ... ... ɥsılƃuǝ sı sıɥʇ
Offline
That's exactly why I was asking, lives2evil. hehe.
@ngoonee Not everyone that uses Linux uses Bash yet (I'm still learning, that is).
I haven't noticed any lack of performance with those lines omitted. What is the best reason to add those lines?
Last edited by trusktr (2013-08-31 18:52:17)
joe@trusktr.io - joe at true skater dot io.
Offline
I haven't noticed any lack of performance with those lines omitted. What is the best reason to add those lines?
You omit those lines, executable files in /etc/X11/xinit/xinitrc.d/ won't get sourced. If you don't have any - nothing should change.
Offline
It should help on newly installation rather than already existed one. Note that dbus I mentioned. Nothing will change if everything is already working for you. And performance is nothing you can boost so easily my friend ![]()
So to sum it up, its purpose is to make life easier in the future ![]()
Last edited by lives2evil (2011-03-22 19:29:52)
tsujeruplive, tnarongisi... ... ... ... ɥsılƃuǝ sı sıɥʇ
Offline
Thanks for the tidbit Karol! ![]()
How is it exactly that that would help on a new system vs an already existent one, lives2evil?
joe@trusktr.io - joe at true skater dot io.
Offline
OK, I found it's quite interesting.
So as you know if you're using a standalone wm (openbox for example) you'll have to add this to your .xinitrc
exec ck-launch-session dbus-launch openbox-sessionwhich is so........ long and many people usually make mistake in this step. (at least I did https://bbs.archlinux.org/viewtopic.php?id=115488)
So I tried and use the new method to see if anything different. Edited /etc/slim.conf
login_cmd exec ck-launch-session /bin/bash -login ~/.xinitrc %sessionAdd those lines to .xinitrc and change my exec line to "exec openbox-session".
Guess what, no error or whatsoever when I tried to automount a cd or usb.
so except for the line in slim.conf (which I think will be fixed in the future) just a "exec openbox-session" worked like a charm.
But why must we source files instead of added code directly to ~/.xinitrc? The answer is "for future convenient".
tsujeruplive, tnarongisi... ... ... ... ɥsılƃuǝ sı sıɥʇ
Offline
aha, i see! So i'm guessing in the future they'll actually replace
exec ck-launch-session dbus-launch openbox-sessionwith
exec openbox-sessionand the user won't ever have to see
login_cmd exec ck-launch-session /bin/bash -login ~/.xinitrc %sessionright?
Last edited by trusktr (2011-03-22 22:01:58)
joe@trusktr.io - joe at true skater dot io.
Offline
Oops, sorry, I jumped to conclusion. I have found out that slim some out get dbus running without me knowing (I disable these lines and it worked fine).
Since then I have been trying to figure it out what exactly this dbus is all about.
According to the wiki it's needed:
https://wiki.archlinux.org/index.php/Db … nvironment
After a while I found out.
this time I use startx to run X instead of slim. changed my "exec openbox-session" to "exec pcmanfm".
1st: with those lines commented out.
When I tried accessing Trash folder, it say: not supported.
2nd: uncommented.
Accessing trash is no problemo.
Obviously pcmanfm is using dbus to communicating with gvfs.
So you still have to uses "exec ck-launch-session dbus-launch openbox-session" ![]()
The only people who get benefit from this is those who run only one application.
However I'm still think this is an improvement and probably it's gonna be useful in the future (I'm not talking about this DBUS case).
PS:
There's also a file about libcanberra.
http://0pointer.de/lennart/projects/lib … /#overview
Last edited by lives2evil (2011-03-22 22:43:09)
tsujeruplive, tnarongisi... ... ... ... ɥsılƃuǝ sı sıɥʇ
Offline
oh, ok, gotcha! hehe. I'll just leave the lines there and see what happens in the future. ![]()
joe@trusktr.io - joe at true skater dot io.
Offline
If you have nothing else to ask, then please mark this as [Solve]
tsujeruplive, tnarongisi... ... ... ... ɥsılƃuǝ sı sıɥʇ
Offline
Thank you lives2evil. ![]()
joe@trusktr.io - joe at true skater dot io.
Offline