I'm new to linux for one week now. For the moment, linux mint is quite a pleasant os to use, but as I'm still new it is still inferior to "windows ?" in my hands in terms of productivity (which doesn't mean that I consider LM12 inferior of course, this is just a statement).
In an attempt to "customize" my OS and getting it better suited to my needs, I wish to be able to add scripts or programs to be launched on startup. After a bit of searches over this forum and the web, here is where I am:
=> A tip I could read was to go through the startup application manager, however (unless I made an embarrassing mistake) in LM12 LXDE, in the menu/preference what I have is the "desktop session settings" which seems to manage the startup program, and I wasn't able to find how to add a line or script. However, even if it would have worked this way the solution would have been totally distro-dependant since I would'nt have been able to do the same on another distro without this feature, so quite happily I thought that I had to learn a few things to get it work!
=> Tried to play with the /etc/init.d directory. What I basically did was:
1/ creating a test script in /etc/init.d:
DESC="enables logitech g300 mouse to work properly"
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
# launches lxterminal
# does nothing
case "$1" in
What I did here was taking another script which seemed to work at startup, deleting the entries which I though had only something to do with the initial task and not with mine. As I didn't really had a clue about what the lsb stuff at the beginning was here for, I did let it stay.
I also made the file executable through:
Code: Select all
chmod 755 /etc/init.d/test
2/ Link it to the file that will be used at startup (don't really have a clue about how this works, neither about how the startup process is going on, but...)
Code: Select all
sudo update-rc.d /etc/init.d/test defaults
It actually seemed to work and create the links even if the lsb wasn't very happy (I suppose I did delete too much things in when I wrote "test", however I kept going on since I read that lsb was some kind of a "model" which files in here should adopt for stability issues or something along the way and did not seem to prevent execs from working, but I may(must) have read too fast).
(maybe I had to deal with some permission issues along the way also, I don't really remember, sorry about not being able to be more precise)
3/ Reboot and no lxterminal got launched.
I also have a few questions:
-> which programming language is used in "test"? I searched a few minutes though google but wasn't able to find it out, probably a keyword issue, I ask this because it will be faster and possibly more precise that way. If you think it is only laziness then sorry and don't take the time to answer
-> does the problem come from the command line to call the program? I did this way because I sort of thought that I read this was the way the previous file went to call programs.
-> how (very basically of course, just to get the starting idea from which I will be able to document myself efficiently) does the system boots (loading of kernel then??? in fact the "mechanics" of booting)
-> In my opinion, loading a script or a program on startup would be exactly the same in terms of command lines and stuff, because to read a script and having it have an effect I need to call a program which runs through the script. Am I right?
(if not then it's stupid for me to "test" by launching lxterminal because the first idea was to launch a script (to fix some hardware issue)
Thank you in advance, and sorry for the huge post!
Edit: I forgot to mention that I'm not really advanced in the world of computer sciences. I have a few basics of how things work, and had basics courses in the university and a few hours using python as a programming language but please consider me as someone who doesn't know a programming language, just switched to linux and wasn't an advanced user under windows.