Trying to start a vncserver that points to a custom xstartup - redhat

I'm using TigerVNC, trying to point to specific xstartup because I will need several unique startups for a given user. This is what I'm trying:
vncserver :5 -name "MyServer" -geometry 600x320 -depth 24 -AlwaysShared -fp /usr/share/X11/fonts/misc,/usr/share/X11/fonts/Type1,/usr/share/X11/fonts/100dpi -IdleTimeout 0 -SecurityTypes VncAuth -rfbauth /home/frogger123/.vnc/passwd -xstartup /home/frogger123/.vnc/mystartup
I am consistently getting
Unrecognized option: -xstartup
The docs on the TigerVNC page list this as a valid option. What am I doing wrong? Thanks
edit:From the manual :
vncserver [:display#] [−name desktop-name] [−geometry widthxheight] [−depth depth] [−pixelformat format] [−fp font-path] [−fg] [−autokill] [−noxstartup] [−xstartup script] [Xvnc-options...]
−xstartup script
Run a custom startup script, instead of %HOME/.vnc/xstartup, after launching Xvnc. This is useful to run full-screen applications.

I was using the wrong version of TigerVNC

Related

How can i add a cron job run every minute to my elearning site on moodle?

I try to add a cron job on an elearning.mysite.gr(Moodle). Although my host gives this message every hour.
Oct 2 1:10:01 linux CROND[123456]: (admin) CMD (touch /tmp/test.txt > /dev/null)
On my site administration -> notifications get this message:
The admin/cli/cron.php script has not been run for 3 days 2 hours and should run every 1 min.
At moodle documentation
/path/to/moodle/admin/cli/cron.php, can i use it ? in which way ?
I tried this :
/usr/bin/php /path/to/moodle/admin/cli/cron.php
but gives me that the process completed with error at one minute
only this touch /tmp/test.txt > /dev/null
completed with success.
Moodle Documentation:
The CLI (command line interpreter) script. This will be at the path /path/to/moodle/admin/cli/cron.php
If in doubt, this is the correct script to use. This needs to be run by a 'PHP CLI' program on your computer. So the final command may look something like /usr/bin/php /path/to/moodle/admin/cli/cron.php You can (and should) try this on your command line to see if it works. WARNING: Check your command-line PHP version is compatible with your chosen version of Moodle.-How to check it?
The command-line PHP program is different to the one running your web site and is not always the same version.
I don't know what to do...I will appreciate any help!!!
I tried by my host panel interface :
Type of progress:
Command line
URL
PHP
i should choose one from 3.
Command*:
placeholder to add my command to be excecuted
Excecute:
Dropdown
1.Cron style
2.Daily at 00:00
I use command line.
touch /tmp/test.txt
When i add
cron style and 1 * * * * * , get message for syntax.
and for
daily at 00:00 success message but on my notification of my site has
The admin/cli/cron.php script has not been run for 17 days 22 hours and should run every 1 min.
That's the icon of my Plesk Login. To change the path/to/moodle/admin/cli/cron.php xould i check the file manager in order to find cron.php file ??
As you add the cron from a web interface (maybe Plesk ?) you only need this part:
/path/to/moodle/admin/cli/cron.php
replace /path/to/moodle/ with the real path on your server, usulay something like /var/www/moodle/ or /var/www/vhosts/domain.name/httpdocs/moodle
To run every 1 minute cron style is :
* * * * *
If you can choose PHP version, choose the same version as the one you are using for Moodle.
Finally, I give this touch /tmp/test.txt ->and at cron style the touch /tmp/test.txt, as you suggest to me.
Because the other commands cannot complete with success.
But in my notifications,(Site administration-Moodle) i still get the message that cron don't run.

How can I turn on the Kodi webserver from the command line?

My Kodi is running as root (for better or for worse). This means the user folder is:
/root/.kodi/userdata/guisettings.xml
A quick search for web-related junk:
cat guisettings.xml | grep web
yields
<webserver default="true">false</webserver>
<webserverpassword default="true"></webserverpassword>
<webserverport default="true">8080</webserverport>
<webserverusername default="true">kodi</webserverusername>
<webskin default="true">webinterface.default</webskin>
Looks good to me. I just have to turn on the webserver.
Steps Taken
systemctl stop kodi
perl -i -pe 's/<webserver default="true">false<\/webserver>/<webserver default="true">true<\/webserver>/' /root/.kodi/userdata/guisettings.xml # (I actually used vim)
systemctl start kodi
Guess what happens, the guisettings.xml gets overwritten each time I start Kodi. I also tried adding the following file: /root/.kodi/userdata/advancedsettings.xml with the following contents:
<advancedsettings>
<loglevel hide="attribute">3</loglevel>
<webserver default="true">true</webserver>
<webserverpassword default="true"></webserverpassword>
<webserverport default="true">8080</webserverport>
<webserverusername default="true">kodi</webserverusername>
<webskin default="true">webinterface.default</webskin>
</advancedsettings>
This also does not work.
Are you by any chance trying to enable the web server to allow using Kodi remote?
I encountered the same issue too, "guisettings.xml gets overwritten".
According to kodi.wiki, you need to configure 2 more XML elements.
To be complete, having the following in advancedsettings.xml should help:
<advancedsettings>
<services>
<esallinterfaces>true</esallinterfaces>
<webserver>true</webserver>
<zeroconf>true</zeroconf>
</services>
</advancedsettings>

Powershell hang when execute commands

I am testing to create SCCM 2012 application deployment types via powershell and below is my command that is working. Im succesfully able to create the deployment types using below line of code
Add-CMDeploymentType -ApplicationName "PowerTest" -InstallationFileLocation "\\sccmserver\folder$\Powershell_Test\Sources\googlechromestandaloneenterprise.msi" -MsiInstaller -AutoIdentifyFromInstallationFile -ForceForUnknownPublisher $true -InstallationBehaviorType InstallForSystem -Language "English" -DeploymentTypeName 'Setup' -InstallationProgram "'code1.wsf' /SMSLaunch /foldername:Chrome 2.0.4'"
But the problem is when I add below parameters (-MaximumAllowedRunTimeMinutes 20 -EstimatedInstallationTimeMinutes 10 -LogonRequirementType WhetherOrNotUserLoggedOn). When I click enter, it seems unable to execute. It does not display any error but it just do not execute. I check in help, and below parameters do exist. Or is it because these parameters depends on other set of parameters that you have to specify first in order for it to able to run?
-MaximumAllowedRunTimeMinutes 20 -EstimatedInstallationTimeMinutes 10 -LogonRequirementType WhetherOrNotUserLoggedOn
Got it. Parameters -MaximumAllowedRunTimeMinutes is actually part of Set-CMDeploymentType cmdlet and not Add-CMDeploymentType.

Google deepmind q learning setup

Hi I'm trying to run the deepmind q learning software on my mac. I believe I have all the necessary libraries to run the network. I don't understand however to actually run the "run_cpu" or "run_gpu" command. Ive tried running it in terminal with the file followed by the game name breakout. I.e. "./run_gpu breakout". The github page with the code says that all you need to do is copy the rom from the roms folder but I'm not quite sure what that means/how to do it. The repository can be found here: https://github.com/kuz/DeepMind-Atari-Deep-Q-Learner
I'm sure I'm missing something really really simple here. Here's the terminal print out:
Els-MacBook-Air:DeepMind-Atari-Deep-Q-Learner-master elcapitan$ ./run_gpu breakout
-framework alewrap -game_path /Users/elcapitan/Desktop/DeepMind-Atari-
Deep-Q-Learner-master/roms/ -name DQN3_0_1_breakout_FULL_Y -env breakout -
env_params useRGB=true -agent NeuralQLearner -agent_params
lr=0.00025,ep=1,ep_end=0.1,ep_endt=replay_memory,discount=0.99,hist_len=4,learn_start=50000,replay_memory=1000000,update_freq=4,n_replay=1,network="co
nvnet_atari3",preproc="net_downsample_2x_full_y",state_dim=7056,minibatch_s
ize=32,rescale_r=1,ncols=1,bufferSize=512,valid_size=500,target_q=10000,cli
p_delta=1,min_reward=-1,max_reward=1 -steps 50000000 -eval_freq 250000 -
eval_steps 125000 -prog_freq 10000 -save_freq 125000 -actrep 4 -gpu 0 -
random_starts 30 -pool_frms type="max",size=2 -seed 1 -threads 4
./run_gpu: line 46: qlua: command not found
Sorry if this sounds uber dumb. Anyway I'd appreciate a solution if you have one. Thanks!
You need to install qlua, try
sudo luarocks install qtlua

Issue with FFMPEG drawtext

ffmpeg -i /home/mysite/public_html/videos/thankyou/thankyou_1.mp4 -strict -2 -vf
"[in]drawtext=fontfile=/home/mysite/fonts/OswaldFont/Oswald-Bold.ttf: x=450:
y=150: fontsize=152: fontcolor=0xAE0216#1: draw='if(gt(n,40),lt(n,300))':
text='THANK YOU',drawtext=fontfile=/home/mysite/fonts/OswaldFont/Oswald-Bold.ttf:
x=450: y=320: fontsize=200: fontcolor=0xAE0216#1: draw='if(gt(n,50),lt(n,300))':
text='JAMISON'" /home/mysite/public_html/videos/thankyou_2.mp4
When running the above, I'm getting the following. It seems to run properly on other distributions. Not sure where to check next.
[Parsed_drawtext_0 # 0x2835480] Option 'draw' not found
[AVFilterGraph # 0x283f980] Error initializing filter 'drawtext' with args 'fontfile=/home/mysite/fonts/OswaldFont/Oswald-Bold.ttf: x=450: y=150: fontsize=152: fontcolor=0xAE0216#1: draw=if(gt(n,40),lt(n,300)): text=THANK YOU'
Error opening filters!
Additionally, this original command works fine in Ubuntu, but give the seen error when running in centOS.
According the the FFmpeg drawtext filter documentation:
draw
This option does not exist, please see the timeline system
This means you should use timeline editing instead.
To do that replace the draw='...' part of your command with:
enable=if(gt(n\,50)\,lt(n\,300))
You should also check:
FFmpeg versions on each machine. You might have an older version installed on Ubuntu, which supports the draw option, and a newer version on CentOS in which the option was removed.
if the font files exist