You can add a delay time with sleep
command.
man sleep
for more info .
Example
I want to startup a program with delay of 10 seconds.
I create an entry in the startup applications with this in command field
sleep 10;/usr/bin/<program name>
Example 2
I want to create a script with the delay (sleep) option and add this script to startup applications
gedit delayscript.sh
and I add these lines
#!/bin/bash
sleep 10
/usr/bin/<program name>
save the script and give it executable permissions
chmod +x delayscript.sh
and add it to startup applications (command field) with full path
/home/username/delayscript.sh
Try this:
#! /bin/sh
echo "# Generated by Application"
export http_proxy='http://$1/'
export ftp_proxy='http://$1/'
Note:
- your argument string($1) should be like this
user_id:pass@proxy.server.addr:proxy_port
- If you do not use userid and password then argument string($1) should be
proxy.server.addr:proxy_port
- you can export https_proxy and socks_proxy if you need.
- To see if your proxy is set or not use
env | grep proxy
To change system proxy using shell script try these:
gsettings set org.gnome.system.proxy mode 'manual'
gsettings set org.gnome.system.proxy.http enabled true
gsettings set org.gnome.system.proxy.http host 'proxy.server.addr'
gsettings set org.gnome.system.proxy.http port proxy_port
If you have user authentication pass and id
gsettings set org.gnome.system.proxy.http authentication-user 'user_id'
gsettings set org.gnome.system.proxy.http authentication-password 'password'
To use http_proxy for all other proxy
gsettings set org.gnome.system.proxy use-same-proxy true
To set bypass proxy for any host
gsettings set org.gnome.system.proxy ignore-hosts "['localhost', '127.0.0.1', 'all', 'other', 'hosts']"
Best Answer
I would assume the script would look something like this:
Just save that as something like install_my_apps.sh, change the file's properties to make it executable, and run it from the command line as root.
(Edit: The
-y
tellsapt-get
not to prompt you and just get on with installing)