You are not logged in.

#1 2013-10-25 15:16:15

mi3zu
Member
Registered: 2013-10-25
Posts: 11

[SOLVED] Deleted wrong thing

Hi first of all, unfortunately this has to be my first post here, I would've liked to start with something not quite as bad.

So I was trying to see if I can use dmenu to start something, I tried copying the script in /bin, but it wouldn't work so I said before I read the original one I'd delete the one in /bin just to clean up. So instead of doing rm /bin/*scriptname* I go rm scriptname /bin which didn't turn up quite as I expected it to do.
My question is if there's anything I can do at this point? I see that a lot of stuff is in /usr/bin can I just copy that over? I still have a terminal open so I can mess around with pretty much everything. And I don't have any backups that I know of, only if the system actually does some noob-proof some itself.

Thanks smile

Last edited by mi3zu (2013-10-25 17:46:23)

Offline

#2 2013-10-25 15:30:45

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Deleted wrong thing

What's the output of

ls -l /bin

? /bin should be a symbolic link to /usr/bin, so if you only removed the link, you're lucky. Recreate it ans see if it works.

Last edited by karol (2013-10-25 15:33:17)

Offline

#3 2013-10-25 15:32:30

mi3zu
Member
Registered: 2013-10-25
Posts: 11

Re: [SOLVED] Deleted wrong thing

Output is

ls: cannot access /bin: No such file or directory

As I've said the /usr/bin folder is full of stuff I'll try the symlink now


Edit:
It seems to have worked, Arch Linux's new way of handling these directories saved me big time.
Is there any damage that I might have done besides that symlink?

Last edited by mi3zu (2013-10-25 15:34:49)

Offline

#4 2013-10-25 15:33:11

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Deleted wrong thing

As for your script, is /bin in your path?

echo $PATH

It's not in mine

$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/core_perl

so you better put your programs in /usr/local/bin.

Offline

#5 2013-10-25 15:36:41

mi3zu
Member
Registered: 2013-10-25
Posts: 11

Re: [SOLVED] Deleted wrong thing

Well it was recognized by dmenu it seems it just didn't do what it was supposed to I have to investigate it further. Unfortunately I deleted it when I deleted the symlink so I have to figure a way to get it back now.

Offline

#6 2013-10-25 15:41:28

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Deleted wrong thing

I suggest aliasing 'rm' to 'rm -i', so that you're prompted with the "are you sure" question:

# rm /bin
rm: remove symbolic link ‘/bin’? 

Offline

#7 2013-10-25 15:44:44

mi3zu
Member
Registered: 2013-10-25
Posts: 11

Re: [SOLVED] Deleted wrong thing

Hah, that's really useful, thanks.

I got the file back and it seems I was wrong it's not a script it's a binary file. I have eclipse installed in a folder, and it was just unzipped there, can I somehow start it from dmenu?
Should I symlink that file/folder into /usr/bin or copy it somewhere or can I somehow update dmenu?

Thanks for all the help by the way

Offline

#8 2013-10-25 15:56:17

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Deleted wrong thing

Have you tried symlinking it from /usr/local/bin/<scriptname>?

Why do you have eclipse in a folder? Are you using the one from the repos https://www.archlinux.org/packages/?name=eclipse ?

Offline

#9 2013-10-25 16:07:30

mi3zu
Member
Registered: 2013-10-25
Posts: 11

Re: [SOLVED] Deleted wrong thing

Offline

#10 2013-10-25 16:09:23

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Deleted wrong thing

It's in the AUR: https://aur.archlinux.org/packages/eclipse-scala-ide/
Have you tried it?

Offline

#11 2013-10-25 16:18:36

mi3zu
Member
Registered: 2013-10-25
Posts: 11

Re: [SOLVED] Deleted wrong thing

Hmm, no, not yet. Isn't there any simpler way to do it?

Offline

#12 2013-10-25 16:21:46

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Deleted wrong thing

Simpler than what? Looking at the PKGBUILD, it simply copies stuff, no long compiling needed.
This is the Arch way - we use PKGBUILDs and pacman, we don't just unpack things to a folder.

Offline

#13 2013-10-25 16:59:40

mi3zu
Member
Registered: 2013-10-25
Posts: 11

Re: [SOLVED] Deleted wrong thing

Ok, I guess I'll try that, but still just unzipping is a bit easier IMO.

But the question still remains, I can't seem to add anything to my dmenu. If I echo $PATH in a terminal I get what I want, if I echo $PATH in dmenu I only get a part of that. I saw it has something to do with the way I log in I'm currently using lxdm and logging into i3. I tried deleting the dmenu cache but it still won't work.

Offline

#14 2013-10-25 17:44:50

mi3zu
Member
Registered: 2013-10-25
Posts: 11

Re: [SOLVED] Deleted wrong thing

Ok, I found out lxdm loads .profile not .bash_profile. I edited what needed to be edited and now it works properly.

Thanks for the awesome (and fast!) help smile

Offline

Board footer

Powered by FluxBB