Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: mbertrand on August 28, 2012, 02:27:26 PM
-
I have my main QT application that I want to have auto start. So I added it to the end of .xsession. All is good, but when I commented out this line and rebooted instead of getting the typical Tiny Core desktop I get the xsetup each time. Even after removing that line that I commented out I still keep getting this xsetup at startup. Maybe something else changed?
my boot codes seem to be ok.
-
It could be caused by a number of reasons, from your story must likely the xserver startup cmd in .xsession got lost in the action of editing the file
It should look something like this:
/usr/local/bin/Xvesa -br -screen 1280x1024x24 -shadow -mouse /dev/input/mice,5 -nolisten tcp -I >/dev/null 2>&1 &
have a look at /usr/bin/startx to check out other reasons and to add debugging output.
-
according to the following
http://wiki.tinycorelinux.net/wiki:the_boot_process
http://distro.ibiblio.org/tinycorelinux/faq.html#appstart
/home/tc/.X.d/*.* is the best place to autostart applications
echo "app_name [options]" > /home/tc/.X.d/app_name
-
I dont see in that doc anything saying anything about being best and i dont think its a solution to the problem ;)
Any how good point but I find it more difficult to control in what order things start after X if not writing it straight in .xsession (me being ignorant i mean one could just make a .X.d/.my.xsession).
Besides that its a user file not system one so its gonna be limited in how much clutter there is gonna be and no one else has to see or understand it so in that case i find it ok to sacrefy easy over best practice.
On small one user systems it takes up longer time to maintain serveral files and dirs than a single file but on large multi user systems with several admins I feel its the oposit.
-
a start file in X.d is exactly how I've started apps on start of X assuming if you need the apps to run in X it's not the only way but is the recommended method..
-
i don't think that tinycore is a small user system because i think it can be expanded to solve any tasks
but in any way for some hidden problems sometimes it's difficult to determine their causes
in order to try to avoid them should follow the principles that laid down by system developers
but unfortunately i can admit that this is not always help
for example here (http://forum.tinycorelinux.net/index.php/topic,13882.0.html) i still can't find a reason why aria2 does not start although it seems that i did everything correctly
-
.xsession is a single user file maintaned by the user itself.
I have not taken into account any OS as any OS can be setup as terminals, pcs, workstations or servers. The extra line about small or single user systems and large or multi user systems was to clarify in general therms oposit the specific example.
In regards to debuging in this case i would say cut the .X.d layer away if anything, but i totaly agree with point of view in regards to follow standards, instructions, principles but this is not out sides those.
do you need a script to start your application, setting up enviroments and so fourth place it in .X.d
or else .xsession is just fine.
.X.d can also be used for what the admin thinks needs to be started with no user control.
Taking all the things in my last two posts into account sometimes it becomes best practice to use .xsession, by the way its there for the user for a reason ;)
-
regarding usage of xsession i agree
but it is good when know what doing
because in this case any wrong changes
can lead to undesirable consequences :)
-
Well, my .xession file looks ok but I'm starting to think that there could be invalid characters in the file that you don't see.
I explain. I develop on one computer (Ubuntu) and then deploy( or copy) to the target (Tiny Core). Sometime I create an ssh connection via Nautilus and edit text files via gedit.
Could gedit be guilty? I also have just been confirmed that apparently it may have been edited by a colleague of mine via Windows Notepad I think and I think Notepad adds to every line carriage return and line fied (\r\n). Could this be a problem?
-
I also have just been confirmed that apparently it may have been edited by a colleague of mine via Windows Notepad I think and I think Notepad adds to every line carriage return and line fied (\r\n). Could this be a problem?
Yes - use "dos2unix filename" to fix
-
Oops I may have been wrong. I had asked someone I work with to view the file in his hex editor cause he is good at finding abnormal chars in file. So I emailed it to him. He his in Windows using live mail and I think when he extracted the file to disk Windows added the carriage return. I looked at the file in Linux with my hex editor and there is no '\r'.
-
To be on the safe side use "dos2unix" on any text file that has passed via windows
-
dos2unix did not work. Does anyone know where or what script could invoke xsetup on boot?
-
The shipped file is available in /etc/skel. Maybe compare it to your current file state?
-
I re executed xsetup a few times and nothing changed and I did again and all is well. But the content of my xsession appears to be the same. I've always has 640X480X24. I don't know what is going on. It seems like once in a while when I boot xsetup is invoked.
Does anyone know who is invoking this?
-
There's not many files in Core, just do a grep :)
-
what you will have if you delete .xsession and then reboot with backup?
to applying original .xsession without your changes from /etc/skel
-
"Does anyone know who is invoking this?"
I still think startx is a good guess. Have a look, add debug.
"I've always has 640X480X24"
Please explain, is it different from what you stated in your .xsession? Do you imply that changes to .xsession is restored to "defaults" after boot? Did you add home or similar to your .filetool list?