LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 05-29-2019, 02:22 PM   #1
imarkovic
LQ Newbie
 
Registered: Nov 2017
Posts: 25

Rep: Reputation: Disabled
Slackware delayed start of app


Hello everybody,

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?

Thanks in advance

Last edited by imarkovic; 05-29-2019 at 02:28 PM.
 
Old 05-30-2019, 10:55 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,345
Blog Entries: 28

Rep: Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145Reputation: 6145
Maybe I'm missing something here and I'm scratching my head, but why "sudo"?

Slackware does not configure sudo out of the box. ("sudo" is a *buntu thing.)

Did you configure the sudoers file on Slackware?
 
Old 05-31-2019, 02:00 AM   #3
imarkovic
LQ Newbie
 
Registered: Nov 2017
Posts: 25

Original Poster
Rep: Reputation: Disabled
First, thanks for your help.

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...?
 
Old 05-31-2019, 09:19 AM   #4
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
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.

Last edited by BW-userx; 05-31-2019 at 09:29 AM.
 
Old 05-31-2019, 01:16 PM   #5
imarkovic
LQ Newbie
 
Registered: Nov 2017
Posts: 25

Original Poster
Rep: Reputation: Disabled
Many thanks for clarification, now it`s a little more clear to me.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Faster gnome session startup by delayed programs start catkin Programming 2 06-21-2010 07:19 AM
Faster gnome session startup by delayed programs start catkin Linux - Desktop 0 07-06-2009 12:21 PM
bash - start app, [do stuff], kill started app MiniMe001 Programming 3 03-19-2008 03:06 PM
New app install, or, I've d/l'd the app, now what? Dani Linux - Newbie 4 01-06-2002 08:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 11:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration