Make Nemo Remember Tabs

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
MrGrimm
Level 5
Level 5
Posts: 648
Joined: Sun Nov 11, 2018 9:13 am

Re: Make Nemo Remember Tabs

Post by MrGrimm » Tue Dec 25, 2018 9:06 pm

ok anyone know what i did wrong?

MrGrimm
Level 5
Level 5
Posts: 648
Joined: Sun Nov 11, 2018 9:13 am

Re: Make Nemo Remember Tabs

Post by MrGrimm » Wed Dec 26, 2018 8:56 am


MrGrimm
Level 5
Level 5
Posts: 648
Joined: Sun Nov 11, 2018 9:13 am

Re: Make Nemo Remember Tabs

Post by MrGrimm » Fri Dec 28, 2018 8:12 am

eu2 wrote:
Wed Nov 21, 2018 2:46 pm
MrGrimm wrote:
Wed Nov 21, 2018 8:10 am
eu2 wrote:
Tue Nov 20, 2018 2:27 pm
Only way I can think of how you could do this would be to use a script, guessing you could do it entirely in bash, but it's already been done in python with bash being used to call the tabs.
https://unix.stackexchange.com/question ... linux-mint
Not tried the above as I find nemo mainly ok as a general file manager, but spacefm does what I want a file manager to do.
that's for the idea on the stript, but I'm not writing out a script, as for sapacefm i'm dislike pcmanfm and spacefm is ranked worst the it.
Fair enough, kinda thought the script thing could be pretty interesting, perhaps more in a kiosk/multiple user situation where things are locked down somewhat.
It would do what you required though, if the tabs you wanted to have stayed the same. It could be launched separately from a standard nemo session.

Have you tried spacefm though? Comparing spacefm to pcmanfm would be the same as comparing say tmux to screen..
Regardless best wishes.
actually think you are on to something about the script. can you and smurphos take a look at the one i posted above and let me know what i'm doing wrong? you may want to check the sourceforge links cause there may be additional info there. thanks

User avatar
eu2
Level 2
Level 2
Posts: 76
Joined: Sat Oct 15, 2016 8:16 pm
Contact:

Re: Make Nemo Remember Tabs

Post by eu2 » Fri Dec 28, 2018 3:14 pm

I don't think you are doing much/anything wrong really.

Just had a quick play with that python script (and other similar ones linked from there), got to have another look at this as I've not been able to get any to run as expected.

I'm on mint cinnamon 18.3, (doubt if that would matter).

Think the "New Version": https://askubuntu.com/questions/628084/ ... n-nautilus
Shows the most promise (maybe), but currently I can't get it to open in new tabs, (opens each in a new window).

Going back to the script you tried and asked for help on stack exchange: https://unix.stackexchange.com/question ... 480#490480

I can't get that to work:

Code: Select all

e2@e2-chillie-red ~/scripts $ nemo-tab.py "~/Documents"
Traceback (most recent call last):
  File "/home/e2/bin/nemo-tab.py", line 20, in <module>
    w = [l.split() for l in get("wmctrl -lp").splitlines() if pid in l][-1]
IndexError: list index out of range
e2@e2-chillie-red ~/scripts $ nemo-tab.py ~/Documents
Traceback (most recent call last):
  File "/home/e2/bin/nemo-tab.py", line 20, in <module>
    w = [l.split() for l in get("wmctrl -lp").splitlines() if pid in l][-1]
IndexError: list index out of range
I don't mind admitting that I'm terrible at python and I'd be lying if I said I could think of a reason you wouldn't just do this in bash as python tends to change fairly quickly.

MrGrimm
Level 5
Level 5
Posts: 648
Joined: Sun Nov 11, 2018 9:13 am

Re: Make Nemo Remember Tabs

Post by MrGrimm » Fri Dec 28, 2018 3:36 pm

thanks for actually taking the time to take a look. much appreciated.
Last edited by MrGrimm on Sun Dec 30, 2018 8:20 am, edited 1 time in total.

User avatar
eu2
Level 2
Level 2
Posts: 76
Joined: Sat Oct 15, 2016 8:16 pm
Contact:

Re: Make Nemo Remember Tabs

Post by eu2 » Fri Dec 28, 2018 5:01 pm

So looking at what the python scripts were doing (trying to in the case of my box).

I roughly interpreted that into bash.... No loops/extra text files.

As with the python scripts my test script also needs xdotool and wmctrl.

Code: Select all

#!/bin/bash

    #Test script for using xdotool to open multiple Nemo tabs.
    #Don't think this is going to have a happy outcome sad face :-(
    #Used generic pre existing mint folders, don't really see the point in loops at this point.
    #Everything has to wait for xdotool to emulate keyboard input anyway.
    
    #Wake up Nemo!
    #Also give time for things like dropbox, sshfs etc to catch up.
    
    nemo ~/Music    
    sleep 2s

    wmctrl -xF -R nemo.Nemo && xdotool key ctrl+t ctrl+l BackSpace
    wmctrl -xF -R nemo.Nemo && xdotool type '~/Videos'    
    xdotool key Return
    sleep .001s
    wmctrl -xF -R nemo.Nemo && xdotool key ctrl+t ctrl+l BackSpace
    wmctrl -xF -R nemo.Nemo && xdotool type '~/Pictures'    
    xdotool key Return
    sleep .001s
    wmctrl -xF -R nemo.Nemo && xdotool key ctrl+t ctrl+l BackSpace
    wmctrl -xF -R nemo.Nemo && xdotool type '~/Documents'    
    xdotool key Return
    sleep .001s
    wmctrl -xF -R nemo.Nemo && xdotool key ctrl+t ctrl+l BackSpace
    wmctrl -xF -R nemo.Nemo && xdotool type '~/Downloads'    
    xdotool key Return
Only played for a little while as I found that this doesn't really work reliably for me anyway.

Kind of at a loss regarding what the use case for anyone using nemo/nautilus/caja would be at the best of times, never mind when they want to do something that should be trivial (ie what OP wanted), with their file manager?

I digress as I use nemo sometimes; if I drag and drop between two directories on the same box, but wouldn't currently consider it as a reliable option for much else.

MrGrimm
Level 5
Level 5
Posts: 648
Joined: Sun Nov 11, 2018 9:13 am

Re: (SOLVED) Make Nemo Remember Tabs

Post by MrGrimm » Sun Dec 30, 2018 8:00 am

well i'll leave unsolved for now. maybe someone will show interest in fixing this. thanks for the effort.

Post Reply

Return to “Newbie Questions”