Can't link files in Xmind

Stuff that has yet to be sorted into a category.
Message
Author
User avatar
Rattlehead
Posts: 368
Joined: Thu 11 Sep 2008, 11:40

Can't link files in Xmind

#1 Post by Rattlehead »

I switched a few months ago from mindmanager (which worked rather clunky in my laptop) to Xmind, which is a great program, easy to use and stable. I hadn't had any problem until the other day, when I tried to use the 'link' feature (ctrl+h) to link a file of related info.

When I do that, the white sheet icon appears, the path shown correct, but when I press it, or try to open it via modify -> open file, nothing happens. There is no error message either, apparently there is no change.

I have tried both absolute and relative links. The same problem happens with urls. No response. I have also tried to 'disguise' the file entering it as a url with the format file:///(path).

This absence of response happens just the same with the 'attach' feature (less useful because it creates a working duplicate of the file).

Any other Xmind user here who has faced this problem before? Is there a way to solve it? It's a shame that such a powerful program gets 'impaired' by something like this :(

Data:
Puppy Linux 4.3.1 Frugal
Xmind version 3.2.1
Java version: 1.6.0_17

Some things I've tried already:

-Invoking Xmind from console. No errors (or any other message) are produced.
-Using JWM as a window manager (I normally use ratpoison, which sometimes gives problems with java): no change in behavior
-Typing

Code: Select all

export GDK_NATIVE_WINDOWS=true
before starting in console, as explained in the Xmind forum (http://groups.google.com/group/xmind/br ... 9b34400bb9). No result.

Any ideas?

User avatar
abushcrafter
Posts: 1418
Joined: Fri 30 Oct 2009, 16:57
Location: England
Contact:

#2 Post by abushcrafter »

xdgopen?
[url=http://www.adobe.com/flashplatform/]adobe flash is rubbish![/url]
My Quote:"Humans are stupid, though some are clever but stupid." http://www.dependent.de/media/audio/mp3/System_Syn_Heres_to_You.zip http://www.systemsyn.com/

User avatar
Rattlehead
Posts: 368
Joined: Thu 11 Sep 2008, 11:40

#3 Post by Rattlehead »

Hey Abushcrafter, thanks for your suggestion. In the worst of cases, I could write a demon that opens right before Xmind, detects when I press a certain key combination, and then grabs the required path via Xdotool and opens the required file by executing this xdg-open.

My geek side would love to do that, but I think an option like this would hardly bring Linux to the masses, and besides, my programming skills are awful (though I love it).

So we have a first winner, but maybe someone else here could think of something simpler? C'mon guys, I can't believe none of you do mind maps...

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#4 Post by seaside »

Rattlehead ,

I remember trying out Xmind (and liking it very much :) ) a while back, and running into the same problem.

As I recall, I tried making a special "xdg-open" script to capture any calls, but it seems to use some other method and didn't work.

I guess it works in Ubuntu, so this is a puzzle.

Cheers,
s

User avatar
Rattlehead
Posts: 368
Joined: Thu 11 Sep 2008, 11:40

#5 Post by Rattlehead »

Hey Seaside, thank you for the info.

My idea was emulating a ctrl+h (which shows the path to the file), then a ctrl+c (to copy it), and then passing the argument somehow to xdg-open. Maybe a bit twisted, although I might give it a try some day (I've done worse things :roll: ).

Anyway, most of what I needed was lists management (txt files), which in the meantime I've discovered I can handle with vim and its gf (go-to-file) keypress option, so I'll stick with that by the moment, even if it's not that 'glamorous' :) .

der-schutzhund
Posts: 1045
Joined: Mon 26 Nov 2007, 22:07
Location: Blomberg / Germany

#6 Post by der-schutzhund »

Hello,

i also work with XMind and I think it's a great program.
I came across the same problem as you
Links to websites are running when you installed seamonkey.
But txt, jpg and pdf i can not start / open.
Have you now have a solution?
Can you tell me how you did it exactly?
I have very little idea about programming!

regards

Wolfgang

Rattlehead wrote:Hey Seaside, thank you for the info.

My idea was emulating a ctrl+h (which shows the path to the file), then a ctrl+c (to copy it), and then passing the argument somehow to xdg-open. Maybe a bit twisted, although I might give it a try some day (I've done worse things :roll: ).

Anyway, most of what I needed was lists management (txt files), which in the meantime I've discovered I can handle with vim and its gf (go-to-file) keypress option, so I'll stick with that by the moment, even if it's not that 'glamorous' :) .

User avatar
Rattlehead
Posts: 368
Joined: Thu 11 Sep 2008, 11:40

#7 Post by Rattlehead »

Hi Wolfgang, I feel a bit embarrassed of explaining what I did because my solutions work for me but would not precise win a prize for neat programming (basically I learn what I need on the go, but such method always has its risks).

The basis, which maybe is an issue already for you, is that my window manager of choice is Ratpoison, called like that because it is contrary to mouse, and works fully with keyboard. It is fully configurable, so I assigned a key shortcut ( "caps+m" to be precise) to opening the selected file in Xmind.

What pressing caps+m does is 'robotizing' the series of keypress required to open a file. It does it using Xdotool (a little program to simulate keypress, mouse clics, etc) to copy the path to the desired file from within Xmind (simulating a ctrl+h and then a ctrl+c, I think). Having grabbed that path, it passes it to Rox, which, I discovered, detects by itself which program has to open according to the file extension.

It has some issues, 1/10 times it does not work well and opens a blank file or something weird :roll: , but it's good enough for me.

Lousy as it is, if you'd like to try this solution anyway, I could post here my scripts. You'd have to install xdotool too (the pet is somewhere in this forum), and use a configurable window manager so you can assign a key press to open the Xmind files (if you are using the in-built wm in Puppy, the chances are you are using JWM, which allows the configuration of F1-F12 keys, I think).

It's not the best solution but that's as far as I got. Maybe this information lights some lightbulb out there in the collective intelligence...

der-schutzhund
Posts: 1045
Joined: Mon 26 Nov 2007, 22:07
Location: Blomberg / Germany

#8 Post by der-schutzhund »

Hi Rattlehead,

Thanks for the info!. The idea of automating inputs and thus compensate for certain failures of programs is simple and brilliant!
I once wrote a contribution to this soon in our German area. I'll try xdotool in 431-de (ROX and Thunar) to get to work.
Can you give me your script?

regards

Wolfgang
Rattlehead wrote:Hi Wolfgang, I feel a bit embarrassed of explaining what I did because my solutions work for me but would not precise win a prize for neat programming (basically I learn what I need on the go, but such method always has its risks).

The basis, which maybe is an issue already for you, is that my window manager of choice is Ratpoison, called like that because it is contrary to mouse, and works fully with keyboard. It is fully configurable, so I assigned a key shortcut ( "caps+m" to be precise) to opening the selected file in Xmind.

What pressing caps+m does is 'robotizing' the series of keypress required to open a file. It does it using Xdotool (a little program to simulate keypress, mouse clics, etc) to copy the path to the desired file from within Xmind (simulating a ctrl+h and then a ctrl+c, I think). Having grabbed that path, it passes it to Rox, which, I discovered, detects by itself which program has to open according to the file extension.

It has some issues, 1/10 times it does not work well and opens a blank file or something weird :roll: , but it's good enough for me.

Lousy as it is, if you'd like to try this solution anyway, I could post here my scripts. You'd have to install xdotool too (the pet is somewhere in this forum), and use a configurable window manager so you can assign a key press to open the Xmind files (if you are using the in-built wm in Puppy, the chances are you are using JWM, which allows the configuration of F1-F12 keys, I think).

It's not the best solution but that's as far as I got. Maybe this information lights some lightbulb out there in the collective intelligence...

User avatar
Rattlehead
Posts: 368
Joined: Thu 11 Sep 2008, 11:40

#9 Post by Rattlehead »

Hi Wolfgang,

glad you liked my idea! I feel happy to contribute my little script in this forum, which has always provided me so much value. Here it is:

Code: Select all

#!/bin/bash
#
#Grabxlink
#Requires Xmind already open and active, and the required 'bubble' selected
#

#Keypress simulation

#Open the required Xmind dialog
sleep .5
xdotool key ctrl+h

#Select the whole path
sleep .2
xdotool key ctrl+a

#Copy it
sleep .2
xdotool key ctrl+c
sleep .2

#Close the dialog
xdotool key Escape

#Get the clipboard content and put it in the 'listed' variable
listed=`xclip -o -selection clipboard`

#Grab the file extension
trm=`echo "$listed"|awk -F . '{print $NF}'`


if [ "$listed" == "$trm" ] || [ "$trm" == "otl" ]
then
	# no extension, or vim outliner extension: open the file with vim
#If you don't use vim, change it for your text processor of choice, and eliminate the second term in the if. If you are using the default Puppy 4.3.1 console, use rxvt instead of mrxvt. If your text processor is graphical, like geany or tea, you don't need console so call them directly (geany "$listed" & or whatever)

	mrxvt -e vim "$listed" &



else
	# other extensions: send the file to rox so it opens the corresponding program

	rox "$listed" &
fi
It occurs to me that maybe you'll need to play a bit with the sleep values, depending on your computer's speed. Mine is 2Ghz. I adjusted them until I found the limit when it still read the keys but lost the least time possible.

Now the second part: how to call this script? I use Puppy 4.3.1. too, and the default window manager is JWM. It's been ages since I last used it and I don't remember the exact process to configure keys, but I know you had to add an entry with the key in the configuration file (/root/.jwmrc or /etc/xdg/templates/_root_.jwmrc, sorry I don't remember which one of them), and then refresh the menus. Here is the link to the official jwm information: http://joewing.net/programs/jwm/config.shtml#keys

You can also search 'jwm customization' or something like that in Wellminded http://wellminded.com/puppy/pupsearch.html and see what comes out. I've also read about a program called 'jwm tools', which maybe can customize the keys automatically for you.

I hope it helps. Let me know how it goes, and anything else you need. Good luck!

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#10 Post by seaside »

Rattlehead,

Isn't it a shame that we're reduced to such workarounds-but then again that's probably the reason why xdotool exists and is so handy. :)

It might be a slight quicker changing this line-

Code: Select all

trm=`echo "$listed"|awk -F . '{print $NF}'`
to

Code: Select all

trm=`echo "${listed#*.}"`
JWM hotkeys can be set by going to-
menu >desktop >JWM Configuration Manager >Keyboard Shortcuts

Thanks for posting your script and I'll probably try it out as soon as I can find my copy of Xmind :)

Regards,
s

User avatar
Rattlehead
Posts: 368
Joined: Thu 11 Sep 2008, 11:40

#11 Post by Rattlehead »

Thank you for the improvement in the code (that line was pure 'Google wisdom'), and the info about JWM.

Yeah, it's a shame about the workaround. I wonder if the problem has to do with Puppy working in root.

Xdotool is great because it opens a lot of wicked options for unscrupulous semi-geek like me :P . I first knew it with RoxSet, a workaround to make a 2-pane filer out of Rox. These are the kind of things that make me love Linux. What customizations can you do in Windows? Oh yes, you can change your wallpaper! How interesting! :)

Greetings from Madrid :)

der-schutzhund
Posts: 1045
Joined: Mon 26 Nov 2007, 22:07
Location: Blomberg / Germany

#12 Post by der-schutzhund »

Hello,

I worked for the following text:
-----------------------
You don't need a pet. Just install Java http://www.murga-linux.com/puppy/viewtopic.php?t=27341
and then download "XMind 3 Portable - ZIP * (Windows + Mac + Linux)"
Extract the zip file and you will find a "xmind for linux" directory. In it is xmind executable. Click and have fun
-----------------------
seaside wrote:Rattlehead,

Isn't it a shame that we're reduced to such workarounds-but then again that's probably the reason why xdotool exists and is so handy. :)

It might be a slight quicker changing this line-

Code: Select all

trm=`echo "$listed"|awk -F . '{print $NF}'`
to

Code: Select all

trm=`echo "${listed#*.}"`
JWM hotkeys can be set by going to-
menu >desktop >JWM Configuration Manager >Keyboard Shortcuts

Thanks for posting your script and I'll probably try it out as soon as I can find my copy of Xmind :)

Regards,
s

der-schutzhund
Posts: 1045
Joined: Mon 26 Nov 2007, 22:07
Location: Blomberg / Germany

#13 Post by der-schutzhund »

Hello Rattlehead,

Thanks for the script but I'm afraid you have to help me even more.
I have installed 431-de and: gtkdialog3-0.7.20-1-and xdotool 2.20110530.1-3
I would your script in the directory usr / bin store as test.sh. And then?
Imagine there is one who knows from nothing and then you pull off again by half. That I am!

Regards

Wolfgang
Rattlehead wrote:Thank you for the improvement in the code (that line was pure 'Google wisdom'), and the info about JWM.

Yeah, it's a shame about the workaround. I wonder if the problem has to do with Puppy working in root.

Xdotool is great because it opens a lot of wicked options for unscrupulous semi-geek like me :P . I first knew it with RoxSet, a workaround to make a 2-pane filer out of Rox. These are the kind of things that make me love Linux. What customizations can you do in Windows? Oh yes, you can change your wallpaper! How interesting! :)

Greetings from Madrid :)

User avatar
Rattlehead
Posts: 368
Joined: Thu 11 Sep 2008, 11:40

#14 Post by Rattlehead »

a) As a first step, have you tried Seaside's suggestion?
JWM hotkeys can be set by going to-
menu >desktop >JWM Configuration Manager >Keyboard Shortcuts
Maybe you don't have that program (my 4.3.1. doesn't have it), and you should find and install a pet of the aforementioned jwm tools.

(FYI, and sorry if I say something obvious, JWM means Joe's Window Manager. You mentioned you had rox and thunar -file managers- but said nothing about your window manager, which is the program we have to modify. I mention it because I remember my first days as a newcomer from Windows, it took me some time to grab the difference between file manager and window manager, because in Windows both are kind of bundled together).

b) If that doesn't work, here is the dirty way:

open /root/.jwm/jwmrc-personal

Find the section headed with

Code: Select all

<!-- Key bindings -->
(This is just to have an ordered file, I guess you could add your entry anywhere).

Say you want F12 to run the script. This would be the entry you have to add:

Code: Select all

<Key key="F12">exec:/usr/bin/test.sh</Key>
Save the file and refresh menus by executing from console

Code: Select all

jwm -restart
You're done. To test it, open Xmind, select some of the 'bubbles' that contains a link to a document, and press F12.

I am taking part of this from my personal wiki, because as I told you I no longer use JWM, so if I got something wrong or there is any problem, let me know and we'll work out the error. Good luck!

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#15 Post by seaside »

Rattlehead and der-schutzhund,

I decided to have a play with Xmind and Rattlehead's workaround.

So here's a pet specifically for Xmind and puppy431 (although it probably will work in others as well).

It installs a default "hotkey" in Jwm of "Alt-m" (can be changed later if desired).

Restart Jwm after installing.

Place a highlight on the object, Ctl-h, and then Alt-m should bring up any linked file - pdf,txt,png,xls,etc. and no .ext will default to the text editor.

Cheers,
s
Attachments
Grabxlink.pet
Create linked files in Xmind
(1.02 KiB) Downloaded 617 times

User avatar
Rattlehead
Posts: 368
Joined: Thu 11 Sep 2008, 11:40

#16 Post by Rattlehead »

Good job Seaside! Thank you for creating the .pet! Really cool... :D

der-schutzhund
Posts: 1045
Joined: Mon 26 Nov 2007, 22:07
Location: Blomberg / Germany

#17 Post by der-schutzhund »

Sorry Rattlehead, but i use Xfce4!
in the german forum i have already a post of how make a shortcut with xfce4 but no answer jet!
Rattlehead wrote:Good job Seaside! Thank you for creating the .pet! Really cool... :D
Hallo seaside,

but the pet only works with jwm?

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#18 Post by seaside »

der-schutzhund wrote:Sorry Rattlehead, but i use Xfce4!
in the german forum i have already a post of how make a shortcut with xfce4 but no answer jet!
Rattlehead wrote:Good job Seaside! Thank you for creating the .pet! Really cool... :D
Hallo seaside,

but the pet only works with jwm?
der-schutzhund,

You can still use this pet. After you set up a shortcut key in Xfce4 (assign it to "Alt-m" with the exec command "Grabxlink")

Good luck,
s

der-schutzhund
Posts: 1045
Joined: Mon 26 Nov 2007, 22:07
Location: Blomberg / Germany

#19 Post by der-schutzhund »

Hello seaside,

but my problem is that I do not know how to set up a shortcut in xfce4!
one can create shortcuts: Xfce4 Settings Manager -> Keyboard -> Application Shortcuts
I had to "add" just trying to create a new shortcut.
I can enter the command but it is still no abbreviation such as "Shift + F2" because no input field or something similar will appear.
Somewhere it says that it only needs to generate for a new theme but where and how?
seaside wrote:
der-schutzhund wrote:Sorry Rattlehead, but i use Xfce4!
in the german forum i have already a post of how make a shortcut with xfce4 but no answer jet!
Rattlehead wrote:Good job Seaside! Thank you for creating the .pet! Really cool... :D
Hallo seaside,

but the pet only works with jwm?
der-schutzhund,

You can still use this pet. After you set up a shortcut key in Xfce4 (assign it to "Alt-m" with the exec command "Grabxlink")

Good luck,
s

User avatar
Rattlehead
Posts: 368
Joined: Thu 11 Sep 2008, 11:40

#20 Post by Rattlehead »

I'm afraid I can't help with that. I know nothing about Xfce4. I'm happily married with Ratpoison (in spite of the the horrible name :P ).

Maybe creating a new thread about Xfce4 links but in English? I have done it sometimes with the Spanish forum, I don't think it is considered double posting. That way you would multiply the possibility of getting an answer, rather than people diving into this post, apparently on Xmind. It doesn't seem a very complicate issue (assuming that Xfce4 can be customized, which again I don't know).

Hope it helps.

Post Reply