startup

Setting environment variable in Ubuntu at boot time (via script)

余生长醉 提交于 2019-12-07 06:04:13
问题 I'd like to set a couple of environment variables on an Ubuntu machine (10.04), but I want to create their value via a script, much like: export THE_ENV_VAR=$(script_to_execute_and_use_stdout_from) I've tried setting in /etc/environment , but that only copies rhs verbatim I've tried executing a script in /etc/init.d/ at startup, but that does not seem to work. Ideas? 回答1: You need to write your export statement into /etc/bash.bashrc file, which is a system wide .bashrc file that will set

saving configs in qt linux

*爱你&永不变心* 提交于 2019-12-07 04:50:03
问题 i wrote a qt application for linux. The application is supposed to run at startup- which i did with a desktop entry. but i need it to be more complicated: there is a checkbox that the user supposed to check in order to choose whether the application will run at startup or not. how do i suppose to save his prefference? the application was wriiten for windows before and this was saved in the registry. i got from googling that i should save it in /etc. what file should it be? how do i write it

Why is my .Net app contacting Verisign?

柔情痞子 提交于 2019-12-07 01:27:31
问题 I wrote a .Net application that has nothing to do with network communication. There is not a single line of code in the whole application that uses the NIC, but my firewall has caught it trying to contact Verisign for some reason when the app starts. This does not happen regularly; as a matter of fact, it has only happened twice. The last time it happened, I was able to launch Wireshark before telling my firewall to allow access to the network. There was no real data transfer that I can tell.

Optimizing tomcat startup time

我是研究僧i 提交于 2019-12-07 00:44:00
问题 My application is pretty large, containing for instance 310 jars in web-inf/lib for a total of 100Mb. Starting the server, this step below takes 13s: Sep 16, 2014 1:05:33 PM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory C:\apache-tomcat-7.0.47\webapps\ROOT The application relies on web-fragment and annotations to start properly. I tried the following to skip the 13s scanning time: modify conf/context.xml with attribute logEffectiveWebXml=

When to use TryAddSingleton or AddSingleton?

余生颓废 提交于 2019-12-06 20:05:48
问题 I've noticed in some .net core examples there are calls to TryAddSingleton , and in some AddSingleton when registering services. Decompiler shows that TryAdd( called by TryAddSingleton) adds the specified param "descriptor" to the "collection" if the service type hasn't been already registered. Does it mean that it always safer to use TryAddSingleton, in case if some other method/library already registered the same class? 回答1: As you already noticed, the difference between TryAddSingleton and

Nacos 安装(带视频)

£可爱£侵袭症+ 提交于 2019-12-06 15:19:44
疯狂创客圈 Java 高并发【 亿级流量聊天室实战】实战系列 【 博客园总入口 】 架构师成长+面试必备之 高并发基础书籍 【 Netty Zookeeper Redis 高并发实战 】 疯狂创客圈 高并发 环境 视频,陆续上线: Windows Redis 安装(带视频) Linux Redis 安装(带视频) Windows Zookeeper 安装(带视频) Linux Zookeeper 安装(带视频) Linux RabbitMQ 安装(带视频) Nacos 安装(带视频) 小视频以及小工具的 百度网盘链接 ,请参见 疯狂创客圈 高并发社群 博客 第一步 下载 Nacos Nacos Server下载地址: https://github.com/alibaba/nacos/releases 疯狂创客圈 网盘 提供了zip 包,nacos-server-1.1.3.zip 第二步 上传到linux,并解压缩 上传到 /work,然后解压缩 cd /work unzip nacos-server-1.1.3.zip 第四步 启动服务器 单机模式运行启动方法: /work/nacos/bin/startup.sh -m standalone 如果在 windows 服务器,也就启动的命令不同而已 startup.cmd -m standalone 第四步 设置Nacos开机启动

Run Jar file on startup?

送分小仙女□ 提交于 2019-12-06 14:17:28
问题 I have a Java application that lives in the system tray that I compile to a executable jar file. I would like to add the option within my program to add to the system startup items. As I do not know of any uniform way to do this for all operating systems I assumed I would have to write code to do it for each one I intend to support so I started with Windows. When I attempted to add it to the registry at [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run] using the code

application won't start on startup after adding a notifyicon

帅比萌擦擦* 提交于 2019-12-06 13:53:16
my app was working ok and it would execute on startup before. I added a notify icon and in my code,there are some places that this icon changes.I added all required icons in the root folder of my app,and everything is working fine with the icons,except the startup boot of my app. I can see my app's address in the "run" part of the registry(I mean everything is the same as when my app booted at startup properly).but my app won't run at startup anymore. any advice on my matter? PS:I thought I should explain my work a little bit and I wrote a little piece of app that has the exact same problem

Run application on startup in Windows 8 C#

风流意气都作罢 提交于 2019-12-06 12:50:00
问题 This code: RegistryKey rKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true); rKey.DeleteValue(Application.ProductName, false); rKey.SetValue(Application.ProductName, Application.ExecutablePath, RegistryValueKind.String); doesn't work on Windows 8. I don't have idea why because on Windows 7 and on Windows XP this solution works. Can you help me? 回答1: In order to set something in the registry you need to run the application as an administrator. To

Run shell script after XServer is started?

我们两清 提交于 2019-12-06 11:54:33
问题 How to run shell script when XServer is started and lightdm also. I tried with init.d and rc.local in /etc directory, but my script is calling an gui application so that the reason I need to run it after XServer is started. I am using Debian Jessie. 回答1: According to this link .xinitrc in your home directory will be read and executed, otherwise the default /etc/X11/xinit/xinitrc is used. So you should be able to create this file and have the shell script started. 来源: https://stackoverflow.com