LinuxQuestions.org
Help answer threads with 0 replies.
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 05-15-2021, 09:14 PM   #1
Johng
Member
 
Registered: Feb 2002
Location: NZ
Distribution: Kubuntu, Mint
Posts: 386

Rep: Reputation: 30
Zenity window lists unwanted Recent files


I have written a script to select a script file

My script looks like this:
Code:
#!/bin/bash

cd INTERIM/Scripts

myvar2=$(zenity --file-selection)

FILENAMEX="$myvar2"

$FILENAMEX
When I run the script using Linux Mint, it opens a window listing files in /INTERIM/Scripts

When I run the script using Suse 15.2 KDE Plasma it opens a window headed Recent Files and lists a file in different folder.

I have cleared Recent Documents using System Settings/Workspace Behaviour/Acitities/Privacy, KDE no longer lists recent documents, but the window opened by zenity does!

How do I get the Suse version to behave like Mint??
 
Old 05-15-2021, 09:57 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 24,145

Rep: Reputation: 5347Reputation: 5347Reputation: 5347Reputation: 5347Reputation: 5347Reputation: 5347Reputation: 5347Reputation: 5347Reputation: 5347Reputation: 5347Reputation: 5347
To specify the directory when the dialog is first shown use the --filename option i.e

Code:
myvar2=$(zenity --file-selection --filename "/Path/to/INTERIM/Scripts/")
 
Old 05-16-2021, 12:03 AM   #3
Johng
Member
 
Registered: Feb 2002
Location: NZ
Distribution: Kubuntu, Mint
Posts: 386

Original Poster
Rep: Reputation: 30
Thank you michaelk. That was a way around the problem.

It is interesting that Mint followed a symlink to the files on another drive, which Suse would/does not.

For example, Mint needs only: myvar2=$(zenity --file-selection)

Suse needs: myvar2=$(zenity --file-selection --filename /home/sdc4/INTERIM/Scripts/)
 
Old 05-16-2021, 12:50 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038Reputation: 6038
Quote:
Originally Posted by Johng View Post
It is interesting that Mint followed a symlink to the files on another drive, which Suse would/does not.

For example, Mint needs only: myvar2=$(zenity --file-selection)

Suse needs: myvar2=$(zenity --file-selection --filename /home/sdc4/INTERIM/Scripts/)
That seems to tell a slightly different stroy than post #1 (which wasn't very clear IMO).

In any case, do you also see this difference in your file manager, or only with zenity?
If the latter then it's a difference between zenity versions/builds, not distros.
 
Old 05-16-2021, 12:57 AM   #5
Johng
Member
 
Registered: Feb 2002
Location: NZ
Distribution: Kubuntu, Mint
Posts: 386

Original Poster
Rep: Reputation: 30
It's only been obvious using zenity. File managers follow symlinks.
 
  


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
FireStarter lists IP blocked that etherape lists as connections??? theKbStockpiler Linux - Security 1 09-26-2017 09:24 PM
how to get zenity code if user close zenity window pedropt Programming 4 03-03-2017 12:13 PM
LXer: Python - Sorting Lists inside of Lists LXer Syndicated Linux News 0 06-06-2013 01:00 PM
How are opt-in e-mail lists distinguished from spam lists? Travis86 Programming 2 01-29-2012 08:55 PM
LXer: Unique Sorting Of Lists And Lists Of Lists With Perl For Linux Or Unix LXer Syndicated Linux News 0 09-05-2008 01:50 PM

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

All times are GMT -5. The time now is 05:19 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