LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-24-2010, 07:52 AM   #1
daudiam
Member
 
Registered: Mar 2010
Posts: 68

Rep: Reputation: 15
How to achieve the effect of double clicking on the folder, from the command line ?


How can I open a folder in a window from the command line. I don't want to list the contents of the folder by the "ls" command, but want to open the folder through the command line, like it opens when we double click on the folder.

Thanks
 
Old 11-24-2010, 07:56 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
It depends on the file manager you actually use. For example using Nautilus in GNOME, the command is simply
Code:
nautilus name_of_directory
 
Old 11-24-2010, 10:20 AM   #3
daudiam
Member
 
Registered: Mar 2010
Posts: 68

Original Poster
Rep: Reputation: 15
Thanks. Can you give me the command in Fedora. The above works in Ubuntu, but not in Fedora.
 
Old 11-24-2010, 10:30 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,142
Blog Entries: 2

Rep: Reputation: 4846Reputation: 4846Reputation: 4846Reputation: 4846Reputation: 4846Reputation: 4846Reputation: 4846Reputation: 4846Reputation: 4846Reputation: 4846Reputation: 4846
Which filemanager are you using?
 
Old 11-24-2010, 10:33 AM   #5
Slightly Disoriented
Member
 
Registered: Sep 2010
Distribution: Ubuntu 10.10
Posts: 87

Rep: Reputation: 2
Does fedora use Dolphin? If so, then I believe it would be
Code:
dolphin <directory>
Just find out what file manager you use.
 
Old 11-24-2010, 10:37 AM   #6
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
Quote:
Originally Posted by daudiam View Post
Thanks. Can you give me the command in Fedora. The above works in Ubuntu, but not in Fedora.
Please, tell us which Desktop manager (KDE, GNOME, XFCE...) and which file manager (Nautilus, Dolphin, Konqueror...) are you using. Moreover what is the error message? Telling that something doesn't work will not give any clue about the actual problem.
 
Old 11-24-2010, 10:42 AM   #7
Slightly Disoriented
Member
 
Registered: Sep 2010
Distribution: Ubuntu 10.10
Posts: 87

Rep: Reputation: 2
Mmm, I saw that the one in Fedora is called Thunar. I'm not sure, but try
Code:
thunar <director>
 
Old 11-24-2010, 10:46 AM   #8
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
Also, if you wish to remain in the console (command line) try `mc` (Midnight Commander) if you have that installed:
Code:
mc /some/directory
 
Old 11-24-2010, 11:10 AM   #9
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
Quote:
Originally Posted by Slightly Disoriented View Post
Mmm, I saw that the one in Fedora is called Thunar.
Actually it is for Xfce environment (while GNOME in Fedora still uses Nautilus), but until the OP does not answer our questions, we can only guess...
 
Old 11-24-2010, 06:59 PM   #10
Slightly Disoriented
Member
 
Registered: Sep 2010
Distribution: Ubuntu 10.10
Posts: 87

Rep: Reputation: 2
Oh, I've never used a Fedora Machine, just Mint and Ubuntu. I know Fedora had something that looked like GNOME, but I didn't know if it was XFCE, so I figured it was worth a shot...
 
Old 12-12-2010, 05:59 AM   #11
daudiam
Member
 
Registered: Mar 2010
Posts: 68

Original Poster
Rep: Reputation: 15
Thanks a lot everyone. Really really sorry for the delay.

Dolphin was my file manager. I typed
dolphin <directory>

and it worked. Thanks again.
 
Old 12-12-2010, 07:08 AM   #12
cepheus11
Member
 
Registered: Nov 2010
Location: Germany
Distribution: Gentoo
Posts: 281

Rep: Reputation: 88
Desktop independent version:

Code:
xdg-open <folder or document>
xdg-open detects the running environment (KDE, GNOME or XFCE) and calls the appropriate *-open program, which in turn evaluates MIME type settings for that desktop environment and runs the program which is associated with the document's type. Directories should be associated with the standard file manager by default.

Which package provides /usr/bin/xdg-open depends on your distro, in gentoo it is "x11-misc/xdg-utils".
 
1 members found this post helpful.
Old 12-12-2010, 08:55 AM   #13
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
I didn't know about the xdg-utils package. I've tried your command and it works, except for some minor (?) errors as:
Code:
$ xdg-open /path/to/directory
<unknown program name>(21133)/ ClientApp::doIt: Creating ClientApp
/usr/bin/xdg-open: line 322: test: : integer expression expected
/usr/bin/xdg-open: line 323: test: : integer expression expected
/usr/bin/xdg-open: line 324: test: : integer expression expected
these are mainly due to the fact that it refers to KDE version 3, whereas some commands in KDE 4 has been renamed (for example kde4-config instead of kde-config). Anyway it correctly opens a usable Dolphin window.
 
  


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
How to achieve this effect of mouse? MacApple Linux - Newbie 6 01-08-2010 07:09 AM
Which command line command for updating a folder craig_panama Linux - Software 6 06-28-2009 08:11 PM
command line execution vs clicking on the icon icecubeflower Linux - Newbie 2 04-19-2009 04:39 PM
remove folder from command line demmylls Linux - General 3 02-15-2004 09:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:25 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration