Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > Linux


Reply
 
Share Thread Tools Display Modes
Old 08-13-2009, 11:10 AM   #1
Low Bitrate
 
eurocarpc's Avatar
 
Join Date: Jun 2006
Location: Madrid, Spain
Posts: 68
eurocarpc is on a distinguished road
Three questions regarding Sygic+Wine

Hi!

I'm succesfully running sygic under wine now, with Ubuntu Desktop 9.04 .

But I have a number of minor problems I'd like to solve:

1. Why is it that if I do "wine Drive.exe" or "wine <path-to-Drive.exe>/Drive.exe" the program stops after showing the first screen? If instead, I do right click and "run with wine" from nautilus, it works fine... =( I think it may have something to do with environment variables, being set differently in the terminal and in nautilus, but I'm not sure...

2. Is there any way to maximize the window automatically when the program is started?

3. I have created a soft link from the <dos_devices> directory to the GPS tty, ttyUSB0; that lets wine read from the GPS as a standard windows serial port. Till there, everything OK. Now, what if I want other programs to use the GPS at the same time? AFAIK, you only need to read from the tty to get the GPS coordinates; and therefore there should be a way to "replicate" the port in the same way the Windows program Franson(s?) GPS gate worked. How can I do this?


Thanks!
eurocarpc is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Old 08-13-2009, 10:10 PM   #2
licensed to kill
 
kev000's Avatar
 
Join Date: Aug 2006
Location: Deep in the Rockies... coding in caves
Posts: 1,044
kev000 will become famous soon enough
Quote: Originally Posted by eurocarpc View Post
Hi!

I'm succesfully running sygic under wine now, with Ubuntu Desktop 9.04 .

But I have a number of minor problems I'd like to solve:

1. Why is it that if I do "wine Drive.exe" or "wine <path-to-Drive.exe>/Drive.exe" the program stops after showing the first screen? If instead, I do right click and "run with wine" from nautilus, it works fine... =( I think it may have something to do with environment variables, being set differently in the terminal and in nautilus, but I'm not sure...

2. Is there any way to maximize the window automatically when the program is started?

3. I have created a soft link from the <dos_devices> directory to the GPS tty, ttyUSB0; that lets wine read from the GPS as a standard windows serial port. Till there, everything OK. Now, what if I want other programs to use the GPS at the same time? AFAIK, you only need to read from the tty to get the GPS coordinates; and therefore there should be a way to "replicate" the port in the same way the Windows program Franson(s?) GPS gate worked. How can I do this?


Thanks!

1. Don't know
2. use something like "maximus" in the repo. It makes every window maximized.
3. gpsd would solve that for you, but sygic probably won't use it. Someone else may have to chime in like chunky_ks or malcom2073.
__________________
LinuxICE - because my car already has enough windows (and because I like speed).
LinuxICE2 beta2 is released!!! get it now!
Follow OpenICE development
kev000 is offline   Reply With Quote
Old 08-14-2009, 09:09 AM   #3
Low Bitrate
 
eurocarpc's Avatar
 
Join Date: Jun 2006
Location: Madrid, Spain
Posts: 68
eurocarpc is on a distinguished road
Regarding 3... if I run the gps daemon, wine/sygic can't read from the port.

And 2... I believe I've seen "maximus" at work in Ubuntu Netbook, but that's not the kind of behaviour I'm looking for. I only need the GPS window maximized.


Any other clues? Thanks Kev000!
__________________
My project: double indash, Golf IV
http://www.mp3car.com/vbulletin/showthread.php?p=841754
eurocarpc is offline   Reply With Quote
Old 08-14-2009, 12:14 PM   #4
licensed to kill
 
kev000's Avatar
 
Join Date: Aug 2006
Location: Deep in the Rockies... coding in caves
Posts: 1,044
kev000 will become famous soon enough
look at compiz's window manager rules. It will probably only work if compiz is your window manager though.

good luck
__________________
LinuxICE - because my car already has enough windows (and because I like speed).
LinuxICE2 beta2 is released!!! get it now!
Follow OpenICE development
kev000 is offline   Reply With Quote
Old 08-19-2009, 05:25 AM   #5
Low Bitrate
 
eurocarpc's Avatar
 
Join Date: Jun 2006
Location: Madrid, Spain
Posts: 68
eurocarpc is on a distinguished road
Fixed the GPS-for-multiple-apps problem with this home-made php script.

It creates a /tmp/gps_fifo.nmea file that you can use as another com port for wine.

Link to the dosdevices directory with ln -s com2 /tmp/<name> and you are ready to go.

Must be run with php5 <name-of-script>

Install php with sudo aptitude install php5-cli -y

I've also tweaked the gpsd startup script a little so that it runs the script as the gpsd daemon starts running. I'll post the /etc/init.d/gpsd script later.

Code:
<?php $fifo_filename = "/tmp/gps_fifo.nmea"; ob_end_flush(); // Conectar a GPSD $gps = fsockopen( 'localhost', 2947, $errno, $errstr, 5 ); if (!$gps) { trigger_error(E_USER_ERROR, "No se pudo conectar a GPSD: $errstr (error $errno)\n"); } $eof = false; echo "GPSD OK\n"; // Crear FIFO unlink($fifo_filename); $fifo = posix_mkfifo($fifo_filename, 0666); if (!$fifo) { trigger_error("No se pudo crear el FIFO.\n", E_USER_ERROR); die(); } echo "FIFO create OK\n"; // El bucle terminará cuando haya un error de lectura en el GPS while(!$eof) { echo "Waiting for other process to open the FIFO\n"; // Abrir FIFO $fifo = fopen($fifo_filename,'w'); if (!$fifo) { trigger_error("No se pudo abrir el FIFO.\n", E_USER_ERROR); die(); } echo "FIFO open OK\n"; // Pedir a GPSD que devuelva NMEA echo "R1\n"; fwrite($gps,"R1\n"); // Capturar la respuesta de GPSD "GPSD,R=1" ("OK, he puesto el modo NMEA) echo fgets($gps,256); var_dump($gps); // ... y mandar lo leído de GPSD al FIFO... $ok = true; while ($eof = !feof($gps) && $ok) { //echo fgets($fp,256); $buff = fgets($gps,256); $ok = fwrite($fifo,$buff); echo $buff; } }

__________________
My project: double indash, Golf IV
http://www.mp3car.com/vbulletin/showthread.php?p=841754
eurocarpc is offline   Reply With Quote
Old 08-19-2009, 12:06 PM   #6
Maximum Bitrate
 
PaulF's Avatar
 
Join Date: Jan 2008
Location: Dartmouth, MA
Posts: 517
PaulF is on a distinguished road
1: I'm going to guess that the path is not set correctly. Try going to the command line and CD into the directory that is storing drive.exe and then try doing wine Drive.exe there.

If that works, then we can work from there...
__________________
My Car (Just the audio install as of now)
http://paulfurtado.com/car/

Worklog:
http://www.mp3car.com/vbulletin/work...-work-log.html

Planning 90%
Computer Build 88%
Programming 10%
Car Install 71%
PaulF is offline   Reply With Quote
Old 08-20-2009, 12:18 AM   #7
Low Bitrate
 
eurocarpc's Avatar
 
Join Date: Jun 2006
Location: Madrid, Spain
Posts: 68
eurocarpc is on a distinguished road
I tried that but it didn't work either... =(
__________________
My project: double indash, Golf IV
http://www.mp3car.com/vbulletin/showthread.php?p=841754
eurocarpc is offline   Reply With Quote
Old 08-20-2009, 01:24 AM   #8
Maximum Bitrate
 
PaulF's Avatar
 
Join Date: Jan 2008
Location: Dartmouth, MA
Posts: 517
PaulF is on a distinguished road
it's possible that you have two copies of wine installed, and nautilus is grabbing the right one.

It's also possible that nautilus is putting some arguments into the command when it starts. I haven't messed with GUI linux in a while, I wish I could tell you how to check what exactly nautilus is doing, but I can't remember. Grr.
__________________
My Car (Just the audio install as of now)
http://paulfurtado.com/car/

Worklog:
http://www.mp3car.com/vbulletin/work...-work-log.html

Planning 90%
Computer Build 88%
Programming 10%
Car Install 71%
PaulF is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Old 08-20-2009, 12:13 PM   #9
Low Bitrate
 
eurocarpc's Avatar
 
Join Date: Jun 2006
Location: Madrid, Spain
Posts: 68
eurocarpc is on a distinguished road
I installed wine the standard way, with aptitude, so I doubt there are two copies of the program installed.

The second option, passing more arguments (via set env. variables) is what I think the problem is, but I don't know how to fix it. =(

Thanks!
__________________
My project: double indash, Golf IV
http://www.mp3car.com/vbulletin/showthread.php?p=841754
eurocarpc is offline   Reply With Quote
Old 10-02-2009, 03:46 AM   #10
Newbie
 
Join Date: Oct 2009
Posts: 1
Chalzor is an unknown quantity at this point
Simple com port emulation

Did a little bit of research as I was looking into building my linux based carpc ... this should give you a working com port ... I think, havent tried it.

gpspipe -r >> ~.wine/dosdevices/com3

Found this little snippet here, http://www.nabble.com/-PATCH-2.34--g...d15120307.html

On that site is a patch to gpspipe to add a -f option, but that seems too much work to me to implement. Thought it might be useful to someone.

Chalzor
Chalzor is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Reply

Bookmarks

Tags
wine sygic gps variables

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Garmin MobilePC being tested- so far, so good. rogerdugans Linux 7 08-16-2009 11:55 AM
Questions, Questions, Questions... TomParker69 General Hardware Discussion 3 08-10-2007 02:32 PM
engine wine know how its there but can't get rid of michaelrj9 Car Audio 35 11-05-2005 09:58 AM
questions and more questions cortinaking Newbie 6 06-16-2005 03:02 PM
Will someone be willing to answer a few questions about the Vietnam War for an essay? guitar333 Off Topic 6 05-25-2005 12:53 PM



All times are GMT -5. The time now is 02:41 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics