<div dir="ltr">Hi <span style="font-size:12.8px">Alejandro,</span><div><span style="font-size:12.8px"> Thank you for your excellent reply. Our architect told</span></div><div><span style="font-size:12.8px">me today that "w</span><span style="font-size:12.8px">e will not have an Ubuntu Linux terminal to run when running in</span></div><span style="font-size:12.8px">mono-service mode. Instead we need to start an Ubuntu Linux service".</span><div><span style="font-size:12.8px">As a result, he does not want me to use export LD_LIBRARY_PATH </span></div><div><span style="font-size:12.8px">before mono-service </span><span style="font-size:12.8px">./AudioRecorder.exe.</span></div><div><span style="font-size:12.8px"> Furthermore, I cannot pass in LD_LIBRARY_PATH as a</span></div><div><span style="font-size:12.8px">command line argument because specifyi</span>ing <code>LD_LIBRARY_PATH</code> </div><div>as a command-line argument has no effect because </div><div><code>LD_LIBRARY_PATH</code> is processed by the dynamic link loader (ld.so), </div><div>except in the case where the program calls after <code>dlopen</code> to load a plugin.</div><div> Also, I looked at using -Wl, -rpath and $ORIGIN , according to <a href="http://stackoverflow.com/questions/25918462/why-ld-library-path-is-bad-and-the-correct-way-to-load-dynamic-libraries">http://stackoverflow.com/questions/25918462/why-ld-library-path-is-bad-and-the-correct-way-to-load-dynamic-libraries</a>, to specify the directory path to the application and build a relative rpath from there. You would then move the library to a known relative path to the binary. In my humble opinion, this approach as</div><div>good as it is, has no analogue in the C# .NET world. I</div><div>was wondering if there is a way to specify -rpath and $ORIGIN in the</div><div>C# .NET domain.</div><div> I would think there might be a way when we start a LINUX service</div><div>to specify the LD_LIBRARY_PATH or any other UNIX environment</div><div>variable without using terminal macros(?sp)? My English is not that good.</div><div> Thank you very much.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 13, 2016 at 8:09 PM, <span dir="ltr"><<a href="mailto:ubuntu-users-request@lists.ubuntu.com" target="_blank">ubuntu-users-request@lists.ubuntu.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send ubuntu-users mailing list submissions to<br>
<a href="mailto:ubuntu-users@lists.ubuntu.com">ubuntu-users@lists.ubuntu.com</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-users" target="_blank" rel="noreferrer">https://lists.ubuntu.com/mailman/listinfo/ubuntu-users</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:ubuntu-users-request@lists.ubuntu.com">ubuntu-users-request@lists.ubuntu.com</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:ubuntu-users-owner@lists.ubuntu.com">ubuntu-users-owner@lists.ubuntu.com</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of ubuntu-users digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Re: How to restart the networking after changing the network<br>
configuration? (Tom H)<br>
2. Re: How to restart the networking after changing the network<br>
configuration? (Tom H)<br>
3. Re: How to restart the networking after changing the network<br>
configuration? (Tom H)<br>
4. How do we do programmatically set LD_LIBRARY_PATH for this<br>
scenario , mono-service ./AudioRecorder.exe where we are running<br>
on Ubuntu Linux 14.06 and AudioRecorder.exe is a C# .NET<br>
executable. (Frank Chang)<br>
5. Re: How do we do programmatically set LD_LIBRARY_PATH for<br>
this scenario , mono-service ./AudioRecorder.exe where we are<br>
running on Ubuntu Linux 14.06 and AudioRecorder.exe is a C# .NET<br>
executable. (Alejandro Visiedo Garc?a)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Fri, 13 May 2016 23:59:42 +0200<br>
From: Tom H <<a href="mailto:tomh0665@gmail.com">tomh0665@gmail.com</a>><br>
To: Ubuntu Users <<a href="mailto:ubuntu-users@lists.ubuntu.com">ubuntu-users@lists.ubuntu.com</a>><br>
Subject: Re: How to restart the networking after changing the network<br>
configuration?<br>
Message-ID:<br>
<CAOdo=<a href="mailto:Sxd0a%2BhDU2Y4czur1tN-Tjcx8wtdn-tN1ypWdFVuM1i1g@mail.gmail.com">Sxd0a+hDU2Y4czur1tN-Tjcx8wtdn-tN1ypWdFVuM1i1g@mail.gmail.com</a>><br>
Content-Type: text/plain; charset=UTF-8<br>
<br>
On Fri, May 13, 2016 at 3:15 PM, Zhengyu Guo <<a href="mailto:zhengyuguobuaa@gmail.com">zhengyuguobuaa@gmail.com</a>> wrote:<br>
><br>
> My question is how to restart the networking after changing the network<br>
> configuration?<br>
><br>
> I setup a bridge in my machine and I need to restart the network to make it<br>
> work. However, If I use the following command it will not work.<br>
><br>
> ~~~<br>
> /etc/network$ sudo service networking restart<br>
> Job for networking.service failed because the control process exited with<br>
> error code. See "systemctl status networking.service" and "journalctl -xe"<br>
> for details.<br>
> ~~~<br>
> But if I reboot the machine, the configuration will take effect without any<br>
> problem.<br>
><br>
> Therefore, I want to know if there are any alternative way that I can use<br>
> for restart the networking without the need for rebooting.<br>
<br>
ifdown <physical_nic><br>
<br>
change "/etc/network/interfaces"<br>
<br>
ifup <bridge><br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Sat, 14 May 2016 00:03:22 +0200<br>
From: Tom H <<a href="mailto:tomh0665@gmail.com">tomh0665@gmail.com</a>><br>
To: Ubuntu Users <<a href="mailto:ubuntu-users@lists.ubuntu.com">ubuntu-users@lists.ubuntu.com</a>><br>
Subject: Re: How to restart the networking after changing the network<br>
configuration?<br>
Message-ID:<br>
<CAOdo=<a href="mailto:SxT_B7ZjFXfX1qZ9VcOr3nH7LG%2Bdwi7NxhDHAt5McgFCA@mail.gmail.com">SxT_B7ZjFXfX1qZ9VcOr3nH7LG+dwi7NxhDHAt5McgFCA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset=UTF-8<br>
<br>
On Fri, May 13, 2016 at 3:51 PM, Stephen P. Molnar<br>
<<a href="mailto:s.molnar@sbcglobal.net">s.molnar@sbcglobal.net</a>>> wrote:<br>
><br>
> as root dhclient eth0<br>
><br>
> ------ Original Message ------<br>
> From: "Zhengyu Guo" <<a href="mailto:zhengyuguobuaa@gmail.com">zhengyuguobuaa@gmail.com</a>>><br>
> To: <a href="mailto:ubuntu-users@lists.ubuntu.com">ubuntu-users@lists.ubuntu.com</a><br>
> Sent: 5/13/2016 9:15:22 AM<br>
> Subject: How to restart the networking after changing the network<br>
> configuration?<br>
>><br>
>> My question is how to restart the networking after changing the network<br>
>> configuration?<br>
>><br>
>> I setup a bridge in my machine and I need to restart the network to make it<br>
>> work. However, If I use the following command it will not work.<br>
>><br>
>> ~~~<br>
>> /etc/network$ sudo service networking restart<br>
>> Job for networking.service failed because the control process exited with<br>
>> error code. See "systemctl status networking.service" and "journalctl -xe"<br>
>> for details.<br>
>> ~~~<br>
>> But if I reboot the machine, the configuration will take effect without any<br>
>> problem.<br>
>><br>
>> Therefore, I want to know if there are any alternative way that I can use<br>
>> for restart the networking without the need for rebooting.<br>
<br>
If you're using dhcp and not using "/etc/network/interfaces", you'd<br>
have to run "dhclient -r <physical_nic>", set up the bridge manually,<br>
"dhclient <bridge>".<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Sat, 14 May 2016 00:12:50 +0200<br>
From: Tom H <<a href="mailto:tomh0665@gmail.com">tomh0665@gmail.com</a>><br>
To: Ubuntu Users <<a href="mailto:ubuntu-users@lists.ubuntu.com">ubuntu-users@lists.ubuntu.com</a>><br>
Subject: Re: How to restart the networking after changing the network<br>
configuration?<br>
Message-ID:<br>
<CAOdo=SxW9ePpgm=<a href="mailto:AuDDqBi0kR9DZnBAMQZ4VnAo3YdRzKdWmQQ@mail.gmail.com">AuDDqBi0kR9DZnBAMQZ4VnAo3YdRzKdWmQQ@mail.gmail.com</a>><br>
Content-Type: text/plain; charset=UTF-8<br>
<br>
On Fri, May 13, 2016 at 5:19 PM, Zhengyu Guo <<a href="mailto:zhengyuguobuaa@gmail.com">zhengyuguobuaa@gmail.com</a>> wrote:<br>
><br>
> auto eth0<br>
> iface eth0 inet manual<br>
><br>
> auto br0<br>
> iface br0 inet static<br>
> address xxx.xxx.xxx.xxx<br>
> network xxx.xxx.xxx.xxx<br>
> netmask xxx.xxx.xxx.xxx<br>
> broadcast xxx.xxx.xxx.xxx<br>
> gateway xxx.xxx.xxx.xxx<br>
> bridge_ports eth0<br>
> bridge_stp off<br>
> bridge_fd 0<br>
> bridge_maxwait 0<br>
<br>
You don't need to define eth0 in "/etc/network/interfaces".<br>
<br>
>From "man bridge-utils-interfaces":<br>
<br>
----><br>
The main extension is the bridge_ports option, with it you describe that<br>
the interface is a bridge and what ports does it have. These ports are<br>
the interfaces that are part of the bridge, and they shouldn't have any<br>
stanzas defining them on the interfaces file.<br>
<----<br>
<br>
Please don't top-post.<br>
<br>
>From <a href="https://community.ubuntu.com/contribute/support/mailinglists/" target="_blank" rel="noreferrer">https://community.ubuntu.com/contribute/support/mailinglists/</a> :<br>
<br>
"Write your email underneath the email which you are replying to."<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Fri, 13 May 2016 16:37:57 -0700<br>
From: Frank Chang <<a href="mailto:frankchang91@gmail.com">frankchang91@gmail.com</a>><br>
To: <a href="mailto:ubuntu-users@lists.ubuntu.com">ubuntu-users@lists.ubuntu.com</a><br>
Subject: How do we do programmatically set LD_LIBRARY_PATH for this<br>
scenario , mono-service ./AudioRecorder.exe where we are running on<br>
Ubuntu Linux 14.06 and AudioRecorder.exe is a C# .NET executable.<br>
Message-ID:<br>
<<a href="mailto:CANuJMRqrTpwb_oarqUJBm9cSL2vugbZVnZPNEmJdHZWDKAPo4A@mail.gmail.com">CANuJMRqrTpwb_oarqUJBm9cSL2vugbZVnZPNEmJdHZWDKAPo4A@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
How do we do programmatically set LD_LIBRARY_PATH for this scenario?<br>
<br>
mono-service ./AudioRecorder.exe<br>
<br>
where we are running on Ubuntu Linux 14.06 and AudioRecorder.exe is a C#<br>
.NET executable. AudioRecorder.exe requires a shared object named<br>
libaudiocontrol.so to perform its duties. This shared object has to be<br>
found in the LD_LIBRARY_PATH location.<br>
<br>
We will not have an Ubuntu Linux terminal to run when running in<br>
mono-service mode. Instead we need to start an Ubuntu Linux service as<br>
shown below:<br>
<br>
Auto-start Checklist for Upstart<br>
<br>
This section is a quick reference to make sure your service is set to<br>
automatically start.<br>
<br>
Configuration Checklist<br>
<br>
Make sure the service has a functional Upstart init script located at<br>
/etc/init/service.conf<br>
The /etc/init/service.conf file should contain a line like start<br>
on runlevel [2345] to enable automatic starting after a reboot<br>
The /etc/init/service.conf file should also contain a line like<br>
respawn to enable the service to respawn after a crash<br>
Make sure there is no override file for the service: /etc/init/service.override<br>
<br>
(There would be one only if you or another admin made one earlier)<br>
<br>
Stop, then start, the service:<br>
<br>
sudo initctl stop service<br>
sudo initctl start service<br>
<br>
Reboot the server.<br>
<br>
sudo reboot<br>
<br>
Here is another way make sure your service is set to automatically start.<br>
<br>
Auto-start Checklist for systemd<br>
<br>
This section is a quick reference to make sure your service is set to<br>
automatically start.<br>
<br>
Configuration Checklist<br>
<br>
Make sure the service has a functional systemd init script located at<br>
/etc/systemd/system/multi-user.target.wants/service.service<br>
Use the systemctl command to enable the service:<br>
<br>
sudo systemctl enable service.service<br>
<br>
This should create a symlink in<br>
/etc/systemd/system/multi-user.target.wants/ that looks like the<br>
following (do NOT create this manually):<br>
<br>
lrwxrwxrwx 1 root root 38 Aug 1 04:43<br>
/etc/systemd/system/multi-user.target.wants/service.service -><br>
/usr/lib/systemd/system/service.service<br>
<br>
This will enable automatic starting after a reboot.<br>
<br>
The /etc/systemd/system/multi-user.target.wants/service.service file<br>
should also contain a line like Restart=always under the [Service]<br>
section of the file to enable the service to respawn after a crash<br>
Reload the systemd daemon, followed by a restart of the service:<br>
<br>
sudo systemctl daemon-reload<br>
sudo systemctl restart service.service<br>
<br>
I read in this URL:<br>
<br>
<a href="http://stackoverflow.com/questions/10963498/mono-shared-library-under-linux-location" target="_blank" rel="noreferrer">http://stackoverflow.com/questions/10963498/mono-shared-library-under-linux-location</a><br>
that you have to: LD_LIBRARY_PATH=. mono yourapp.exe. How might I do that<br>
for a Linux service?<br>
<br>
I also read Why change in LD_LIBRARY_PATH at Runtime dosen't Reflect on the<br>
Executable once the Executable gets loaded<br>
<<a href="http://stackoverflow.com/questions/19337926/why-change-in-ld-library-path-at-runtime-dosent-reflect-on-the-executable-once" target="_blank" rel="noreferrer">http://stackoverflow.com/questions/19337926/why-change-in-ld-library-path-at-runtime-dosent-reflect-on-the-executable-once</a>><br>
.<br>
<br>
Could some expert comment on this URL and suggest a potential solution?<br>
<br>
Any help is greatly appreciated.<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://lists.ubuntu.com/archives/ubuntu-users/attachments/20160513/c6b4215b/attachment-0001.html" target="_blank" rel="noreferrer">https://lists.ubuntu.com/archives/ubuntu-users/attachments/20160513/c6b4215b/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Fri, 13 May 2016 19:09:35 -0500<br>
From: Alejandro Visiedo Garc?a <<a href="mailto:alejandro.visiedo@gmail.com">alejandro.visiedo@gmail.com</a>><br>
To: "Ubuntu user technical support, not for general discussions"<br>
<<a href="mailto:ubuntu-users@lists.ubuntu.com">ubuntu-users@lists.ubuntu.com</a>><br>
Subject: Re: How do we do programmatically set LD_LIBRARY_PATH for<br>
this scenario , mono-service ./AudioRecorder.exe where we are running<br>
on Ubuntu Linux 14.06 and AudioRecorder.exe is a C# .NET executable.<br>
Message-ID: <<a href="mailto:5C655F97-F3A7-41FC-85E8-5DF28EE94EBD@gmail.com">5C655F97-F3A7-41FC-85E8-5DF28EE94EBD@gmail.com</a>><br>
Content-Type: text/plain; charset="us-ascii"<br>
<br>
Change the program to execute for a script! Into the script export LD_LIBRARY_PATH to add the path of the library and then launch the executable file at the end of the script with the params received to the script!<br>
<br>
Regards!<br>
<br>
> On 13 May 2016, at 18:37, Frank Chang <<a href="mailto:frankchang91@gmail.com">frankchang91@gmail.com</a>> wrote:<br>
><br>
> How do we do programmatically set LD_LIBRARY_PATH for this scenario?<br>
><br>
> mono-service ./AudioRecorder.exe<br>
> where we are running on Ubuntu Linux 14.06 and AudioRecorder.exe is a C# .NET executable. AudioRecorder.exe requires a shared object named libaudiocontrol.so to perform its duties. This shared object has to be found in the LD_LIBRARY_PATH location.<br>
><br>
> We will not have an Ubuntu Linux terminal to run when running in mono-service mode. Instead we need to start an Ubuntu Linux service as shown below:<br>
><br>
> Auto-start Checklist for Upstart<br>
><br>
> This section is a quick reference to make sure your service is set to automatically start.<br>
><br>
> Configuration Checklist<br>
><br>
> Make sure the service has a functional Upstart init script located at /etc/init/service.conf<br>
> The /etc/init/service.conf file should contain a line like start on runlevel [2345] to enable automatic starting after a reboot<br>
> The /etc/init/service.conf file should also contain a line like respawn to enable the service to respawn after a crash<br>
> Make sure there is no override file for the service: /etc/init/service.override<br>
> (There would be one only if you or another admin made one earlier)<br>
><br>
> Stop, then start, the service:<br>
><br>
> sudo initctl stop service<br>
> sudo initctl start service<br>
><br>
> Reboot the server.<br>
><br>
> sudo reboot<br>
> Here is another way make sure your service is set to automatically start.<br>
><br>
> Auto-start Checklist for systemd<br>
><br>
> This section is a quick reference to make sure your service is set to automatically start.<br>
><br>
> Configuration Checklist<br>
><br>
> Make sure the service has a functional systemd init script located at /etc/systemd/system/multi-user.target.wants/service.service<br>
> Use the systemctl command to enable the service:<br>
><br>
> sudo systemctl enable service.service<br>
><br>
> This should create a symlink in /etc/systemd/system/multi-user.target.wants/ that looks like the following (do NOT create this manually):<br>
> lrwxrwxrwx 1 root root 38 Aug 1 04:43 /etc/systemd/system/multi-user.target.wants/service.service -> /usr/lib/systemd/system/service.service<br>
><br>
> This will enable automatic starting after a reboot.<br>
><br>
> The /etc/systemd/system/multi-user.target.wants/service.service file should also contain a line like Restart=always under the [Service] section of the file to enable the service to respawn after a crash<br>
> Reload the systemd daemon, followed by a restart of the service:<br>
><br>
> sudo systemctl daemon-reload<br>
> sudo systemctl restart service.service<br>
> I read in this URL:<br>
><br>
> <a href="http://stackoverflow.com/questions/10963498/mono-shared-library-under-linux-location" target="_blank" rel="noreferrer">http://stackoverflow.com/questions/10963498/mono-shared-library-under-linux-location</a> that you have to: LD_LIBRARY_PATH=. mono yourapp.exe. How might I do that for a Linux service?<br>
><br>
> I also read Why change in LD_LIBRARY_PATH at Runtime dosen't Reflect on the Executable once the Executable gets loaded.<br>
><br>
> Could some expert comment on this URL and suggest a potential solution?<br>
><br>
> Any help is greatly appreciated.<br>
><br>
> --<br>
> ubuntu-users mailing list<br>
> <a href="mailto:ubuntu-users@lists.ubuntu.com">ubuntu-users@lists.ubuntu.com</a><br>
> Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-users" target="_blank" rel="noreferrer">https://lists.ubuntu.com/mailman/listinfo/ubuntu-users</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://lists.ubuntu.com/archives/ubuntu-users/attachments/20160513/587b914b/attachment.html" target="_blank" rel="noreferrer">https://lists.ubuntu.com/archives/ubuntu-users/attachments/20160513/587b914b/attachment.html</a>><br>
<br>
------------------------------<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
ubuntu-users mailing list<br>
<a href="mailto:ubuntu-users@lists.ubuntu.com">ubuntu-users@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/ubuntu-users" target="_blank" rel="noreferrer">https://lists.ubuntu.com/mailman/listinfo/ubuntu-users</a><br>
<br>
<br>
End of ubuntu-users Digest, Vol 141, Issue 20<br>
*********************************************<br>
</font></span></blockquote></div><br></div>