Autostart Uwsgi As A User 'webmaster'

Hi I'm using Ubuntu Server;

I added 'export PERL5LIB=/www-data/lib' on ~/.profile for uwsgi to use this environment variable , is that right?

And I need to autostart 'uwsgi uwsgi.ini' as a user 'webmaster' every time I boot.
How can I get this job done?


Similar Content



Delaying The Autostart Of Rygel At Boot Not Working

debian 3.2.0-4-amd64
GNOME Shell 3.4.2

put X-GNOME-Autostart-Delay=60 in the startup file but it stills runs at boot. the delay of 60 is not working. this delay worked on fedora, but not on debian. any help is appreciated

Autoload Python Script At Cinnamon Login

Hi
I am using Cinnamon desktop on the top of arch linux. I wanted to load a python script at desktop login which informs me about battery stats, so I created a batterymonitor.desktop entry under ~/.config/autostart. The contents of batterymonitor.desktop a
Code:
[Desktop Entry]
Type=Application
Exec=python /home/<myusername>/scripts/battery_monitor.py
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_US]=BatteryMonitor
Name=BatteryMonitor
Comment[en_US]=
Comment=
X-GNOME-Autostart-Delay=0

But the problem is that the script is not loading at cinnamon login. I have also confirmed that the script is executable.
Can you help to load this script at cinnamon login?
Regards

Integrate Active Directory With OpenLDAP

Hi,

In first place i would like to give you a brief about my current setup and my requirement.
I have 80% of the machines with CentOS 6.5 installed rest 20% windows 7. I have OpenLDAP v2.4 for user authentication.
In linux environment all linux machines are configured in such a way that whenever a user logs on to system with the help of OpenLDAP credentials he gets a default desktop rather Mandatory Profile is implemented in this setup. Now my goal is to enable OpenLDAP users logon to windows machines and get the same Mandatory profile setup done here. So far SambaPDC helped me to authenticate LDAP accounts on Windows clients machines but the Manadatory profile thing isn't working well at all due to posix acls issue. Now i am working with Windows Server 2012 r2 server so as to integrate with OpenLDAP for getting this Mandatory profile thing done. Is there any way i can sync all OpenLDAP accounts to Active directory or rather make my windows server a member server for OpenLDAP domain.

Please help me on this. Thanks in advance!!

Sed: Transforming 'ls-laR' Output Into A List With Absolute Paths

Hello, this is my first post
First i would like to thank you all for answering other people questions because I've been able to learn from the forum a lot.

I need your help with something.
I have standard output from 'ls -laR /etc' command which looks like this:
Code:
/etc/X11/xorg.conf.d:
total 4
drwxr-xr-x. 2 root root  29 Apr  1 00:46 .
drwxr-xr-x. 5 root root  54 Apr  1 00:43 ..
-rw-r--r--. 1 root root 232 Apr  1 00:46 00-keyboard.conf

/etc/xdg:
total 12
drwxr-xr-x.  4 root root   36 Apr  1 00:43 .
drwxr-xr-x. 87 root root 8192 Apr 12 13:53 ..
drwxr-xr-x.  2 root root    6 Jun 10  2014 autostart
drwxr-xr-x.  2 root root   17 Apr  7 01:25 systemd

by using sed command:
Code:
sed -e '/./!d' -e '/^total/d' -e '/\.$/d' -e 's/:$/\//' list.txt

I have transformed it to the following form:

Code:
/etc/X11/xorg.conf.d/
-rw-r--r--. 1 root root 232 Apr  1 00:46 00-keyboard.conf
/etc/xdg/
drwxr-xr-x.  2 root root    6 Jun 10  2014 autostart
drwxr-xr-x.  2 root root   17 Apr  7 01:25 systemd

and now I would like to achieve absolute paths at the end of each row

Code:
-rw-r--r--.  1 root root  232 Apr  1 00:46 /etc/X11/xorg.conf.d/00-keyboard.conf
drwxr-xr-x.  2 root root    6 Jun 10  2014 /etc/xdg/autostart
drwxr-xr-x.  2 root root   17 Apr  7 01:25 /etc/xdg/systemd


How do I join(merge) filenames with corresponding absolute path to their parent directory?



I know how to extract filenames using awk and get this:
Code:
00-keyboard.conf

autostart
systemd

but I don't know what to do next. Should I use some hitech sed option or go for loop or try with arrays? Help. Heeeelp

Bash User Input With Static Value Validation

So I created this big script and want to ask for username and set a variable, however if the username exist in the username variable then continue with script otherwise ask the user to enter his name.

Flow:
-- start script "Enter User Name"
-- ask user to input username
-- if username is blank or different value then put that username in $USERNAME variable
-- then continue with the rest of the script

-- next time this user runs the script it will have his name loaded so he just presses enter to continue with the script.

-- If it is NOT the same user then, new user can erase existing input and enter a new name.

Hope it makes sense...

Thanks in advance for the help.

Securing /etc/profile And /etc/bashrc

Changing umask value for files and directories take effect after reload:
/etc/profile
/etc/bashrc
default permission for all users:
-rw-r--r--
above permission is edited to:
-rw-rw-r--
If a specific user in group having only read permission to a file/directory is created before reload,and Linux server reloads, that user gets rw permission to that file/directory. what is the alternative of securing:
/etc/profile
/etc/bashrc
apart from giving the two files access to root user only, and locking out all other users?

/bin/sh: 1: Cc: Not Found

Hi,
I am crosscompiling u-boot for the beaglebone black and I have a problem that I don't understand.

I have installed correctly the linaro cross-compile tools and export the environment variable CC as:
export CC=/path_to_linaro_arm_cross_compiler/bin/arm-linux-gnueabihf-

And if I type in the terminal:
${CC}gcc --version

I see the linaro's compiler version, so all seems to be ok.

But, when I try to create the config file for the BBB with the command:
make ARCH=arm CROSS_COMPILE=${CC} am335x_boneblack_defconfig

It complains with the message: "/bin/sh: 1: cc: not found"

Am I missing something?

Execute Script On Mysql Exit

Hello,

In debian I created a new user "myUser".

In /home/myUser/.profile

I added "mysql -u user -password"

So automatically after login to linux terminal the user is logged in mysql command line.

What I need to do is to exit terminal after user exit mysql, so he want have access to comand line.

What Exactly Is PATH

books say that PATH variable contains the locations where the shell searches the commands to execute them.

I created a shell script and saved it in /home/user/Downloads directory and then i ran this script from the /home/user/Downloads directory. It did not execute.

however when i did set the path
export PATH=$PATH:/bin/sh within /home/user/Downloads directory, the shell script executed. Does it not mean that PATH variable is holding the locations of the shell program rather than the commands that are to be executed?

everytime i have to give the location of the shell i.e /bin/sh in the PATH variable no matter from where i am executing my script

.profile And Bash.rc

hi guys

i was taught that /etc/profile was global for environmental variables and settings...and ~/.profile was specific to the user...

and that bash.rc and ~/.bash.rc was for aliases and functions...i was trying to setup a permanent alias in my profile to a common ssh command and read that it should be going into .profile??? is it really not strict or just a rule of thumb?