As part of a script read directory but as a GUI Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election Results Why I closed the “Why is Kali so hard” questionBash script doesn't read inputGUI input for shell scriptScript needs to read echoed linebackground gui process in shell scriptIs there a GUI debugger for csh script?Read each directory and perform actions in Bash scriptSyntax error for a script requiring 3 specific read variables?Replace part of filename by directory nameExecuting a script inside an unknown directoryRestart a script if it's failed part the way through

Is there any word for a place full of confusion?

Is it fair for a professor to grade us on the possession of past papers?

Is CEO the "profession" with the most psychopaths?

Chebyshev inequality in terms of RMS

How come Sam didn't become Lord of Horn Hill?

What is the topology associated with the algebras for the ultrafilter monad?

Did Deadpool rescue all of the X-Force?

SF book about people trapped in a series of worlds they imagine

Illegal assignment from sObject to Id

ArcGIS Pro Python arcpy.CreatePersonalGDB_management

Take 2! Is this homebrew Lady of Pain warlock patron balanced?

How can I reduce the gap between left and right of cdot with a macro?

Why aren't air breathing engines used as small first stages?

Significance of Cersei's obsession with elephants?

Do wooden building fires get hotter than 600°C?

Has negative voting ever been officially implemented in elections, or seriously proposed, or even studied?

What initially awakened the Balrog?

Central Vacuuming: Is it worth it, and how does it compare to normal vacuuming?

The code below, is it ill-formed NDR or is it well formed?

Should I follow up with an employee I believe overracted to a mistake I made?

Why should I vote and accept answers?

How often does castling occur in grandmaster games?

Find 108 by using 3,4,6

Can anything be seen from the center of the Boötes void? How dark would it be?



As part of a script read directory but as a GUI



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 00:00UTC (8:00pm US/Eastern)
2019 Community Moderator Election Results
Why I closed the “Why is Kali so hard” questionBash script doesn't read inputGUI input for shell scriptScript needs to read echoed linebackground gui process in shell scriptIs there a GUI debugger for csh script?Read each directory and perform actions in Bash scriptSyntax error for a script requiring 3 specific read variables?Replace part of filename by directory nameExecuting a script inside an unknown directoryRestart a script if it's failed part the way through



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I'd like to enhance my script :



#!bin/bash
echo "where would you like to install? (type directory)"
read directory


this is nice but not really robust, it doesn't really account for human error the way "browse" buttons in most UIs do because then the user has to click on actually existing folders and also he won't use anti slash instead of slash ect, ect, ect...



is there a way for me to, for example open up a nautilus windows in "find folder mode" and as soon as you select one it returns (closes) with the folder path (return value/pipe)?



does that exist? I feel like something of that nature is called by web browsers and ect.



EDIT : I just found this : https://askubuntu.com/questions/488350/how-do-i-prompt-users-with-a-gui-dialog-box-to-choose-file-directory-path-via-t



It's weird to me that you should have to install a whole other file browser. how do the other apps manage their magic?










share|improve this question



















  • 1





    Applications use the filechooser dialog provided by whatever toolkit they are built with (Gtk+, Qt etc.). zenity provides a shell API for accessing Gtk+ dialogs.

    – steeldriver
    Apr 14 at 14:11











  • yeah. I get that but why doesn't it have my gnome ubuntu theme? when I use browse from firefox it opens a window that's exactly like nautilus but in "find folder" or "fild file" mode.

    – tatsu
    Apr 14 at 14:22











  • Other apps do it via using the GTK+ or Qt or whatever toolkit for common controls, etc. so they all look the same. call this one more vote for using zenity

    – ivanivan
    Apr 14 at 15:21











  • @steeldriver wierd. when I ran the script in a virtual machine the theme was respected. I don't know why on my main machine it doesn't. Ok i'll be using zenity

    – tatsu
    Apr 14 at 15:35


















0















I'd like to enhance my script :



#!bin/bash
echo "where would you like to install? (type directory)"
read directory


this is nice but not really robust, it doesn't really account for human error the way "browse" buttons in most UIs do because then the user has to click on actually existing folders and also he won't use anti slash instead of slash ect, ect, ect...



is there a way for me to, for example open up a nautilus windows in "find folder mode" and as soon as you select one it returns (closes) with the folder path (return value/pipe)?



does that exist? I feel like something of that nature is called by web browsers and ect.



EDIT : I just found this : https://askubuntu.com/questions/488350/how-do-i-prompt-users-with-a-gui-dialog-box-to-choose-file-directory-path-via-t



It's weird to me that you should have to install a whole other file browser. how do the other apps manage their magic?










share|improve this question



















  • 1





    Applications use the filechooser dialog provided by whatever toolkit they are built with (Gtk+, Qt etc.). zenity provides a shell API for accessing Gtk+ dialogs.

    – steeldriver
    Apr 14 at 14:11











  • yeah. I get that but why doesn't it have my gnome ubuntu theme? when I use browse from firefox it opens a window that's exactly like nautilus but in "find folder" or "fild file" mode.

    – tatsu
    Apr 14 at 14:22











  • Other apps do it via using the GTK+ or Qt or whatever toolkit for common controls, etc. so they all look the same. call this one more vote for using zenity

    – ivanivan
    Apr 14 at 15:21











  • @steeldriver wierd. when I ran the script in a virtual machine the theme was respected. I don't know why on my main machine it doesn't. Ok i'll be using zenity

    – tatsu
    Apr 14 at 15:35














0












0








0








I'd like to enhance my script :



#!bin/bash
echo "where would you like to install? (type directory)"
read directory


this is nice but not really robust, it doesn't really account for human error the way "browse" buttons in most UIs do because then the user has to click on actually existing folders and also he won't use anti slash instead of slash ect, ect, ect...



is there a way for me to, for example open up a nautilus windows in "find folder mode" and as soon as you select one it returns (closes) with the folder path (return value/pipe)?



does that exist? I feel like something of that nature is called by web browsers and ect.



EDIT : I just found this : https://askubuntu.com/questions/488350/how-do-i-prompt-users-with-a-gui-dialog-box-to-choose-file-directory-path-via-t



It's weird to me that you should have to install a whole other file browser. how do the other apps manage their magic?










share|improve this question
















I'd like to enhance my script :



#!bin/bash
echo "where would you like to install? (type directory)"
read directory


this is nice but not really robust, it doesn't really account for human error the way "browse" buttons in most UIs do because then the user has to click on actually existing folders and also he won't use anti slash instead of slash ect, ect, ect...



is there a way for me to, for example open up a nautilus windows in "find folder mode" and as soon as you select one it returns (closes) with the folder path (return value/pipe)?



does that exist? I feel like something of that nature is called by web browsers and ect.



EDIT : I just found this : https://askubuntu.com/questions/488350/how-do-i-prompt-users-with-a-gui-dialog-box-to-choose-file-directory-path-via-t



It's weird to me that you should have to install a whole other file browser. how do the other apps manage their magic?







shell-script shell file-browser






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 14 at 12:55







tatsu

















asked Apr 14 at 12:44









tatsutatsu

1487




1487







  • 1





    Applications use the filechooser dialog provided by whatever toolkit they are built with (Gtk+, Qt etc.). zenity provides a shell API for accessing Gtk+ dialogs.

    – steeldriver
    Apr 14 at 14:11











  • yeah. I get that but why doesn't it have my gnome ubuntu theme? when I use browse from firefox it opens a window that's exactly like nautilus but in "find folder" or "fild file" mode.

    – tatsu
    Apr 14 at 14:22











  • Other apps do it via using the GTK+ or Qt or whatever toolkit for common controls, etc. so they all look the same. call this one more vote for using zenity

    – ivanivan
    Apr 14 at 15:21











  • @steeldriver wierd. when I ran the script in a virtual machine the theme was respected. I don't know why on my main machine it doesn't. Ok i'll be using zenity

    – tatsu
    Apr 14 at 15:35













  • 1





    Applications use the filechooser dialog provided by whatever toolkit they are built with (Gtk+, Qt etc.). zenity provides a shell API for accessing Gtk+ dialogs.

    – steeldriver
    Apr 14 at 14:11











  • yeah. I get that but why doesn't it have my gnome ubuntu theme? when I use browse from firefox it opens a window that's exactly like nautilus but in "find folder" or "fild file" mode.

    – tatsu
    Apr 14 at 14:22











  • Other apps do it via using the GTK+ or Qt or whatever toolkit for common controls, etc. so they all look the same. call this one more vote for using zenity

    – ivanivan
    Apr 14 at 15:21











  • @steeldriver wierd. when I ran the script in a virtual machine the theme was respected. I don't know why on my main machine it doesn't. Ok i'll be using zenity

    – tatsu
    Apr 14 at 15:35








1




1





Applications use the filechooser dialog provided by whatever toolkit they are built with (Gtk+, Qt etc.). zenity provides a shell API for accessing Gtk+ dialogs.

– steeldriver
Apr 14 at 14:11





Applications use the filechooser dialog provided by whatever toolkit they are built with (Gtk+, Qt etc.). zenity provides a shell API for accessing Gtk+ dialogs.

– steeldriver
Apr 14 at 14:11













yeah. I get that but why doesn't it have my gnome ubuntu theme? when I use browse from firefox it opens a window that's exactly like nautilus but in "find folder" or "fild file" mode.

– tatsu
Apr 14 at 14:22





yeah. I get that but why doesn't it have my gnome ubuntu theme? when I use browse from firefox it opens a window that's exactly like nautilus but in "find folder" or "fild file" mode.

– tatsu
Apr 14 at 14:22













Other apps do it via using the GTK+ or Qt or whatever toolkit for common controls, etc. so they all look the same. call this one more vote for using zenity

– ivanivan
Apr 14 at 15:21





Other apps do it via using the GTK+ or Qt or whatever toolkit for common controls, etc. so they all look the same. call this one more vote for using zenity

– ivanivan
Apr 14 at 15:21













@steeldriver wierd. when I ran the script in a virtual machine the theme was respected. I don't know why on my main machine it doesn't. Ok i'll be using zenity

– tatsu
Apr 14 at 15:35






@steeldriver wierd. when I ran the script in a virtual machine the theme was respected. I don't know why on my main machine it doesn't. Ok i'll be using zenity

– tatsu
Apr 14 at 15:35











0






active

oldest

votes












Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f512402%2fas-part-of-a-script-read-directory-but-as-a-gui%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f512402%2fas-part-of-a-script-read-directory-but-as-a-gui%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

Cannot Extend partition with GParted The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsCan't increase partition size with GParted?GParted doesn't recognize the unallocated space after my current partitionWhat is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?I can't figure out how to extend my Arch home partition into free spaceGparted Linux Mint 18.1 issueTrying to extend but swap partition is showing as Unknown in Gparted, shows proper from fdiskRearrange partitions in gparted to extend a partitionUnable to extend partition even though unallocated space is next to it using GPartedAllocate free space to root partitiongparted: how to merge unallocated space with a partition

Marilyn Monroe Ny fiainany manokana | Jereo koa | Meny fitetezanafanitarana azy.