LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-27-2012, 04:04 AM   #1
mackes
LQ Newbie
 
Registered: Aug 2012
Posts: 6

Rep: Reputation: Disabled
Running script from a file manager show a different pwd


pcmanfm launches scripts in home/user.
When running this from a terminal in /home/user/subdir it shows subdir; when lauching from pcmanfn in the same dir shows /home/user . Why is that?

#!/bin/bash

CWD=$(pwd)
zenity --info --text="The current directory is $CWD"

Last edited by mackes; 08-27-2012 at 04:06 AM.
 
Old 08-27-2012, 05:46 AM   #2
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
Do you mean PCManFM? I think it launches the file with a default working directory. That which is /home/user. Or perhaps because it calls Bash to run the file, and bash runs in /home/user by default or is ran there.
 
1 members found this post helpful.
Old 08-27-2012, 08:29 PM   #3
mackes
LQ Newbie
 
Registered: Aug 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by konsolebox View Post
Do you mean PCManFM? I think it launches the file with a default working directory. That which is /home/user. Or perhaps because it calls Bash to run the file, and bash runs in /home/user by default or is ran there.
Thanks! I was not aware of that pcmanfm did that.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
script to show if file exists ltodd2 Linux - Newbie 2 12-13-2010 07:51 AM
[SOLVED] How to get pics to show up in file manager? linus72 Arch 4 06-07-2010 10:05 AM
Running Python Script in UBUNTU Session Manager warnetgm Linux - Newbie 2 12-06-2006 03:08 PM
KDE 3.3.0 file manager doesn't show long filenames grayswander Linux - General 2 11-06-2004 06:50 AM
need the script to show via browser if the vpn client is running cccc Programming 2 01-31-2004 06:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration