Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I`m working on something in my work, here is my situation.
In my environment at work, mostly everything is virtualized on VMware, and mostly all the Linux machines are CentOS.
The plan is to install Slackware 64-bit 14.2 (yes, because I specifically wanted this distro, because I love it) with Openbox and some stuff to look nice, but that`s not very important. Important is that java is needed because of access to Blade server`s remote console. In my experience, Linux is better for this instead of Windows, no matter what java versions, or Win7, Win10.
The access to this machine is open by SSH, localy from the console, or by the VNC service. VNC is very good, secure and fast.
VNC is the service which I will mostly use, and I`d like to have SLiM as login manager when is needed to acces this machine locally, and with VNCserver started automatically every time when the machine has been restarted, or powered off/on. I want to avoid command "startx", just to make things clean and neat.
The machine is starting very good with SLiM login asking for username and password and normally logged in and displayed openbox VM with terminal etc.
The problem:
I set in /etc/rc.d/rc.local:
sudo -u user vncserver -geometry 1440x900 -depth 24 :0
(sudo -u, because is needed to start as that user, so that he can be logged by the VNC with specific geometry).
The problem layes is some incompatibility with VNC and SLiM manager, to be precise, they are starting at the same time in my opinion and this is the problem, because every second reboot results in no SLiM window(message is bad magiccake and missing slim.auth in /var/run/slim.auth), or VNC server not started. Somethimes they are both started... But this is annoying and wrong.
In /etc/inittab default runtime is id:4, and SLiM configuration normaly configured, as it`s supposed to be.
VNC session is openbox, just like default GUI configured by xwmconfig.
I know that this (in rc.local line for vncserver startup) is not the best practice, I realized that, and I need a little help with this in Slackware. What is the best way to start vncserver as delayed cleaned start when the system loads, in order to display normal login window in local console, but also to start vncserver..?
Maybe crontab, or maybe some command variable in rc.local, or some shell script with crontab...? Delayed start to vncserver?
Why not sudo? I configured it of course, my user is "wheel", and its enabled in sudo, because vncserver cannot be started as regular user, it must be run by root (only first time). I have managed to solve this problem.
The problem was that I was trying to first start vncserver as user (with sudo), and I was confused, because it started normally, but after reboot there was no longer session. Then, in a meantime while I was trying to find some good solution, I realized something. I ran vncserver as root user and it started, also it started every time after reboot, so... I then input in rc.local only "vncserver". Of course, it was started as root, so because of that, I`ve received root environment. I did not wanted that, so I putted "sudo -u myuser vncserver -geometry...", and next reboot was started as user, also my login window is now starting normally, and everything is working as supposed to be.
Next, I`ve done something wrong, but this is off this thread. I`ve updated by slackpkg update, and after that slackpkg upgrade-all, and after that when it asks to owerwrite or keep packages, I press the "O", and most libraries was missing for Xorg, etc., now I`m in trouble, and thinking why this was happened and what to do next. To search missing packages, or to reinstall everything and be careful, only to update before installing everything...?
don't pick O for over write confs, or after you've set them make back ups of them, so if you do or even if not pick O you can easily put them back to the state of when they worked, maybe even write a little script to run that copies them back over to restore them, if more than one config needs to be done. To ease the having to check every config in the system if you keep them. That is just part of maintenance.
blacklist packages so they will not be touched during updating. they are 3rd party so I do not even know why they would.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.