Solved Linux Sublime Text 3 package on FreeBSD 10.3

Stephane Legrand

New Member


Messages: 3

Hello,

After having updated (with freebsd-update) my FreeBSD 10.2 workstation to the new 10.3, i am no longer able to run Sublime Text 3. I have updated the system and the packages without any problem. But when i try to start Sublime Text 3, i get... nothing. No window, no error message at all.

I also tried to install the Sublime Text 3 package on Virtualbox with the official virtual image of FreeBSD 10.3. The package installation is ok. But, same problem, when i try to run "sublime" on a shell, i get nothing.

So my question is: does anyone has actually succeed to run Sublime Text 3 package on FreeBSD 10.3?

Thanks.
Stéphane.
 
OP
OP
Stephane Legrand

Stephane Legrand

New Member


Messages: 3

The port maintainer has kindly answered to my PR 208618:
Hi, try sublime -w as it sometimes shows a bit more info when sublime fails to start, however I would say this is related to the tmpfs changes and you should get a message warning about that when installing linux-c6 ...sublime needs shm but now shm also needs to be a tmpfs filesystem. In my local machine I link dev/shm to /ram and /ram in a tmpfs filesystem but you can off do that for /tmp. sadly sublime binary can't tell you that's why it fails, however -w wi at list say it couldn't init shm. Hopefully that's the issue your seeing, and it's easily solved
So, it was my mistake. Text is now sublime again :)
 

T313C0mun1s7

New Member


Messages: 1

I am having the exact same issue. When I run sublime -w I get unable to init shm.

Sadly I have no clue what the solution in the bug report is. It needs to be clarified and it is closed. I have not used BSD since FreeBSD was at 4.4 and I don't know what miguelmclara was trying to say. I know what a link is, and I was able to find /dev/shm, but there is no /ram and I am totally lost by "and /ram in a tmpfs filesystem but you can off do that for /tmp"

Could you please post a clear instruction on what I should do to fix the issue? Please note that by clear instructions, I mean it took me about 6 hours to figure out how to install Sublime Text 3 from the ports collection. I am using PC-BSD and installed ports from AppCafe but nothing seemed to happen and nothing was in /usr/ports. I finally figured out to use portsnap, but I would not consider the section 4.5 instructions very clear either. Seriously, if you mean I should type
Code:
sudo /usr/sbin/portsnap
then why do you just put
Code:
portsnap
? Are new, and inexperienced users just suppose to inherently know it is in /usr/sbin? Also, if it needs to run as root, could you not say that? Long story short - when I say clear instructions I mean the FreeBSD documentation is not a good example. If I have to type
Code:
sudo /usr/sbin/<whatever>
and you tell me to run
Code:
<whatever>
without the full command, I will be beating my head on my desk for a while.

Since you are not alone in this issue, why don't we just leave an easy and complete solution to this problem right there in this thread for the other people in the future that will have the issue. It is already showing up as the first hit in a Google search.
 
OP
OP
Stephane Legrand

Stephane Legrand

New Member


Messages: 3

Ok, i will try to give more explanations.

1. You need to be root. So open a terminal and type:
sudo sh

It will give you a shell with root rights. Then you won't have to type sudo each time for the next commands.

2. Create a directory for the tmpfs filesystem. For instance:
mkdir /tmpfs

3. Edit the /etc/fstab (with vi for instance) to add the following line at the end of the file:
Code:
tmpfs     /tmpfs     tmpfs   rw,mode=777   0   0
4. Mount the tmpfs filesystem:
Code:
mount /tmpfs
5. Edit the file /etc/devfs.conf (with vi for instance) to add the following line at the end of the file:
Code:
link   /tmpfs   shm
6. Restart devfs
Code:
/etc/rc.d/devfs restart
7. Try to run sublime -w, that should work.

Regards,
Stéphane.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,092
Messages: 29,261

1. You need to be root. So open a terminal and type:
sudo sh
Use sudo -i instead.
3. Edit the /etc/fstab (with vi for instance) to add the following line at the end of the file:
Code:
tmpfs     /tmpfs     tmpfs   rw,mode=777   0   0
Permissions should be 1777, not 777. The sticky(7) bit needs to be set too. And you can mount tmpfs(5) on /tmp. No need for a separate filesystem.
 
Top