Jump to content

How to Run an Application only for one User


bbenn
 Share

Recommended Posts

Sure. Place the executable in in User1's /home/User1/bin directory. (If it is not there, you can create the directory with this command:

 

mkdir /home/User1/bin

 

Then in that user's /home/User1/.bash_profile add that directory to the PATH variable or if the 'export PATH' line is not there, add it like this:

 

export PATH=$PATH:/home/User1/bin

 

I am not at my Linux box right now, but I think .bash_profile is where you add it.

Link to comment
Share on other sites

I am now at my Linux box and here is my ~/.bash_profile:

 

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs
JAVA_HOME=/usr/java/jre1.5.0_04
PATH=$PATH:$HOME/bin
PATH=$JAVA_HOME/bin:$PATH

export PATH
export JAVA_HOME
unset USERNAME

Link to comment
Share on other sites

Thanks guys, it did worked. If I can ask another Q

 

How do I get idesk to start after xwindows started (startx) ?

 

I put "idesk " in xinitrc but it made the system went crazy

 

i added "idesk" to the end od local.rc and it didn't do anything

 

where is the best palce for this?

 

Thanks

 

Ben

Link to comment
Share on other sites

There's several ways to do it but I would try editing /usr/X11R6/bin/starticewm first to something like this:

 

#!/bin/bash
# JMD: add icewm-desktop so that icewm can be integrated with rox, dfm,
# or another program that adds icons to the desktop
<insert path to idesk> &
if [ -e /usr/X11R6/bin/icewm-desktop ];then
 /usr/X11R6/bin/icewm-desktop
else
 /usr/X11R6/bin/icewm-session
fi

 

Make sure to put the "&" after the path to idesk in the above. This is a direct edit of the starticewm script on LE2005. As noted in the comments above, you can also create your own icewm startup script and call it icewm-desktop and place it in /usr/X11R6/bin/. That would probably look something like this:

 

#!/bin/bash
<path to idesk> &
<path to any other program you want to autostart> &
/usr/X11R6/bin/icewm

 

I'm not sure of the distinction between "icewm" and "icewm-session". You might want to try both in your icewm-desktop script.

Link to comment
Share on other sites

Thanks guys below bit worked. Most of my problems sloved.

 

#!/bin/bash

# JMD: add icewm-desktop so that icewm can be integrated with rox, dfm,

# or another program that adds icons to the desktop

idesk &

if [ -e /usr/X11R6/bin/icewm-desktop ];then

/usr/X11R6/bin/icewm-desktop

else

/usr/X11R6/bin/icewm-session

fi

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...